2006-06-02 22:50:32 +02:00
|
|
|
# New ports collection makefile for: linux_base-fc4
|
|
|
|
# Date created: 2006-31-05
|
2006-03-18 20:07:04 +01:00
|
|
|
# Whom: bsam@ipt.ru
|
2006-06-02 22:50:32 +02:00
|
|
|
# based on ports/emulators/linux_base-fc3 by netchild and myself
|
2006-03-18 20:07:04 +01:00
|
|
|
#
|
|
|
|
# $FreeBSD$
|
|
|
|
#
|
|
|
|
|
|
|
|
PORTNAME= fc
|
2006-06-02 22:50:32 +02:00
|
|
|
PORTVERSION= 4
|
2006-06-20 15:45:27 +02:00
|
|
|
PORTREVISION= 2
|
2006-03-18 20:07:04 +01:00
|
|
|
CATEGORIES= emulators linux
|
|
|
|
MASTER_SITES= ${MASTER_SITE_FEDORA_LINUX}
|
|
|
|
MASTER_SITE_SUBDIR= ${PORTVERSION}/${LINUX_RPM_ARCH}/os/Fedora/RPMS \
|
2006-05-07 14:11:48 +02:00
|
|
|
updates/${PORTVERSION}/${LINUX_RPM_ARCH} \
|
|
|
|
${PORTVERSION}/SRPMS \
|
|
|
|
updates/${PORTVERSION}/SRPMS
|
2006-03-18 20:07:04 +01:00
|
|
|
PKGNAMEPREFIX= linux_base-
|
|
|
|
DISTFILES= ${BIN_DISTFILES} ${SRC_DISTFILES}
|
2006-05-01 00:26:05 +02:00
|
|
|
DIST_SUBDIR= rpm/${LINUX_RPM_ARCH}/fedora/${PORTVERSION}
|
2006-03-18 20:07:04 +01:00
|
|
|
EXTRACT_ONLY= ${BIN_DISTFILES}
|
|
|
|
|
|
|
|
MAINTAINER= freebsd-emulation@FreeBSD.org
|
|
|
|
COMMENT= Base set of packages needed in Linux mode (for i386/amd64)
|
|
|
|
|
2006-06-02 22:50:32 +02:00
|
|
|
BIN_DISTFILES= basesystem-8.0-5.noarch.rpm \
|
|
|
|
bash-3.0-31.${LINUX_RPM_ARCH}.rpm \
|
|
|
|
bzip2-1.0.2-16.${LINUX_RPM_ARCH}.rpm \
|
|
|
|
bzip2-libs-1.0.2-16.${LINUX_RPM_ARCH}.rpm \
|
|
|
|
compat-db-4.2.52-2.FC4.${LINUX_RPM_ARCH}.rpm \
|
2006-06-20 15:45:27 +02:00
|
|
|
compat-libstdc++-296-2.96-132.fc4.${LINUX_RPM_ARCH}.rpm \
|
2006-06-02 22:50:32 +02:00
|
|
|
compat-libstdc++-33-3.2.3-47.fc4.${LINUX_RPM_ARCH}.rpm \
|
|
|
|
coreutils-5.2.1-48.1.${LINUX_RPM_ARCH}.rpm \
|
|
|
|
db4-4.3.27-5.fc4.${LINUX_RPM_ARCH}.rpm \
|
|
|
|
elfutils-libelf-0.108-1.${LINUX_RPM_ARCH}.rpm \
|
|
|
|
fedora-release-4-2.noarch.rpm \
|
|
|
|
filesystem-2.3.4-1.${LINUX_RPM_ARCH}.rpm \
|
|
|
|
freetype-2.1.9-2.${LINUX_RPM_ARCH}.rpm \
|
|
|
|
gdbm-1.8.0-25.${LINUX_RPM_ARCH}.rpm \
|
|
|
|
glib-1.2.10-16.${LINUX_RPM_ARCH}.rpm \
|
|
|
|
glibc-2.3.6-3.${LINUX_RPM_ARCH}.rpm \
|
|
|
|
glibc-common-2.3.6-3.${LINUX_RPM_ARCH}.rpm \
|
|
|
|
grep-2.5.1-48.2.${LINUX_RPM_ARCH}.rpm \
|
|
|
|
info-4.8-8.fc4.1.${LINUX_RPM_ARCH}.rpm \
|
|
|
|
libacl-2.2.32-1.FC4.2.${LINUX_RPM_ARCH}.rpm \
|
|
|
|
libattr-2.4.24-1.FC4.1.${LINUX_RPM_ARCH}.rpm \
|
|
|
|
libgcc-4.0.2-8.fc4.${LINUX_RPM_ARCH}.rpm \
|
|
|
|
libselinux-1.23.11-1.1.${LINUX_RPM_ARCH}.rpm \
|
|
|
|
libstdc++-4.0.2-8.fc4.${LINUX_RPM_ARCH}.rpm \
|
|
|
|
libtermcap-2.0.8-41.${LINUX_RPM_ARCH}.rpm \
|
|
|
|
ncurses-5.4-19.fc4.${LINUX_RPM_ARCH}.rpm \
|
|
|
|
pcre-5.0-4.1.fc4.${LINUX_RPM_ARCH}.rpm \
|
|
|
|
popt-1.10.1-23.${LINUX_RPM_ARCH}.rpm \
|
|
|
|
readline-5.0-3.${LINUX_RPM_ARCH}.rpm \
|
|
|
|
rpm-4.4.1-23.${LINUX_RPM_ARCH}.rpm \
|
|
|
|
setserial-2.17-19.${LINUX_RPM_ARCH}.rpm \
|
|
|
|
setup-2.5.44-1.1.noarch.rpm \
|
|
|
|
slang-1.4.9-17.${LINUX_RPM_ARCH}.rpm \
|
|
|
|
termcap-5.4-7fc4.noarch.rpm \
|
|
|
|
zlib-1.2.2.2-5.fc4.${LINUX_RPM_ARCH}.rpm
|
2006-03-18 20:07:04 +01:00
|
|
|
|
|
|
|
.if defined(PACKAGE_BUILDING)
|
|
|
|
|
2006-06-02 22:50:32 +02:00
|
|
|
SRC_DISTFILES+= basesystem-8.0-5.src.rpm \
|
|
|
|
bash-3.0-31.src.rpm \
|
|
|
|
bzip2-1.0.2-16.src.rpm \
|
|
|
|
compat-db-4.2.52-2.FC4.src.rpm \
|
|
|
|
coreutils-5.2.1-48.1.src.rpm \
|
|
|
|
db4-4.3.27-5.fc4.src.rpm \
|
|
|
|
elfutils-0.108-1.src.rpm \
|
|
|
|
fedora-release-4-2.src.rpm \
|
|
|
|
filesystem-2.3.4-1.src.rpm \
|
|
|
|
freetype-2.1.9-2.src.rpm \
|
|
|
|
gdbm-1.8.0-25.src.rpm \
|
|
|
|
glib-1.2.10-16.src.rpm \
|
|
|
|
glibc-2.3.6-3.src.rpm \
|
|
|
|
grep-2.5.1-48.2.src.rpm \
|
|
|
|
acl-2.2.32-1.FC4.2.src.rpm \
|
|
|
|
attr-2.4.24-1.FC4.1.src.rpm \
|
|
|
|
gcc-4.0.2-8.fc4.src.rpm \
|
|
|
|
libselinux-1.23.11-1.1.src.rpm \
|
|
|
|
libtermcap-2.0.8-41.src.rpm \
|
|
|
|
ncurses-5.4-19.fc4.src.rpm \
|
|
|
|
pcre-5.0-4.1.fc4.src.rpm \
|
|
|
|
readline-5.0-3.src.rpm \
|
|
|
|
rpm-4.4.1-23.src.rpm \
|
|
|
|
setserial-2.17-19.src.rpm \
|
|
|
|
setup-2.5.44-1.1.src.rpm \
|
|
|
|
slang-1.4.9-17.src.rpm \
|
|
|
|
termcap-5.4-7fc4.src.rpm \
|
|
|
|
zlib-1.2.2.2-5.fc4.src.rpm
|
|
|
|
|
|
|
|
ALWAYS_KEEP_DISTFILES= yes
|
2006-03-18 20:07:04 +01:00
|
|
|
.endif
|
|
|
|
|
|
|
|
CONFLICTS= linux_base-7* linux_base-deb* linux_base-gentoo* \
|
2006-05-07 14:11:48 +02:00
|
|
|
linux_base-rh-9* linux_base-suse-9* linux_base-8* \
|
2006-06-10 15:35:52 +02:00
|
|
|
linux_base-fc3 linux-libgcc* linux_locale*
|
2006-03-18 20:07:04 +01:00
|
|
|
ONLY_FOR_ARCHS= i386 amd64
|
|
|
|
LINUX_RPM_ARCH= i386
|
|
|
|
PREFIX?= ${LINUXBASE}
|
|
|
|
NO_FILTER_SHLIBS= yes
|
|
|
|
NO_MTREE= yes
|
|
|
|
NO_WRKSUBDIR= yes
|
|
|
|
MD5_FILE?= ${MASTERDIR}/distinfo.${LINUX_RPM_ARCH}
|
2006-05-07 14:11:48 +02:00
|
|
|
PLIST_SUB= GLIBCVER="2.3.6"
|
2006-03-18 20:07:04 +01:00
|
|
|
|
2006-06-02 22:50:32 +02:00
|
|
|
RPM2CPIO?= ${LOCALBASE}/bin/rpm2cpio
|
2006-03-18 20:07:04 +01:00
|
|
|
|
2006-06-02 22:50:32 +02:00
|
|
|
EXTRACT_DEPENDS+= ${RPM2CPIO}:${PORTSDIR}/archivers/rpm
|
2006-03-18 20:07:04 +01:00
|
|
|
|
2006-05-14 17:44:11 +02:00
|
|
|
EXTRACT_ONLY= ${BIN_DISTFILES}
|
|
|
|
EXTRACT_CMD?= ${RPM2CPIO}
|
2006-03-18 20:07:04 +01:00
|
|
|
EXTRACT_BEFORE_ARGS?=
|
|
|
|
EXTRACT_AFTER_ARGS?= | ${CPIO} -id --quiet
|
|
|
|
|
|
|
|
PLIST= pkg-plist
|
|
|
|
|
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
|
2006-06-02 22:50:32 +02:00
|
|
|
REMOVE_DIRS= boot dev home initrd root tmp var/log var/run var/tmp \
|
|
|
|
usr/local usr/tmp
|
2006-03-18 20:07:04 +01:00
|
|
|
REMOVE_FILES= bin/df bin/su etc/exports etc/group etc/localtime \
|
|
|
|
etc/motd etc/passwd etc/printcap etc/services \
|
|
|
|
etc/protocols
|
|
|
|
ADD_FILES= var/lib/rpm/packages.rpm \
|
|
|
|
var/lib/rpm/nameindex.rpm \
|
|
|
|
var/lib/rpm/fileindex.rpm \
|
|
|
|
var/lib/rpm/providesindex.rpm \
|
|
|
|
var/lib/rpm/requiredby.rpm \
|
|
|
|
var/lib/rpm/conflictsindex.rpm \
|
|
|
|
var/lib/rpm/groupindex.rpm \
|
|
|
|
var/lib/rpm/triggerindex.rpm
|
|
|
|
|
|
|
|
.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 17:15:30 +02:00
|
|
|
do-build:
|
2006-03-18 20:07:04 +01:00
|
|
|
@for D in ${REMOVE_DIRS}; do \
|
|
|
|
${RM} -rf ${WRKSRC}/$$D; \
|
|
|
|
done
|
|
|
|
@for F in ${REMOVE_FILES}; do \
|
|
|
|
${RM} -f ${WRKSRC}/$$F; \
|
|
|
|
done
|
|
|
|
@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
|
|
|
|
|
|
|
|
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}
|
|
|
|
|
|
|
|
@${FIND} ${PREFIX}/bin ${PREFIX}/sbin/ ${PREFIX}/usr/bin \
|
|
|
|
${PREFIX}/usr/sbin -type f -print0 | ${XARGS} -0 ${FILE} \
|
|
|
|
| ${GREP} ELF | ${CUT} -d : -f 1 \
|
|
|
|
| ${XARGS} ${BRANDELF} -t Linux
|
|
|
|
@${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
|
|
|
|
|
|
|
|
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>
|