diff options
author | dougb <dougb@FreeBSD.org> | 2005-12-19 05:04:37 +0800 |
---|---|---|
committer | dougb <dougb@FreeBSD.org> | 2005-12-19 05:04:37 +0800 |
commit | 6ca3aa6177abe2833e2612ac019e1ff735ed6d20 (patch) | |
tree | b6bbabd33f96946fe63ad48633257acbd2a28d3d | |
parent | f0b2b44a8de4201946322b25d2b9cd65655ac31d (diff) | |
download | freebsd-ports-gnome-6ca3aa6177abe2833e2612ac019e1ff735ed6d20.tar.gz freebsd-ports-gnome-6ca3aa6177abe2833e2612ac019e1ff735ed6d20.tar.zst freebsd-ports-gnome-6ca3aa6177abe2833e2612ac019e1ff735ed6d20.zip |
Provide new style rc.d boot scripts, using the infrastructure that
is present in both bsd.port.mk and rc.subr to make things as simple
as possible.
-rw-r--r-- | misc/compat4x/Makefile | 20 | ||||
-rw-r--r-- | misc/compat4x/files/compat4x.sh.in | 27 | ||||
-rw-r--r-- | misc/compat4x/pkg-plist.freebsd4 | 1 | ||||
-rw-r--r-- | misc/compat4x/pkg-plist.freebsd5 | 1 | ||||
-rw-r--r-- | misc/compat5x/Makefile | 15 | ||||
-rw-r--r-- | misc/compat5x/files/compat5x.sh.in | 27 | ||||
-rw-r--r-- | misc/compat5x/pkg-plist | 1 |
7 files changed, 71 insertions, 21 deletions
diff --git a/misc/compat4x/Makefile b/misc/compat4x/Makefile index cd1b15c826d4..d0ac38d52ede 100644 --- a/misc/compat4x/Makefile +++ b/misc/compat4x/Makefile @@ -7,7 +7,7 @@ PORTNAME= compat4x PORTVERSION= ${COMPAT4X_PORTVERSION} -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= misc MASTER_SITES= ${COMPAT4X_MASTER_SITES} MASTER_SITE_SUBDIR= ${COMPAT4X_MASTER_SITE_SUBDIR} @@ -22,12 +22,16 @@ WRKSRC= ${WRKDIR}/usr/lib/compat NO_MTREE= yes TARGET_DIR= ${PREFIX}/lib/compat +TARGET32_DIR= ${PREFIX}/lib32/compat +USE_RC_SUBR= ${PORTNAME}.sh INSTALLS_SHLIB= yes LDCONFIG_DIRS= %%PREFIX%%/lib/compat .include <bsd.port.pre.mk> +SUB_LIST+= LDCONFIG="${LDCONFIG}" + .if ${OSVERSION} >= 600016 RUN_DEPENDS= ${LOCALBASE}/share/compat/locale/UTF-8/LC_CTYPE:${PORTSDIR}/misc/localedata .endif @@ -41,7 +45,7 @@ COMPAT4X_DISTFILES= ${PORTNAME}.aa \ .elif ${ARCH} == amd64 ARCH= i386 PKGNAMESUFFIX= -i386 -TARGET_DIR= ${PREFIX}/lib32/compat +TARGET_DIR= ${TARGET32_DIR} PLIST_SUB+= LIBDIR="lib32" COMPAT4X_DISTFILES= ${PORTNAME}.aa \ ${PORTNAME}.ab @@ -78,8 +82,10 @@ PLIST_SUB+= I386_ONLY="@comment " .if ${ARCH} == amd64 PLIST_SUB+= AMD64_ONLY="" PLIST_SUB+= LDCONFIG_LIB32="${LDCONFIG} -32" +SUB_LIST+= AMD64="" TARGET32_DIR="${TARGET32_DIR}" .else PLIST_SUB+= AMD64_ONLY="@comment " +SUB_LIST+= AMD64="@comment " .endif OPENSSL_LIBS= libcrypto.so.1 libcrypto.so.2 libssl.so.1 libssl.so.2 @@ -121,15 +127,10 @@ do-extract: .endfor .endif -do-build: - @( ${ECHO_CMD} '#!/bin/sh'; ${ECHO_CMD} '${LDCONFIG} -m ${LDCONFIG_RUNLIST}'; \ - ) > ${WRKDIR}/000.${PORTNAME}.sh -.if ${TARGET_DIR} == ${PREFIX}/lib32/compat - @${ECHO_CMD} '${LDCONFIG} -32 -m ${TARGET_DIR}' >> ${WRKDIR}/000.${PORTNAME}.sh -.endif +NO_BUILD= yes do-install: - ${MKDIR} ${TARGET_DIR} ${PREFIX}/etc/rc.d + ${MKDIR} ${TARGET_DIR} ${INSTALL_DATA} ${WRKSRC}/* ${TARGET_DIR}/ .if ${OSVERSION} >= 500000 .for lib in ${FREEBSD4_LIBS} @@ -139,7 +140,6 @@ do-install: .if ${ARCH} == amd64 ${LDCONFIG} -32 -m ${TARGET32_DIR} .endif - ${INSTALL_SCRIPT} ${WRKDIR}/000.${PORTNAME}.sh ${PREFIX}/etc/rc.d/ post-install: @${SH} ${PKGINSTALL} ${PORTNAME} POST-INSTALL diff --git a/misc/compat4x/files/compat4x.sh.in b/misc/compat4x/files/compat4x.sh.in new file mode 100644 index 000000000000..5ef8d48f62ad --- /dev/null +++ b/misc/compat4x/files/compat4x.sh.in @@ -0,0 +1,27 @@ +#!/bin/sh +# +# $FreeBSD$ +# +# PROVIDE: compat4x +# REQUIRE: mountcritremote +# +# Add the following to /etc/rc.conf[.local] to enable this service +# +# compat4x_enable="YES" +# + +. %%RC_SUBR%% + +name=compat4x +rcvar=`set_rcvar` + +command=%%LDCONFIG%% +command_args='-m %%PREFIX%%/lib/compat' +%%AMD64%% +%%AMD64%%start_postcmd=${name}_poststart +%%AMD64%%compat4x_poststart () { +%%AMD64%% %%LDCONFIG%% -32 -m %%TARGET32_DIR%% +%%AMD64%%} + +load_rc_config ${name} +run_rc_command "$1" diff --git a/misc/compat4x/pkg-plist.freebsd4 b/misc/compat4x/pkg-plist.freebsd4 index 3db15e685483..da57584f7898 100644 --- a/misc/compat4x/pkg-plist.freebsd4 +++ b/misc/compat4x/pkg-plist.freebsd4 @@ -1,4 +1,3 @@ -etc/rc.d/000.compat4x.sh %%FORBIDDEN:%%lib/compat/libcrypto.so.1 %%FORBIDDEN:%%lib/compat/libcrypto.so.2 lib/compat/libfetch.so.2 diff --git a/misc/compat4x/pkg-plist.freebsd5 b/misc/compat4x/pkg-plist.freebsd5 index e11668992813..dc23fe053173 100644 --- a/misc/compat4x/pkg-plist.freebsd5 +++ b/misc/compat4x/pkg-plist.freebsd5 @@ -1,4 +1,3 @@ -etc/rc.d/000.compat4x.sh %%LIBDIR%%/compat/libc.so.4 @unexec if [ -e %B/libc_r.so.4.compat3x ]; then ln -sf libc_r.so.4.compat3x %B/libc_r.so.4; else rm %B/libc_r.so.4; fi %%LIBDIR%%/compat/libc_r.so.4.compat4x diff --git a/misc/compat5x/Makefile b/misc/compat5x/Makefile index d37e21bc3887..b6912b646c3b 100644 --- a/misc/compat5x/Makefile +++ b/misc/compat5x/Makefile @@ -11,6 +11,7 @@ PORTNAME= compat5x PORTVERSION= 5.4.0.8 +PORTREVISION= 1 CATEGORIES= misc MASTER_SITES= ${MASTER_SITE_LOCAL} MASTER_SITE_SUBDIR=lesi/compat5x @@ -28,7 +29,7 @@ INSTALLS_SHLIB= yes LDCONFIG_DIRS= %%PREFIX%%/lib/compat TARGET_DIR= ${PREFIX}/lib/compat TARGET32_DIR= ${PREFIX}/lib32/compat -RCSCRIPT= ${WRKDIR}/000.compat5x.sh +USE_RC_SUBR= ${PORTNAME}.sh .include <bsd.port.pre.mk> @@ -40,6 +41,8 @@ IGNORE= is for FreeBSD 6.x and newer RUN_DEPENDS= ${LOCALBASE}/share/compat/locale/UTF-8/LC_CTYPE:${PORTSDIR}/misc/localedata .endif +SUB_LIST+= LDCONFIG="${LDCONFIG}" + .if ${ARCH} == alpha PLIST_SUB+= ALPHA="" .else @@ -48,8 +51,10 @@ PLIST_SUB+= ALPHA="@comment " .if ${ARCH} == amd64 PLIST_SUB+= AMD64="" PLIST_SUB+= LDCONFIG_LIB32="${LDCONFIG} -32" +SUB_LIST+= AMD64="" TARGET32_DIR="${TARGET32_DIR}" .else PLIST_SUB+= AMD64="@comment " +SUB_LIST+= AMD64="@comment " .endif .if ${ARCH} == i386 PLIST_SUB+= I386="" @@ -62,12 +67,7 @@ PLIST_SUB+= SPARC64="" PLIST_SUB+= SPARC64="@comment " .endif -do-build: - ${ECHO_CMD} '#!/bin/sh' > ${RCSCRIPT} - ${ECHO_CMD} '${LDCONFIG} -m ${LDCONFIG_RUNLIST}' >> ${RCSCRIPT} -.if ${ARCH} == amd64 - ${ECHO_CMD} '${LDCONFIG} -32 -m ${TARGET32_DIR}' >> ${RCSCRIPT} -.endif +NO_BUILD= yes do-install: ${MKDIR} ${TARGET_DIR} @@ -77,6 +77,5 @@ do-install: (cd ${WRKSRC}/lib32 && ${INSTALL_DATA} *.so.* ${TARGET32_DIR}) ${LDCONFIG} -32 -m ${TARGET32_DIR} .endif - ${INSTALL_SCRIPT} ${RCSCRIPT} ${PREFIX}/etc/rc.d/ .include <bsd.port.post.mk> diff --git a/misc/compat5x/files/compat5x.sh.in b/misc/compat5x/files/compat5x.sh.in new file mode 100644 index 000000000000..963729b1a328 --- /dev/null +++ b/misc/compat5x/files/compat5x.sh.in @@ -0,0 +1,27 @@ +#!/bin/sh +# +# $FreeBSD$ +# +# PROVIDE: compat5x +# REQUIRE: mountcritremote +# +# Add the following to /etc/rc.conf[.local] to enable this service +# +# compat5x_enable="YES" +# + +. %%RC_SUBR%% + +name=compat5x +rcvar=`set_rcvar` + +command=%%LDCONFIG%% +command_args='-m %%PREFIX%%/lib/compat' +%%AMD64%% +%%AMD64%%start_postcmd=${name}_poststart +%%AMD64%%compat5x_poststart () { +%%AMD64%% %%LDCONFIG%% -32 -m %%TARGET32_DIR%% +%%AMD64%%} + +load_rc_config ${name} +run_rc_command "$1" diff --git a/misc/compat5x/pkg-plist b/misc/compat5x/pkg-plist index 501dc76f3ae4..f33d3d3e7d8b 100644 --- a/misc/compat5x/pkg-plist +++ b/misc/compat5x/pkg-plist @@ -1,4 +1,3 @@ -etc/rc.d/000.compat5x.sh lib/compat/libalias.so.4 lib/compat/libarchive.so.1 lib/compat/libasn1.so.7 |