pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/pkgtools/rc.d-boot Add NetBSD support, trivially.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/4ad309623ae5
branches:  trunk
changeset: 326400:4ad309623ae5
user:      schmonz <schmonz%pkgsrc.org@localhost>
date:      Wed Dec 05 19:49:26 2018 +0000

description:
Add NetBSD support, trivially.

diffstat:

 pkgtools/rc.d-boot/INSTALL         |  12 ++++++++++--
 pkgtools/rc.d-boot/Makefile        |  17 ++++++++++++++---
 pkgtools/rc.d-boot/files/rc.d-boot |   2 +-
 3 files changed, 25 insertions(+), 6 deletions(-)

diffs (79 lines):

diff -r 82798d60491a -r 4ad309623ae5 pkgtools/rc.d-boot/INSTALL
--- a/pkgtools/rc.d-boot/INSTALL        Wed Dec 05 19:24:05 2018 +0000
+++ b/pkgtools/rc.d-boot/INSTALL        Wed Dec 05 19:49:26 2018 +0000
@@ -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 -r 82798d60491a -r 4ad309623ae5 pkgtools/rc.d-boot/Makefile
--- a/pkgtools/rc.d-boot/Makefile       Wed Dec 05 19:24:05 2018 +0000
+++ b/pkgtools/rc.d-boot/Makefile       Wed Dec 05 19:49:26 2018 +0000
@@ -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 @@
 MAINTAINER=            schmonz%NetBSD.org@localhost
 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 @@
 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 -r 82798d60491a -r 4ad309623ae5 pkgtools/rc.d-boot/files/rc.d-boot
--- a/pkgtools/rc.d-boot/files/rc.d-boot        Wed Dec 05 19:24:05 2018 +0000
+++ b/pkgtools/rc.d-boot/files/rc.d-boot        Wed Dec 05 19:49:26 2018 +0000
@@ -8,7 +8,7 @@
                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}



Home | Main Index | Thread Index | Old Index