2008-03-26 13:47:50 +00:00
|
|
|
# New ports collection makefile for: linux_base-f8
|
|
|
|
# Date created: 18 Mar 2008
|
2007-03-27 20:04:44 +00:00
|
|
|
# Whom: Boris Samorodov <bsam@FreeBSD.org>
|
2006-03-18 19:07:04 +00:00
|
|
|
#
|
|
|
|
# $FreeBSD$
|
|
|
|
#
|
|
|
|
|
2008-03-26 13:47:50 +00:00
|
|
|
PORTNAME= f8
|
|
|
|
PORTVERSION= 8
|
2009-01-28 22:16:43 +00:00
|
|
|
PORTREVISION= 11
|
2006-03-18 19:07:04 +00:00
|
|
|
CATEGORIES= emulators linux
|
|
|
|
MASTER_SITES= ${MASTER_SITE_FEDORA_LINUX}
|
2008-03-26 13:47:50 +00:00
|
|
|
MASTER_SITE_SUBDIR= ../releases/${PORTVERSION}/Everything/${LINUX_RPM_ARCH}/os/Packages \
|
2008-10-02 16:46:01 +00:00
|
|
|
../updates/${PORTVERSION}/${LINUX_RPM_ARCH}.newkey
|
2006-03-18 19:07:04 +00:00
|
|
|
PKGNAMEPREFIX= linux_base-
|
|
|
|
DISTFILES= ${BIN_DISTFILES} ${SRC_DISTFILES}
|
2008-10-12 17:42:44 +00:00
|
|
|
DIST_SUBDIR= rpm/${LINUX_RPM_ARCH}/fedora/${PORTVERSION}.newkey
|
2006-03-18 19:07:04 +00:00
|
|
|
EXTRACT_ONLY= ${BIN_DISTFILES}
|
2007-03-27 20:04:44 +00:00
|
|
|
MAINTAINER= bsam@FreeBSD.org
|
2006-03-18 19:07:04 +00:00
|
|
|
COMMENT= Base set of packages needed in Linux mode (for i386/amd64)
|
|
|
|
|
2007-09-23 16:33:56 +00:00
|
|
|
BIN_DISTFILES= basesystem-8.1-1.noarch.rpm \
|
2008-03-26 13:47:50 +00:00
|
|
|
bash-3.2-20.fc8.${LINUX_RPM_ARCH}.rpm \
|
|
|
|
bzip2-1.0.4-12.fc8.${LINUX_RPM_ARCH}.rpm \
|
|
|
|
bzip2-libs-1.0.4-12.fc8.${LINUX_RPM_ARCH}.rpm \
|
|
|
|
compat-db-4.5.20-3.fc8.${LINUX_RPM_ARCH}.rpm \
|
|
|
|
compat-libstdc++-296-2.96-139.${LINUX_RPM_ARCH}.rpm \
|
|
|
|
compat-libstdc++-33-3.2.3-62.${LINUX_RPM_ARCH}.rpm \
|
2008-10-27 19:36:02 +00:00
|
|
|
coreutils-6.9-19.fc8.${LINUX_RPM_ARCH}.rpm \
|
2009-01-28 22:16:43 +00:00
|
|
|
db4-4.6.21-3.fc8.${LINUX_RPM_ARCH}.rpm \
|
|
|
|
e2fsprogs-1.40.4-3.fc8.${LINUX_RPM_ARCH}.rpm \
|
|
|
|
e2fsprogs-libs-1.40.4-3.fc8.${LINUX_RPM_ARCH}.rpm \
|
2009-01-04 14:11:56 +00:00
|
|
|
elfutils-0.137-3.fc8.${LINUX_RPM_ARCH}.rpm \
|
2008-10-27 19:36:02 +00:00
|
|
|
fedora-release-8-6.transition.noarch.rpm \
|
2008-03-26 13:47:50 +00:00
|
|
|
filesystem-2.4.11-1.fc8.${LINUX_RPM_ARCH}.rpm \
|
2009-01-28 22:16:43 +00:00
|
|
|
freetype-2.3.5-5.fc8.${LINUX_RPM_ARCH}.rpm \
|
2007-09-23 16:33:56 +00:00
|
|
|
gdbm-1.8.0-27.fc7.${LINUX_RPM_ARCH}.rpm \
|
2008-04-17 15:54:58 +00:00
|
|
|
glib-1.2.10-28.fc8.${LINUX_RPM_ARCH}.rpm \
|
2008-10-02 16:46:01 +00:00
|
|
|
glib2-2.14.6-2.fc8.${LINUX_RPM_ARCH}.rpm \
|
2008-03-26 13:47:50 +00:00
|
|
|
glibc-2.7-2.${LINUX_RPM_ARCH}.rpm \
|
|
|
|
glibc-common-2.7-2.${LINUX_RPM_ARCH}.rpm \
|
2007-09-23 16:33:56 +00:00
|
|
|
grep-2.5.1-57.fc7.${LINUX_RPM_ARCH}.rpm \
|
2008-10-13 10:54:33 +00:00
|
|
|
info-4.11-5.fc8.${LINUX_RPM_ARCH}.rpm \
|
2008-10-03 12:13:46 +00:00
|
|
|
keyutils-libs-1.2-2.fc6.${LINUX_RPM_ARCH}.rpm \
|
2008-07-22 12:48:11 +00:00
|
|
|
krb5-libs-1.6.2-14.fc8.${LINUX_RPM_ARCH}.rpm \
|
2008-10-02 16:46:01 +00:00
|
|
|
libacl-2.2.39-14.fc8.${LINUX_RPM_ARCH}.rpm \
|
2008-03-26 13:47:50 +00:00
|
|
|
libattr-2.4.38-2.fc8.${LINUX_RPM_ARCH}.rpm \
|
|
|
|
libgcc-4.1.2-33.${LINUX_RPM_ARCH}.rpm \
|
|
|
|
libselinux-2.0.43-1.fc8.${LINUX_RPM_ARCH}.rpm \
|
|
|
|
libsepol-2.0.15-1.fc8.${LINUX_RPM_ARCH}.rpm \
|
|
|
|
libstdc++-4.1.2-33.${LINUX_RPM_ARCH}.rpm \
|
|
|
|
libtermcap-2.0.8-47.${LINUX_RPM_ARCH}.rpm \
|
|
|
|
ncurses-5.6-12.20070812.fc8.${LINUX_RPM_ARCH}.rpm \
|
2008-10-02 16:46:01 +00:00
|
|
|
pcre-7.3-4.fc8.${LINUX_RPM_ARCH}.rpm \
|
|
|
|
popt-1.13-4.fc8.${LINUX_RPM_ARCH}.rpm \
|
2008-03-26 13:47:50 +00:00
|
|
|
readline-5.2-10.fc8.${LINUX_RPM_ARCH}.rpm \
|
|
|
|
setserial-2.17-21.fc8.${LINUX_RPM_ARCH}.rpm \
|
|
|
|
setup-2.6.10-1.fc8.noarch.rpm \
|
|
|
|
slang-2.1.2-2.fc8.${LINUX_RPM_ARCH}.rpm \
|
2007-03-27 20:04:44 +00:00
|
|
|
termcap-5.5-1.20060701.1.noarch.rpm \
|
2008-03-26 13:47:50 +00:00
|
|
|
zlib-1.2.3-14.fc8.${LINUX_RPM_ARCH}.rpm
|
2006-03-18 19:07:04 +00:00
|
|
|
|
|
|
|
.if defined(PACKAGE_BUILDING)
|
|
|
|
|
2008-03-26 13:47:50 +00:00
|
|
|
MASTER_SITE_SUBDIR+= ../releases/${PORTVERSION}/Everything/source/SRPMS/ \
|
2008-10-02 16:46:01 +00:00
|
|
|
../updates/${PORTVERSION}/SRPMS.newkey
|
2007-09-23 16:33:56 +00:00
|
|
|
|
2008-10-02 16:46:01 +00:00
|
|
|
SRC_DISTFILES+= acl-2.2.39-14.fc8.src.rpm \
|
2008-03-26 13:47:50 +00:00
|
|
|
attr-2.4.38-2.fc8.src.rpm \
|
2007-09-23 16:33:56 +00:00
|
|
|
basesystem-8.1-1.src.rpm \
|
2008-03-26 13:47:50 +00:00
|
|
|
bash-3.2-20.fc8.src.rpm \
|
|
|
|
bzip2-1.0.4-12.fc8.src.rpm \
|
|
|
|
compat-db-4.5.20-3.fc8.src.rpm \
|
2008-10-27 19:36:02 +00:00
|
|
|
coreutils-6.9-19.fc8.src.rpm \
|
2009-01-28 22:16:43 +00:00
|
|
|
db4-4.6.21-3.fc8.src.rpm \
|
|
|
|
e2fsprogs-1.40.4-3.fc8.src.rpm \
|
2009-01-04 14:11:56 +00:00
|
|
|
elfutils-0.137-3.fc8.src.rpm \
|
2008-10-27 19:36:02 +00:00
|
|
|
fedora-release-8-6.transition.src.rpm \
|
2008-03-26 13:47:50 +00:00
|
|
|
filesystem-2.4.11-1.fc8.src.rpm \
|
2009-01-28 22:16:43 +00:00
|
|
|
freetype-2.3.5-5.fc8.src.rpm \
|
2008-03-26 13:47:50 +00:00
|
|
|
gcc-4.1.2-33.src.rpm \
|
2007-09-23 16:33:56 +00:00
|
|
|
gdbm-1.8.0-27.fc7.src.rpm \
|
2008-04-17 15:54:58 +00:00
|
|
|
glib-1.2.10-28.fc8.src.rpm \
|
2008-10-02 16:46:01 +00:00
|
|
|
glib2-2.14.6-2.fc8.src.rpm \
|
2008-03-26 13:47:50 +00:00
|
|
|
glibc-2.7-2.src.rpm \
|
2007-09-23 16:33:56 +00:00
|
|
|
grep-2.5.1-57.fc7.src.rpm \
|
2008-10-03 12:13:46 +00:00
|
|
|
keyutils-1.2-2.fc6.src.rpm \
|
2008-07-22 12:48:11 +00:00
|
|
|
krb5-1.6.2-14.fc8.src.rpm \
|
2008-03-26 13:47:50 +00:00
|
|
|
libselinux-2.0.43-1.fc8.src.rpm \
|
|
|
|
libsepol-2.0.15-1.fc8.src.rpm \
|
|
|
|
libtermcap-2.0.8-47.src.rpm \
|
|
|
|
ncurses-5.6-12.20070812.fc8.src.rpm \
|
2008-10-02 16:46:01 +00:00
|
|
|
pcre-7.3-4.fc8.src.rpm \
|
2008-03-26 13:47:50 +00:00
|
|
|
readline-5.2-10.fc8.src.rpm \
|
|
|
|
setserial-2.17-21.fc8.src.rpm \
|
|
|
|
setup-2.6.10-1.fc8.src.rpm \
|
|
|
|
slang-2.1.2-2.fc8.src.rpm \
|
2007-03-27 20:04:44 +00:00
|
|
|
termcap-5.5-1.20060701.1.src.rpm \
|
2008-10-13 10:54:33 +00:00
|
|
|
texinfo-4.11-5.fc8.src.rpm \
|
2008-03-26 13:47:50 +00:00
|
|
|
zlib-1.2.3-14.fc8.src.rpm
|
2006-06-02 20:50:32 +00:00
|
|
|
|
|
|
|
ALWAYS_KEEP_DISTFILES= yes
|
2006-03-18 19:07:04 +00:00
|
|
|
.endif
|
|
|
|
|
2008-10-13 10:54:33 +00:00
|
|
|
CONFLICTS= linux_base-gentoo* linux_base-fc4 linux_base-fc6 \
|
|
|
|
linux_base-f7 linux-glib2
|
2006-03-18 19:07:04 +00:00
|
|
|
ONLY_FOR_ARCHS= i386 amd64
|
|
|
|
LINUX_RPM_ARCH= i386
|
2006-06-23 12:23:47 +00:00
|
|
|
USE_LINUX_PREFIX= yes
|
2006-03-18 19:07:04 +00:00
|
|
|
NO_WRKSUBDIR= yes
|
|
|
|
MD5_FILE?= ${MASTERDIR}/distinfo.${LINUX_RPM_ARCH}
|
2008-03-26 13:47:50 +00:00
|
|
|
PLIST_SUB= GLIBCVER="2.7"
|
2006-03-18 19:07:04 +00:00
|
|
|
|
2006-06-02 20:50:32 +00:00
|
|
|
RPM2CPIO?= ${LOCALBASE}/bin/rpm2cpio
|
2006-03-18 19:07:04 +00:00
|
|
|
|
2006-06-02 20:50:32 +00:00
|
|
|
EXTRACT_DEPENDS+= ${RPM2CPIO}:${PORTSDIR}/archivers/rpm
|
2006-03-18 19:07:04 +00:00
|
|
|
|
2006-05-14 15:44:11 +00:00
|
|
|
EXTRACT_ONLY= ${BIN_DISTFILES}
|
|
|
|
EXTRACT_CMD?= ${RPM2CPIO}
|
2006-03-18 19:07:04 +00:00
|
|
|
EXTRACT_BEFORE_ARGS?=
|
|
|
|
EXTRACT_AFTER_ARGS?= | ${CPIO} -id --quiet
|
|
|
|
|
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
|
2007-04-11 12:10:19 +00:00
|
|
|
LINUX_OSRELEASE!= ${ECHO_CMD} `${SYSCTL} -n compat.linux.osrelease 2>/dev/null`
|
2007-03-27 20:04:44 +00:00
|
|
|
|
2007-04-11 11:42:34 +00:00
|
|
|
.if ${LINUX_OSRELEASE}x == "x"
|
|
|
|
IGNORE= linuxulator is not (kld)loaded
|
|
|
|
.elif ${LINUX_OSRELEASE} == "2.4.2"
|
|
|
|
IGNORE= compat.linux.osrelease: 2.4.2 is not supported
|
2007-03-27 20:04:44 +00:00
|
|
|
.endif
|
|
|
|
|
2008-04-15 13:45:09 +00:00
|
|
|
REMOVE_DIRS= boot dev etc/fonts home initrd root tmp var/log var/run var/tmp \
|
2006-06-02 20:50:32 +00:00
|
|
|
usr/local usr/tmp
|
2006-03-18 19:07:04 +00:00
|
|
|
REMOVE_FILES= bin/df bin/su etc/exports etc/group etc/localtime \
|
|
|
|
etc/motd etc/passwd etc/printcap etc/services \
|
|
|
|
etc/protocols
|
2007-09-26 12:48:47 +00:00
|
|
|
ADD_DIRS= usr/X11R6/share usr/X11R6/man usr/X11R6/lib/tls \
|
|
|
|
usr/X11R6/include usr/X11R6/bin
|
2007-09-17 16:26:37 +00:00
|
|
|
ADD_FILES= #empty
|
2006-03-18 19:07:04 +00:00
|
|
|
|
|
|
|
.if (${MACHINE_ARCH} == "amd64")
|
|
|
|
FALLBACK_ELF_MIB= kern.elf32.fallback_brand
|
|
|
|
.else
|
|
|
|
FALLBACK_ELF_MIB= kern.fallback_elf_brand
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.if (${ARCH} == "amd64")
|
|
|
|
LATEST_LINK:= ${LATEST_LINK:C/linux/linux32/}
|
|
|
|
ARCH= i386
|
|
|
|
.endif
|
|
|
|
|
2006-04-02 15:15:30 +00:00
|
|
|
do-build:
|
2006-03-18 19:07:04 +00:00
|
|
|
@for D in ${REMOVE_DIRS}; do \
|
|
|
|
${RM} -rf ${WRKSRC}/$$D; \
|
|
|
|
done
|
|
|
|
@for F in ${REMOVE_FILES}; do \
|
|
|
|
${RM} -f ${WRKSRC}/$$F; \
|
|
|
|
done
|
2007-09-26 12:48:47 +00:00
|
|
|
@for F in ${ADD_DIRS}; do \
|
|
|
|
${MKDIR} -p ${WRKSRC}/$$F; \
|
|
|
|
done
|
2006-03-18 19:07:04 +00:00
|
|
|
@for F in ${ADD_FILES}; do \
|
|
|
|
${TOUCH} ${WRKSRC}/$$F; \
|
|
|
|
done
|
|
|
|
#
|
|
|
|
# Create a good ld.so.conf and touch ld.so.cache
|
|
|
|
#
|
|
|
|
@${ECHO_CMD} -e '/lib\n/usr/lib\n${X11BASE}/lib' >> \
|
|
|
|
${WRKSRC}/etc/ld.so.conf
|
|
|
|
@${TOUCH} ${WRKSRC}/etc/ld.so.cache
|
|
|
|
#
|
|
|
|
# Create yp.conf as a hint to NIS users and make sure there's a
|
|
|
|
# mtab in etc, albeit an empty one. This is needed in a couple of
|
|
|
|
# cases. Most notably staroffice6. If yp.conf exists install only
|
|
|
|
# yp.conf.sample
|
|
|
|
#
|
|
|
|
@${INSTALL} ${COPY} -m 644 ${FILESDIR}/yp.conf.sample ${WRKSRC}/etc
|
|
|
|
@${TOUCH} ${WRKSRC}/etc/mtab
|
|
|
|
#
|
|
|
|
# If ${PREFIX}/etc/nsswitch.conf exists, don't touch it,
|
|
|
|
# install only ${PREFIX}/etc/nsswitch.conf.dist
|
|
|
|
#
|
|
|
|
@${MV} ${WRKSRC}/etc/nsswitch.conf ${WRKSRC}/etc/nsswitch.conf.dist
|
2006-08-12 07:00:35 +00:00
|
|
|
@${MV} ${WRKSRC}/etc/krb5.conf ${WRKSRC}/etc/krb5.conf.dist
|
2006-03-18 19:07:04 +00:00
|
|
|
|
2006-07-10 22:48:01 +00:00
|
|
|
# Fix usr/bin/*db4* permissions to allow "portupgrade -s"
|
|
|
|
@${CHMOD} u+w ${WRKSRC}/usr/bin/*db4*
|
|
|
|
|
2006-06-23 17:07:39 +00:00
|
|
|
@${FIND} ${WRKSRC}/bin ${WRKSRC}/sbin/ ${WRKSRC}/usr/bin \
|
|
|
|
${WRKSRC}/usr/sbin -type f -print0 | ${XARGS} -0 ${FILE} \
|
|
|
|
| ${GREP} ELF | ${CUT} -d : -f 1 \
|
|
|
|
| ${XARGS} ${BRANDELF} -t Linux
|
2008-03-26 13:47:50 +00:00
|
|
|
@${BRANDELF} -t Linux ${WRKSRC}/lib/ld-2.7.so
|
2006-06-23 17:07:39 +00:00
|
|
|
|
2006-07-10 22:48:01 +00:00
|
|
|
# Restore the status quo for usr/bin/*db4* files
|
|
|
|
@${CHMOD} u-w ${WRKSRC}/usr/bin/*db4*
|
|
|
|
|
2006-03-18 19:07:04 +00:00
|
|
|
do-install:
|
|
|
|
#
|
|
|
|
# Handle the loading of the linux loadable kernel module if required.
|
|
|
|
#
|
|
|
|
@${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
|
|
|
|
#
|
|
|
|
# Do install without using linux rpm system
|
|
|
|
#
|
|
|
|
@cd ${WRKSRC} && ${FIND} * -type d -exec ${MKDIR} "${PREFIX}/{}" \;
|
|
|
|
@cd ${WRKSRC} && ${FIND} * ! -type d \
|
|
|
|
| ${CPIO} -pm -R root:wheel ${PREFIX}
|
|
|
|
|
|
|
|
@${LN} -sf /var/tmp ${PREFIX}/usr/tmp
|
|
|
|
@${CHOWN} root:wheel ${PREFIX}/var/lock ${PREFIX}/var/spool/mail
|
|
|
|
@${CHMOD} 755 ${PREFIX}/var/lock ${PREFIX}/var/spool/mail
|
2008-03-29 15:02:25 +00:00
|
|
|
#
|
2008-10-05 02:49:27 +00:00
|
|
|
# Let some linux applications (e.g. print/acroread8) print with default settings
|
2008-03-29 15:02:25 +00:00
|
|
|
#
|
|
|
|
@${INSTALL_SCRIPT} ${FILESDIR}/lp ${PREFIX}/usr/bin
|
2006-03-18 19:07:04 +00:00
|
|
|
|
|
|
|
post-install:
|
|
|
|
#
|
|
|
|
# Handle mounting linux procfs if exists at /etc/fstab and
|
|
|
|
# installing etc/nsswitch.conf, etc/yp.conf if so far they don't exist
|
|
|
|
#
|
|
|
|
@PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
|
|
|
|
#
|
|
|
|
# And finally show the pkg-message
|
|
|
|
#
|
|
|
|
@${ECHO} ''
|
|
|
|
@${CAT} ${PKGMESSAGE}
|
|
|
|
@${ECHO} ''
|
|
|
|
|
|
|
|
.include <bsd.port.post.mk>
|