summaryrefslogtreecommitdiff
path: root/pkgtools
diff options
context:
space:
mode:
authorschmonz <schmonz@pkgsrc.org>2018-12-05 19:49:26 +0000
committerschmonz <schmonz@pkgsrc.org>2018-12-05 19:49:26 +0000
commita833c9cf393ebc5e3621f6e21b5601e4dde534db (patch)
treeede9384bcaf68d3e32c2e08281ee4b3b1bcd86bb /pkgtools
parentd3fa42d31e4d039c0f1a39b9951b9ffe19a835d4 (diff)
downloadpkgsrc-a833c9cf393ebc5e3621f6e21b5601e4dde534db.tar.gz
Add NetBSD support, trivially.
Diffstat (limited to 'pkgtools')
-rw-r--r--pkgtools/rc.d-boot/INSTALL12
-rw-r--r--pkgtools/rc.d-boot/Makefile17
-rw-r--r--pkgtools/rc.d-boot/files/rc.d-boot2
3 files changed, 25 insertions, 6 deletions
diff --git a/pkgtools/rc.d-boot/INSTALL b/pkgtools/rc.d-boot/INSTALL
index 2905abf6d93..0474b9443d4 100644
--- a/pkgtools/rc.d-boot/INSTALL
+++ b/pkgtools/rc.d-boot/INSTALL
@@ -1,9 +1,17 @@
-# $NetBSD: INSTALL,v 1.1 2018/12/05 19:23:04 schmonz Exp $
+# $NetBSD: INSTALL,v 1.2 2018/12/05 19:49:26 schmonz Exp $
+
+OPSYS=@OPSYS@
case ${STAGE} in
POST-INSTALL)
- launchctl load -w /Library/LaunchDaemons/org.pkgsrc.rc.d-boot.plist
+ case "${OPSYS}" in
+ Darwin)
+ launchctl load -w /Library/LaunchDaemons/org.pkgsrc.rc.d-boot.plist
+ ;;
+ NetBSD)
+ ;;
+ esac
;;
diff --git a/pkgtools/rc.d-boot/Makefile b/pkgtools/rc.d-boot/Makefile
index ead1203eccf..909f7e815bb 100644
--- a/pkgtools/rc.d-boot/Makefile
+++ b/pkgtools/rc.d-boot/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.1 2018/12/05 19:23:04 schmonz Exp $
+# $NetBSD: Makefile,v 1.2 2018/12/05 19:49:26 schmonz Exp $
#
PKGNAME= rc.d-boot-20181205
@@ -7,10 +7,17 @@ CATEGORIES= pkgtools
MAINTAINER= schmonz@NetBSD.org
COMMENT= Run package rc.d scripts at boot on any supported OS
-ONLY_FOR_PLATFORM= Darwin-*-*
+ONLY_FOR_PLATFORM= Darwin-*-* NetBSD-*-*
+.include "../../mk/bsd.prefs.mk"
+
+.if ${OPSYS} != "NetBSD"
DEPENDS+= rc.subr-[0-9]*:../../pkgtools/rc.subr
DEPENDS+= rcorder-[0-9]*:../../pkgtools/rcorder
+RCORDER= ${PREFIX}/sbin/rcorder
+.else
+RCORDER= /sbin/rcorder
+.endif
NO_CHECKSUM= yes
NO_BUILD= yes
@@ -18,10 +25,14 @@ NO_BUILD= yes
SUBST_CLASSES= paths
SUBST_STAGE.paths= pre-configure
SUBST_FILES.paths= rc.d-boot org.pkgsrc.rc.d-boot.plist
-SUBST_VARS.paths= PREFIX RCD_SCRIPTS_DIR
+SUBST_VARS.paths= PREFIX RCD_SCRIPTS_DIR RCORDER
+
+FILES_SUBST+= OPSYS=${OPSYS:Q}
+.if ${OPSYS} == "Darwin"
CONF_FILES+= ${PREFIX}/share/examples/${PKGBASE}/org.pkgsrc.rc.d-boot.plist \
/Library/LaunchDaemons/org.pkgsrc.rc.d-boot.plist
+.endif
INSTALLATION_DIRS= sbin share/examples/${PKGBASE}
diff --git a/pkgtools/rc.d-boot/files/rc.d-boot b/pkgtools/rc.d-boot/files/rc.d-boot
index 78b37489b46..536c324ce68 100644
--- a/pkgtools/rc.d-boot/files/rc.d-boot
+++ b/pkgtools/rc.d-boot/files/rc.d-boot
@@ -8,7 +8,7 @@ run_all_rcd_scripts() {
test -d ${rcd} && echo ${rcd}/*;
done)
- files=$(@PREFIX@/sbin/rcorder -s nostart ${scripts})
+ files=$(@RCORDER@ -s nostart ${scripts})
for _rc_elem in $files; do
$_rc_elem ${action}