summaryrefslogtreecommitdiff
path: root/misc/compat5x
diff options
context:
space:
mode:
authorDoug Barton <dougb@FreeBSD.org>2005-12-18 21:04:37 +0000
committerDoug Barton <dougb@FreeBSD.org>2005-12-18 21:04:37 +0000
commit08c14fd9a4ee272b0581c4e3cfdc5dcf94ee2f5a (patch)
tree72b0460d15c521cc366792290dc743647d667a2c /misc/compat5x
parentUpgrade to version 0.9.16.010. (diff)
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.
Notes
Notes: svn path=/head/; revision=151512
Diffstat (limited to 'misc/compat5x')
-rw-r--r--misc/compat5x/Makefile15
-rw-r--r--misc/compat5x/files/compat5x.sh.in27
-rw-r--r--misc/compat5x/pkg-plist1
3 files changed, 34 insertions, 9 deletions
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