pkgsrc-Changes archive

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

CVS commit: pkgsrc/pkgtools/rc.d-boot



Module Name:    pkgsrc
Committed By:   schmonz
Date:           Wed Dec  5 19:49:26 UTC 2018

Modified Files:
        pkgsrc/pkgtools/rc.d-boot: INSTALL Makefile
        pkgsrc/pkgtools/rc.d-boot/files: rc.d-boot

Log Message:
Add NetBSD support, trivially.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 pkgsrc/pkgtools/rc.d-boot/INSTALL \
    pkgsrc/pkgtools/rc.d-boot/Makefile
cvs rdiff -u -r1.1 -r1.2 pkgsrc/pkgtools/rc.d-boot/files/rc.d-boot

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/pkgtools/rc.d-boot/INSTALL
diff -u pkgsrc/pkgtools/rc.d-boot/INSTALL:1.1 pkgsrc/pkgtools/rc.d-boot/INSTALL:1.2
--- pkgsrc/pkgtools/rc.d-boot/INSTALL:1.1       Wed Dec  5 19:23:04 2018
+++ pkgsrc/pkgtools/rc.d-boot/INSTALL   Wed Dec  5 19:49:26 2018
@@ -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
 
        ;;
 
Index: pkgsrc/pkgtools/rc.d-boot/Makefile
diff -u pkgsrc/pkgtools/rc.d-boot/Makefile:1.1 pkgsrc/pkgtools/rc.d-boot/Makefile:1.2
--- pkgsrc/pkgtools/rc.d-boot/Makefile:1.1      Wed Dec  5 19:23:04 2018
+++ pkgsrc/pkgtools/rc.d-boot/Makefile  Wed Dec  5 19:49:26 2018
@@ -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@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 @@ 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}
 

Index: pkgsrc/pkgtools/rc.d-boot/files/rc.d-boot
diff -u pkgsrc/pkgtools/rc.d-boot/files/rc.d-boot:1.1 pkgsrc/pkgtools/rc.d-boot/files/rc.d-boot:1.2
--- pkgsrc/pkgtools/rc.d-boot/files/rc.d-boot:1.1       Wed Dec  5 19:23:04 2018
+++ pkgsrc/pkgtools/rc.d-boot/files/rc.d-boot   Wed Dec  5 19:49:26 2018
@@ -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}



Home | Main Index | Thread Index | Old Index