summaryrefslogtreecommitdiff
path: root/emulators/linux_dist-gentoo-stage1/Makefile
blob: 01f74dc36c80c1a81ed1460dff71b7648dd16040 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# New ports collection makefile for:	linux_base-gentoo-stage1
# Date created:				2003-10-12
# Whom:					trevor
#
# $FreeBSD$
#

PORTNAME=	linux_base-gentoo-stage1
PORTVERSION=	2004.3
CATEGORIES=	emulators linux
MASTER_SITES=	${MASTER_SITE_GENTOO}
EXTRACT_ONLY=

MAINTAINER=	trevor@FreeBSD.org
COMMENT=	Files from Gentoo distribution, for Linux compatibility

RESTRICTED=	"binaries licensed under GNU GPL without accompanying source"

CONFLICTS=	linux_base-6* linux_base-7* linux_base-8* linux_base-debian* \
		linux_base-rh* linux_base-suse*

DIST_SUBDIR=	gentoo-linux
MD5_FILE=	${MASTERDIR}/distinfo.${ARCH}
NO_BUILD=	y
NO_FILTER_SHLIBS=y
NO_MTREE=	y
ONLY_FOR_ARCHS=	alpha amd64 ia64 i386
PLIST=		${WRKDIR}/pkg-plist
PREFIX=		${LINUXBASE}
USE_BZIP2=	y

.include <bsd.port.pre.mk>

.if (${ARCH} == "amd64")
LATEST_LINK=	${PORTNAME:C/linux_base/linux32_base/}
.endif

.if (${ARCH} == "alpha")
MASTER_SITE_SUBDIR=	releases/alpha/2004.3/stages
DISTNAME=	stage1-alpha-2004.3
.elif (${ARCH} == "i386" || ${ARCH} == "amd64" || ${ARCH} == "ia64")
MASTER_SITE_SUBDIR=	releases/x86/2004.3/stages/x86
DISTNAME=		stage1-x86-2004.3
.endif

do-extract:
	@${MKDIR} ${WRKSRC}
	@${TAR} --exclude=./dev -xp -C ${WRKSRC} \
		-f ${DISTDIR}/${DIST_SUBDIR}/${DISTFILES}
	@${ECHO_CMD} etc/resolv.conf > ${PLIST}
	@cd ${WRKSRC} && ${FIND} * -type f -o -type l >> ${PLIST} \
		&& ${FIND} * -type d | ${SORT} -r | ${SED} -e 's:^:@dirrm :' \
		>> ${PLIST}
	@${RM} -fr ${WRKSRC}

do-install:
	- ${MKDIR} ${PREFIX}
	@${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
	@${TAR} --exclude=./dev -xpy -C ${PREFIX} \
		-f ${DISTDIR}/${DIST_SUBDIR}/${DISTFILES}
	@${FIND} ${PREFIX} -type d -exec ${CHMOD} 755 \{\} \;
	@${CP} -p /etc/resolv.conf ${PREFIX}/etc/
	@${BRANDELF} -t Linux ${PREFIX}/sbin/ldconfig ${PREFIX}/sbin/sln
	@${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
	@${CAT} ${PKGMESSAGE}

.include <bsd.port.post.mk>