diff options
author | Doug Barton <dougb@FreeBSD.org> | 2005-12-18 21:04:37 +0000 |
---|---|---|
committer | Doug Barton <dougb@FreeBSD.org> | 2005-12-18 21:04:37 +0000 |
commit | 08c14fd9a4ee272b0581c4e3cfdc5dcf94ee2f5a (patch) | |
tree | 72b0460d15c521cc366792290dc743647d667a2c /misc/compat4x | |
parent | 3d571a7c4d661f44d5f12bf756cb6a1fdd451a36 (diff) | |
download | ports-08c14fd9a4ee272b0581c4e3cfdc5dcf94ee2f5a.tar.gz ports-08c14fd9a4ee272b0581c4e3cfdc5dcf94ee2f5a.zip |
Notes
Diffstat (limited to 'misc/compat4x')
-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 |
4 files changed, 37 insertions, 12 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 |