Changeset View
Changeset View
Standalone View
Standalone View
emulators/linux_base-c6/Makefile
# Created by: Svyatoslav Lempert <svyatoslav.lempert@gmail dot com> | # Created by: Svyatoslav Lempert <svyatoslav.lempert@gmail dot com> | ||||
# $FreeBSD$ | # $FreeBSD$ | ||||
PORTNAME= c6 | PORTNAME= c6 | ||||
PORTVERSION= 6.6 | PORTVERSION= 6.6 | ||||
PORTREVISION= 5 | PORTREVISION= 6 | ||||
CATEGORIES= emulators linux | CATEGORIES= emulators linux | ||||
MASTER_SITES= CENTOS_LINUX CENTOS_LINUX_UPDATES | MASTER_SITES= CENTOS_LINUX CENTOS_LINUX_UPDATES | ||||
MASTER_SITE_SUBDIR= centos/${LINUX_DIST_VER}/os/${LINUX_REPO_ARCH}/Packages/\ | |||||
centos/${LINUX_DIST_VER}/updates/${LINUX_REPO_ARCH}/Packages/ \ | |||||
${LINUX_DIST_VER}/os/${LINUX_REPO_ARCH}/Packages/ | |||||
PKGNAMEPREFIX= linux_base- | PKGNAMEPREFIX= linux_base- | ||||
DISTFILES= ${PRE_BIN_DISTFILES} ${BIN_DISTFILES} ${SRC_DISTFILES} | DISTFILES= ${PRE_BIN_DISTFILES} ${BIN_DISTFILES} ${SRC_DISTFILES} | ||||
EXTRACT_ONLY= ${BIN_DISTFILES} | EXTRACT_ONLY= ${BIN_DISTFILES} | ||||
MAINTAINER= emulation@FreeBSD.org | MAINTAINER= emulation@FreeBSD.org | ||||
COMMENT= Base set of packages needed in Linux mode for i386/amd64 (Linux CentOS 6) | COMMENT= Base set of packages needed in Linux mode for i386/amd64 (Linux CentOS 6) | ||||
LINUX_DIST= centos | LINUX_DIST= centos | ||||
LINUX_DIST_VER=6.6 | LINUX_DIST_VER=6.6 | ||||
DIST_SUBDIR= rpm/${LINUX_RPM_ARCH}/${LINUX_DIST}/${LINUX_DIST_VER} | DIST_SUBDIR= rpm/${LINUX_RPM_ARCH}/${LINUX_DIST}/${LINUX_DIST_VER} | ||||
# these get extracted from pre-extract, then some directory permissions | # these get extracted from pre-extract, then some directory permissions | ||||
# get fixed up | # get fixed up | ||||
PRE_BIN_DISTFILES= filesystem-2.4.30-3.el6.${LINUX_RPM_ARCH}.rpm \ | PRE_BIN_DISTFILES= filesystem-2.4.30-3.el6.${LINUX_RPM_ARCH}.rpm \ | ||||
setup-2.8.14-20.el6_4.1.noarch.rpm | setup-2.8.14-20.el6_4.1.noarch.rpm | ||||
BIN_DISTFILES= basesystem-10.0-4.el6.noarch.rpm \ | BIN_DISTFILES= basesystem-10.0-4.el6.noarch.rpm \ | ||||
bash-4.1.2-29.el6.${LINUX_RPM_ARCH}.rpm \ | bash-4.1.2-29.el6.${LINUX_RPM_ARCH}.rpm \ | ||||
bzip2-1.0.5-7.el6_0.${LINUX_RPM_ARCH}.rpm \ | bzip2-1.0.5-7.el6_0.${LINUX_RPM_ARCH}.rpm \ | ||||
bzip2-libs-1.0.5-7.el6_0.${LINUX_RPM_ARCH}.rpm \ | bzip2-libs-1.0.5-7.el6_0.${LINUX_RPM_ARCH}.rpm \ | ||||
centos-release-6-6.el6.centos.12.2.${LINUX_RPM_ARCH}.rpm \ | centos-release-6-6.el6.centos.12.2.${LINUX_RPM_ARCH}.rpm \ | ||||
compat-db43-4.3.29-15.el6.${LINUX_RPM_ARCH}.rpm \ | compat-db43-4.3.29-15.el6.${LINUX_RPM_ARCH}.rpm \ | ||||
compat-libstdc++-33-3.2.3-69.el6.${LINUX_RPM_ARCH}.rpm \ | compat-libstdc++-33-3.2.3-69.el6.${LINUX_RPM_ARCH}.rpm \ | ||||
compat-libstdc++-296-2.96-144.el6.${LINUX_RPM_ARCH}.rpm \ | compat-libstdc++-296-2.96-144.el6.i686.rpm \ | ||||
coreutils-8.4-37.el6.${LINUX_RPM_ARCH}.rpm \ | coreutils-8.4-37.el6.${LINUX_RPM_ARCH}.rpm \ | ||||
db4-4.7.25-19.el6_6.${LINUX_RPM_ARCH}.rpm \ | db4-4.7.25-19.el6_6.${LINUX_RPM_ARCH}.rpm \ | ||||
e2fsprogs-1.41.12-21.el6.${LINUX_RPM_ARCH}.rpm \ | e2fsprogs-1.41.12-21.el6.${LINUX_RPM_ARCH}.rpm \ | ||||
e2fsprogs-libs-1.41.12-21.el6.${LINUX_RPM_ARCH}.rpm \ | e2fsprogs-libs-1.41.12-21.el6.${LINUX_RPM_ARCH}.rpm \ | ||||
elfutils-0.158-3.2.el6.${LINUX_RPM_ARCH}.rpm \ | elfutils-0.158-3.2.el6.${LINUX_RPM_ARCH}.rpm \ | ||||
findutils-4.4.2-6.el6.${LINUX_RPM_ARCH}.rpm \ | findutils-4.4.2-6.el6.${LINUX_RPM_ARCH}.rpm \ | ||||
freetype-2.3.11-15.el6_6.1.${LINUX_RPM_ARCH}.rpm \ | freetype-2.3.11-15.el6_6.1.${LINUX_RPM_ARCH}.rpm \ | ||||
gamin-0.1.10-9.el6.${LINUX_RPM_ARCH}.rpm \ | gamin-0.1.10-9.el6.${LINUX_RPM_ARCH}.rpm \ | ||||
Show All 28 Lines | BIN_DISTFILES= basesystem-10.0-4.el6.noarch.rpm \ | ||||
sed-4.2.1-10.el6.${LINUX_RPM_ARCH}.rpm \ | sed-4.2.1-10.el6.${LINUX_RPM_ARCH}.rpm \ | ||||
setserial-2.17-25.el6.${LINUX_RPM_ARCH}.rpm \ | setserial-2.17-25.el6.${LINUX_RPM_ARCH}.rpm \ | ||||
slang-2.2.1-1.el6.${LINUX_RPM_ARCH}.rpm \ | slang-2.2.1-1.el6.${LINUX_RPM_ARCH}.rpm \ | ||||
util-linux-ng-2.17.2-12.18.el6.${LINUX_RPM_ARCH}.rpm \ | util-linux-ng-2.17.2-12.18.el6.${LINUX_RPM_ARCH}.rpm \ | ||||
which-2.19-6.el6.${LINUX_RPM_ARCH}.rpm \ | which-2.19-6.el6.${LINUX_RPM_ARCH}.rpm \ | ||||
zlib-1.2.3-29.el6.${LINUX_RPM_ARCH}.rpm | zlib-1.2.3-29.el6.${LINUX_RPM_ARCH}.rpm | ||||
.if defined(PACKAGE_BUILDING) | .if defined(PACKAGE_BUILDING) | ||||
SRC_DISTFILES= basesystem-10.0-4.el6.src.rpm \ | SRC_DISTFILES= basesystem-10.0-4.el6.src.rpm:SOURCE \ | ||||
bash-4.1.2-29.el6.src.rpm \ | bash-4.1.2-29.el6.src.rpm:SOURCE \ | ||||
bzip2-1.0.5-7.el6_0.src.rpm \ | bzip2-1.0.5-7.el6_0.src.rpm:SOURCE \ | ||||
centos-release-6-6.el6.centos.12.2.src.rpm \ | coreutils-8.4-37.el6.src.rpm:SOURCE \ | ||||
compat-db-4.6.21-15.el6.src.rpm \ | compat-db-4.6.21-15.el6.src.rpm:SOURCE \ | ||||
compat-gcc-296-2.96-144.el6.src.rpm \ | compat-gcc-296-2.96-144.el6.src.rpm:SOURCE \ | ||||
compat-gcc-32-3.2.3-69.el6.src.rpm \ | compat-gcc-32-3.2.3-69.el6.src.rpm:SOURCE \ | ||||
coreutils-8.4-37.el6.src.rpm \ | db4-4.7.25-19.el6_6.src.rpm:SOURCE \ | ||||
db4-4.7.25-19.el6_6.src.rpm \ | e2fsprogs-1.41.12-21.el6.src.rpm:SOURCE \ | ||||
e2fsprogs-1.41.12-21.el6.src.rpm \ | elfutils-0.158-3.2.el6.src.rpm:SOURCE \ | ||||
elfutils-0.158-3.2.el6.src.rpm \ | centos-release-6-6.el6.centos.12.2.src.rpm:SOURCE \ | ||||
filesystem-2.4.30-3.el6.src.rpm \ | filesystem-2.4.30-3.el6.src.rpm:SOURCE \ | ||||
findutils-4.4.2-6.el6.src.rpm \ | findutils-4.4.2-6.el6.src.rpm:SOURCE \ | ||||
freetype-2.3.11-15.el6_6.1.src.rpm \ | freetype-2.3.11-15.el6_6.1.src.rpm:SOURCE \ | ||||
gamin-0.1.10-9.el6.src.rpm \ | gamin-0.1.10-9.el6.src.rpm:SOURCE \ | ||||
gdbm-1.8.0-36.el6.src.rpm \ | gdbm-1.8.0-36.el6.src.rpm:SOURCE \ | ||||
glib2-2.28.8-4.el6.src.rpm \ | glib2-2.28.8-4.el6.src.rpm:SOURCE \ | ||||
glibc-2.12-1.149.el6_6.9.src.rpm \ | glibc-2.12-1.149.el6_6.9.src.rpm:SOURCE \ | ||||
gmp-4.3.1-7.el6_2.2.src.rpm \ | gmp-4.3.1-7.el6_2.2.src.rpm:SOURCE \ | ||||
grep-2.6.3-6.el6.src.rpm \ | grep-2.6.3-6.el6.src.rpm:SOURCE \ | ||||
texinfo-4.13a-8.el6.src.rpm \ | texinfo-4.13a-8.el6.src.rpm:SOURCE \ | ||||
keyutils-1.4-5.el6.src.rpm \ | keyutils-1.4-5.el6.src.rpm:SOURCE \ | ||||
krb5-1.10.3-37.el6_6.src.rpm \ | krb5-1.10.3-37.el6_6.src.rpm:SOURCE \ | ||||
less-436-13.el6.src.rpm \ | less-436-13.el6.src.rpm:SOURCE \ | ||||
acl-2.2.49-6.el6.src.rpm \ | acl-2.2.49-6.el6.src.rpm:SOURCE \ | ||||
attr-2.4.44-7.el6.src.rpm \ | attr-2.4.44-7.el6.src.rpm:SOURCE \ | ||||
libcap-2.16-5.5.el6.src.rpm \ | libcap-2.16-5.5.el6.src.rpm:SOURCE \ | ||||
gcc-4.4.7-11.el6.src.rpm \ | gcc-4.4.7-11.el6.src.rpm:SOURCE \ | ||||
libidn-1.18-2.el6.src.rpm \ | libidn-1.18-2.el6.src.rpm:SOURCE \ | ||||
libselinux-2.0.94-5.8.el6.src.rpm \ | libselinux-2.0.94-5.8.el6.src.rpm:SOURCE \ | ||||
libsepol-2.0.41-4.el6.src.rpm \ | libsepol-2.0.41-4.el6.src.rpm:SOURCE \ | ||||
ncurses-5.7-3.20090208.el6.src.rpm \ | ncurses-5.7-3.20090208.el6.src.rpm:SOURCE \ | ||||
pcre-7.8-6.el6.src.rpm \ | pcre-7.8-6.el6.src.rpm:SOURCE \ | ||||
popt-1.13-7.el6.src.rpm \ | popt-1.13-7.el6.src.rpm:SOURCE \ | ||||
readline-6.0-4.el6.src.rpm \ | readline-6.0-4.el6.src.rpm:SOURCE \ | ||||
redhat-lsb-4.0-7.el6.centos.src.rpm \ | redhat-lsb-4.0-7.el6.centos.src.rpm:SOURCE \ | ||||
sed-4.2.1-10.el6.src.rpm \ | sed-4.2.1-10.el6.src.rpm:SOURCE \ | ||||
setserial-2.17-25.el6.src.rpm \ | setserial-2.17-25.el6.src.rpm:SOURCE \ | ||||
setup-2.8.14-20.el6_4.1.src.rpm \ | setup-2.8.14-20.el6_4.1.src.rpm:SOURCE \ | ||||
slang-2.2.1-1.el6.src.rpm \ | slang-2.2.1-1.el6.src.rpm:SOURCE \ | ||||
util-linux-ng-2.17.2-12.18.el6.src.rpm \ | util-linux-ng-2.17.2-12.18.el6.src.rpm:SOURCE \ | ||||
which-2.19-6.el6.src.rpm \ | which-2.19-6.el6.src.rpm:SOURCE \ | ||||
zlib-1.2.3-29.el6.src.rpm | zlib-1.2.3-29.el6.src.rpm:SOURCE | ||||
ALWAYS_KEEP_DISTFILES= yes | ALWAYS_KEEP_DISTFILES= yes | ||||
.endif | .endif | ||||
CONFLICTS= linux_base-gentoo* linux_base-f10-[0-9]* linux-glib2-* | CONFLICTS= linux_base-gentoo* linux_base-f10-[0-9]* linux-glib2-* | ||||
ONLY_FOR_ARCHS= i386 amd64 | ONLY_FOR_ARCHS= i386 amd64 | ||||
. if defined(OVERRIDE_LINUX_BASE_PORT) && ${OVERRIDE_LINUX_BASE_PORT} == "c6_64" | |||||
PKGNAMESUFFIX= _64 | |||||
LINUX_RPM_ARCH= x86_64 | |||||
LINUX_REPO_ARCH= x86_64 | |||||
. else | |||||
LINUX_RPM_ARCH= i686 | LINUX_RPM_ARCH= i686 | ||||
LINUX_REPO_ARCH= i386 | |||||
. endif | |||||
USE_LINUX_PREFIX= yes | USE_LINUX_PREFIX= yes | ||||
NO_WRKSUBDIR= yes | NO_WRKSUBDIR= yes | ||||
DISTINFO_FILE?= ${MASTERDIR}/distinfo.${LINUX_RPM_ARCH} | DISTINFO_FILE?= ${MASTERDIR}/distinfo.${LINUX_RPM_ARCH} | ||||
PLIST= ${MASTERDIR}/pkg-plist.${LINUX_RPM_ARCH} | |||||
PLIST_SUB= GLIBCVER="2.12" LINUXBASE=${LINUXBASE} | PLIST_SUB= GLIBCVER="2.12" LINUXBASE=${LINUXBASE} | ||||
USES= shebangfix | USES= shebangfix | ||||
SHEBANG_FILES= bin/redhat_lsb_init sbin/mount.tmpfs | SHEBANG_FILES= bin/redhat_lsb_init sbin/mount.tmpfs | ||||
# bash scripts need to work in chroot /compat/linux, so use env instead. | # bash scripts need to work in chroot /compat/linux, so use env instead. | ||||
bash_CMD= /usr/bin/env bash | bash_CMD= /usr/bin/env bash | ||||
.include <bsd.port.pre.mk> | .include <bsd.port.pre.mk> | ||||
Show All 17 Lines | |||||
ADD_FILES= #empty | ADD_FILES= #empty | ||||
.if (${MACHINE_ARCH} == "amd64") | .if (${MACHINE_ARCH} == "amd64") | ||||
FALLBACK_ELF_MIB= kern.elf32.fallback_brand | FALLBACK_ELF_MIB= kern.elf32.fallback_brand | ||||
.else | .else | ||||
FALLBACK_ELF_MIB= kern.fallback_elf_brand | FALLBACK_ELF_MIB= kern.fallback_elf_brand | ||||
.endif | .endif | ||||
.if (${ARCH} == "amd64") | .if (${ARCH} == "amd64") | ||||
. if defined(OVERRIDE_LINUX_BASE_PORT) && ${OVERRIDE_LINUX_BASE_PORT} != "c6_64" | |||||
xmj: We could consider removing this whole if-block, as the current implementation seems to not have… | |||||
LATEST_LINK:= ${PKGBASE:C/linux/linux32/} | LATEST_LINK:= ${PKGBASE:C/linux/linux32/} | ||||
ARCH= i386 | ARCH= i386 | ||||
.endif | . endif | ||||
.endif | |||||
pre-extract: | pre-extract: | ||||
@for file in ${PRE_BIN_DISTFILES}; do \ | @for file in ${PRE_BIN_DISTFILES}; do \ | ||||
if ! (cd ${WRKDIR} && ${EXTRACT_CMD} ${EXTRACT_BEFORE_ARGS} ${_DISTDIR}/$$file ${EXTRACT_AFTER_ARGS});\ | if ! (cd ${WRKDIR} && ${EXTRACT_CMD} ${EXTRACT_BEFORE_ARGS} ${_DISTDIR}/$$file ${EXTRACT_AFTER_ARGS});\ | ||||
then \ | then \ | ||||
exit 1; \ | exit 1; \ | ||||
fi; \ | fi; \ | ||||
done | done | ||||
# now fix up broken permissions | # now fix up broken permissions | ||||
. if defined(OVERRIDE_LINUX_BASE_PORT) && ${OVERRIDE_LINUX_BASE_PORT} == "c6_64" | |||||
Done Inline ActionsYou could rewrite that to xmj: You could rewrite that to
@${CHMOD} -R u+rwX ${WRKDIR}/lib64 ${WRKDIR/usr/lib64
and remove the… | |||||
Done Inline Actionsgood idea allanjude: good idea | |||||
@${CHMOD} -R u+rwX ${WRKDIR}/lib64 ${WRKDIR}/usr/lib64 | |||||
. endif | |||||
@${CHMOD} -R u+rwX ${WRKDIR}/bin ${WRKDIR}/lib ${WRKDIR}/sbin ${WRKDIR}/usr/bin ${WRKDIR}/usr/lib ${WRKDIR}/usr/sbin | @${CHMOD} -R u+rwX ${WRKDIR}/bin ${WRKDIR}/lib ${WRKDIR}/sbin ${WRKDIR}/usr/bin ${WRKDIR}/usr/lib ${WRKDIR}/usr/sbin | ||||
@${CHMOD} 400 ${WRKDIR}/etc/*shadow | @${CHMOD} 400 ${WRKDIR}/etc/*shadow | ||||
do-build: | do-build: | ||||
@for D in ${REMOVE_DIRS}; do \ | @for D in ${REMOVE_DIRS}; do \ | ||||
${RM} -rf ${WRKSRC}/$$D; \ | ${RM} -rf ${WRKSRC}/$$D; \ | ||||
done | done | ||||
@for F in ${REMOVE_FILES}; do \ | @for F in ${REMOVE_FILES}; do \ | ||||
${RM} -f ${WRKSRC}/$$F; \ | ${RM} -f ${WRKSRC}/$$F; \ | ||||
done | done | ||||
@for F in ${ADD_DIRS}; do \ | @for F in ${ADD_DIRS}; do \ | ||||
${MKDIR} ${WRKSRC}/$$F; \ | ${MKDIR} ${WRKSRC}/$$F; \ | ||||
done | done | ||||
@for F in ${ADD_FILES}; do \ | @for F in ${ADD_FILES}; do \ | ||||
${TOUCH} ${WRKSRC}/$$F; \ | ${TOUCH} ${WRKSRC}/$$F; \ | ||||
done | done | ||||
# | # | ||||
# Create a good ld.so.conf and touch ld.so.cache | # Create a good ld.so.conf and touch ld.so.cache | ||||
# | # | ||||
@${ECHO_CMD} -e '/lib\n/usr/lib\n${X11BASE}/lib' >> \ | @${ECHO_CMD} -e '/lib\n/usr/lib\n/usr/lib64\n${X11BASE}/lib' >> \ | ||||
${WRKSRC}/etc/ld.so.conf | ${WRKSRC}/etc/ld.so.conf | ||||
@${TOUCH} ${WRKSRC}/etc/ld.so.cache | @${TOUCH} ${WRKSRC}/etc/ld.so.cache | ||||
# | # | ||||
# Create yp.conf as a hint to NIS users and make sure there's a | # 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 | # mtab in etc, albeit an empty one. This is needed in a couple of | ||||
# cases. Most notably staroffice6. If yp.conf exists install only | # cases. Most notably staroffice6. If yp.conf exists install only | ||||
# yp.conf.sample | # yp.conf.sample | ||||
# | # | ||||
@${INSTALL} ${COPY} -m 644 ${FILESDIR}/yp.conf.sample ${WRKSRC}/etc | @${INSTALL} ${COPY} -m 644 ${FILESDIR}/yp.conf.sample ${WRKSRC}/etc | ||||
@${TOUCH} ${WRKSRC}/etc/mtab | @${TOUCH} ${WRKSRC}/etc/mtab | ||||
# | # | ||||
# If ${PREFIX}/etc/krb5.conf exists, don't touch it | # If ${PREFIX}/etc/krb5.conf exists, don't touch it | ||||
# | # | ||||
@${MV} ${WRKSRC}/etc/krb5.conf ${WRKSRC}/etc/krb5.conf.sample | @${MV} ${WRKSRC}/etc/krb5.conf ${WRKSRC}/etc/krb5.conf.sample | ||||
# Fix usr/bin/*db4* permissions to allow "portupgrade -s" | |||||
# @${CHMOD} u+w ${WRKSRC}/usr/bin/*db4* | |||||
@${FIND} ${WRKSRC}/bin ${WRKSRC}/sbin/ ${WRKSRC}/usr/bin \ | @${FIND} ${WRKSRC}/bin ${WRKSRC}/sbin/ ${WRKSRC}/usr/bin \ | ||||
Not Done Inline ActionsPlease remove this comment. xmj: Please remove this comment. | |||||
Not Done Inline ActionsAs this is a clean-up and not related to c6_64, I would assume the action is optional for a commit of the c6_64 parts. netchild: As this is a clean-up and not related to c6_64, I would assume the action is optional for a… | |||||
${WRKSRC}/usr/sbin -type f -print0 | ${XARGS} -0 ${FILE} \ | ${WRKSRC}/usr/sbin -type f -print0 | ${XARGS} -0 ${FILE} \ | ||||
| ${GREP} ELF | ${CUT} -d : -f 1 \ | | ${GREP} ELF | ${CUT} -d : -f 1 \ | ||||
| ${XARGS} ${BRANDELF} -t Linux | | ${XARGS} ${BRANDELF} -t Linux | ||||
. if defined(OVERRIDE_LINUX_BASE_PORT) && ${OVERRIDE_LINUX_BASE_PORT} == "c6_64" | |||||
@${BRANDELF} -t Linux ${WRKSRC}/lib64/ld-2.12.so | |||||
. else | |||||
@${BRANDELF} -t Linux ${WRKSRC}/lib/ld-2.12.so | @${BRANDELF} -t Linux ${WRKSRC}/lib/ld-2.12.so | ||||
. endif | |||||
Not Done Inline ActionsPlease remove this comment. xmj: Please remove this comment. | |||||
# Restore the status quo for usr/bin/*db4* files | |||||
# @${CHMOD} u-w ${WRKSRC}/usr/bin/*db4* | |||||
# Install locales | # Install locales | ||||
@${MV} ${WRKSRC}/usr/lib/locale/locale-archive.tmpl \ | @${MV} ${WRKSRC}/usr/lib/locale/locale-archive.tmpl \ | ||||
${WRKSRC}/usr/lib/locale/locale-archive | ${WRKSRC}/usr/lib/locale/locale-archive | ||||
do-install: | do-install: | ||||
# | # | ||||
# Do install without using linux rpm system | # Do install without using linux rpm system | ||||
Show All 18 Lines |
We could consider removing this whole if-block, as the current implementation seems to not have any effect on pkg names at all (including UNIQUENAME, which is the only thing LATEST_LINK seems currently used for).
That is on an amd64 install.