summaryrefslogtreecommitdiffstats
path: root/misc
diff options
context:
space:
mode:
authordougb <dougb@FreeBSD.org>2005-12-18 21:04:37 +0000
committerdougb <dougb@FreeBSD.org>2005-12-18 21:04:37 +0000
commit6ca3aa6177abe2833e2612ac019e1ff735ed6d20 (patch)
treeb6bbabd33f96946fe63ad48633257acbd2a28d3d /misc
parentf0b2b44a8de4201946322b25d2b9cd65655ac31d (diff)
downloadFreeBSD-ports-6ca3aa6177abe2833e2612ac019e1ff735ed6d20.zip
FreeBSD-ports-6ca3aa6177abe2833e2612ac019e1ff735ed6d20.tar.gz
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.
Diffstat (limited to 'misc')
-rw-r--r--misc/compat4x/Makefile20
-rw-r--r--misc/compat4x/files/compat4x.sh.in27
-rw-r--r--misc/compat4x/pkg-plist.freebsd41
-rw-r--r--misc/compat4x/pkg-plist.freebsd51
-rw-r--r--misc/compat5x/Makefile15
-rw-r--r--misc/compat5x/files/compat5x.sh.in27
-rw-r--r--misc/compat5x/pkg-plist1
7 files changed, 71 insertions, 21 deletions
diff --git a/misc/compat4x/Makefile b/misc/compat4x/Makefile
index cd1b15c..d0ac38d 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 0000000..5ef8d48
--- /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 3db15e6..da57584 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 e116689..dc23fe0 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 d37e21b..b6912b6 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 0000000..963729b
--- /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 501dc76..f33d3d3 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
OpenPOWER on IntegriCloud