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 FreeBSD support, trivially.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/9fcb559d53f8
branches:  trunk
changeset: 316614:9fcb559d53f8
user:      schmonz <schmonz%pkgsrc.org@localhost>
date:      Sun Dec 16 05:41:01 2018 +0000

description:
Add FreeBSD support, trivially.

diffstat:

 pkgtools/rc.d-boot/DEINSTALL |  13 +++++++++++--
 pkgtools/rc.d-boot/INSTALL   |   4 +++-
 pkgtools/rc.d-boot/Makefile  |  17 ++++++++++-------
 3 files changed, 24 insertions(+), 10 deletions(-)

diffs (108 lines):

diff -r 4911acd524a1 -r 9fcb559d53f8 pkgtools/rc.d-boot/DEINSTALL
--- a/pkgtools/rc.d-boot/DEINSTALL      Sun Dec 16 05:32:11 2018 +0000
+++ b/pkgtools/rc.d-boot/DEINSTALL      Sun Dec 16 05:41:01 2018 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: DEINSTALL,v 1.1 2018/12/12 02:08:10 schmonz Exp $
+# $NetBSD: DEINSTALL,v 1.2 2018/12/16 05:41:01 schmonz Exp $
 
 RCDBOOT_STYLE=@RCDBOOT_STYLE@
 
@@ -8,6 +8,8 @@
        case "${RCDBOOT_STYLE}" in
        darwin-launchd)
                ;;
+       freebsd-native)
+               ;;
        linux-systemd)
                systemctl disable pkgsrc-rc.d-boot.service
                ;;
@@ -15,7 +17,11 @@
                ;;
        esac
 
-       ${CAT} <<EOF
+       case "${RCDBOOT_STYLE}" in
+       *-native)
+               ;;
+       *)
+               ${CAT} <<EOF
 ===========================================================================
 
 pkgsrc-provided rc.d scripts will no longer be started at boot.
@@ -24,6 +30,9 @@
 
 ===========================================================================
 EOF
+               ;;
+       esac
+
        ;;
 
 esac
diff -r 4911acd524a1 -r 9fcb559d53f8 pkgtools/rc.d-boot/INSTALL
--- a/pkgtools/rc.d-boot/INSTALL        Sun Dec 16 05:32:11 2018 +0000
+++ b/pkgtools/rc.d-boot/INSTALL        Sun Dec 16 05:41:01 2018 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: INSTALL,v 1.3 2018/12/12 02:08:10 schmonz Exp $
+# $NetBSD: INSTALL,v 1.4 2018/12/16 05:41:01 schmonz Exp $
 
 RCDBOOT_STYLE=@RCDBOOT_STYLE@
 
@@ -9,6 +9,8 @@
        darwin-launchd)
                launchctl load -w /Library/LaunchDaemons/org.pkgsrc.rc.d-boot.plist
                ;;
+       freebsd-native)
+               ;;
        linux-systemd)
                systemctl enable --now /etc/systemd/system/pkgsrc-rc.d-boot.service
                ;;
diff -r 4911acd524a1 -r 9fcb559d53f8 pkgtools/rc.d-boot/Makefile
--- a/pkgtools/rc.d-boot/Makefile       Sun Dec 16 05:32:11 2018 +0000
+++ b/pkgtools/rc.d-boot/Makefile       Sun Dec 16 05:41:01 2018 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.3 2018/12/12 02:08:10 schmonz Exp $
+# $NetBSD: Makefile,v 1.4 2018/12/16 05:41:01 schmonz Exp $
 #
 
 PKGNAME=               rc.d-boot-20181211
@@ -12,12 +12,12 @@
 
 .include "../../mk/bsd.prefs.mk"
 
-.if ${OPSYS} != "NetBSD"
+.if exists(/sbin/rcorder)
+RCORDER=               /sbin/rcorder
+.else
 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
@@ -33,17 +33,20 @@
 FILES_SUBST+=          RCDBOOT_STYLE=${RCDBOOT_STYLE:Q}
 
 .if ${OPSYS} == "Darwin" && exists (/Library/LaunchDaemons)
-ONLY_FOR_PLATFORM+=    Darwin-*-*
+ONLY_FOR_PLATFORM+=    ${OPSYS}-*-*
 RCDBOOT_STYLE=         darwin-launchd
 CONF_FILES+=           ${PREFIX}/share/examples/${PKGBASE}/org.pkgsrc.rc.d-boot.plist \
                        /Library/LaunchDaemons/org.pkgsrc.rc.d-boot.plist
+.elif ${OPSYS} == "FreeBSD" && exists(/etc/rc.d)
+ONLY_FOR_PLATFORM+=    ${OPSYS}-*-*
+RCDBOOT_STYLE=         freebsd-native
 .elif ${OPSYS} == "Linux" && exists(/etc/systemd/system)
-ONLY_FOR_PLATFORM+=    Linux-*-*
+ONLY_FOR_PLATFORM+=    ${OPSYS}-*-*
 RCDBOOT_STYLE=         linux-systemd
 CONF_FILES+=           ${PREFIX}/share/examples/${PKGBASE}/pkgsrc-rc.d-boot.service \
                        /etc/systemd/system/pkgsrc-rc.d-boot.service
 .elif ${OPSYS} == "NetBSD" && exists(/etc/rc.d)
-ONLY_FOR_PLATFORM+=    NetBSD-*-*
+ONLY_FOR_PLATFORM+=    ${OPSYS}-*-*
 RCDBOOT_STYLE=         netbsd-native
 .endif
 



Home | Main Index | Thread Index | Old Index