/[gentoo-alt]/trunk/overlay/sys-freebsd/freebsd-sources/freebsd-sources-6.0.ebuild
Gentoo

Contents of /trunk/overlay/sys-freebsd/freebsd-sources/freebsd-sources-6.0.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1099 - (show annotations) (download)
Thu Feb 23 17:31:43 2006 UTC (8 years, 10 months ago) by flameeyes
File size: 1404 byte(s)
Make sure that we don't end up having sys-${RV} being a directory.
1 # Copyright 1999-2005 Gentoo Technologies, Inc.
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header$
4
5 inherit bsdmk freebsd
6
7 DESCRIPTION="FreeBSD kernel sources"
8 SLOT="${PVR}"
9 KEYWORDS="~x86-fbsd ~amd64-fbsd"
10
11 IUSE="symlink"
12
13 SRC_URI="mirror://gentoo/${SYS}.tar.bz2"
14
15 RDEPEND=""
16 DEPEND=""
17
18 PROVIDE="virtual/os-sources"
19 RESTRICT="nostrip"
20
21 S=${WORKDIR}/sys
22
23 MY_PVR="${PVR}"
24
25 [[ ${MY_PVR} == "${RV}" ]] && MY_PVR="${MY_PVR}-r0"
26
27 src_unpack() {
28 unpack ${A}
29 cd ${S}
30 epatch "${FILESDIR}/${PN}-gentoo.patch"
31 epatch "${FILESDIR}/${P}-flex-2.5.31.patch"
32
33 sed -i -e "s:%GENTOOPVR%:${PVR}:" conf/newvers.sh
34 }
35
36 src_compile() {
37 einfo "Nothing to compile.."
38 }
39
40 src_install() {
41 insinto /usr/src/sys-${MY_PVR}
42 doins -r ${S}/*
43 }
44
45 pkg_postinst() {
46 if [[ ! -L ${ROOT}usr/src/sys ]]; then
47 einfo "/usr/src/sys symlink doesn't exist; creating..."
48 ln -sf sys-${MY_PVR} ${ROOT}/usr/src/sys || \
49 eerror "Couldn't create ${ROOT}/usr/src/sys symlink."
50 ln -sf sys-${MY_PVR} ${ROOT}/usr/src/sys-${RV} || \
51 eerror "Couldn't create ${ROOT}/usr/src/sys-${RV} symlink."
52 elif use symlink; then
53 einfo "Updating /usr/src/sys symlink..."
54 rm ${ROOT}/usr/src/sys
55 ln -sf sys-${MY_PVR} ${ROOT}/usr/src/sys || \
56 eerror "Couldn't create ${ROOT}/usr/src/sys symlink."
57 ln -sf sys-${MY_PVR} ${ROOT}/usr/src/sys-${RV} || \
58 eerror "Couldn't create ${ROOT}/usr/src/sys-${RV} symlink."
59 fi
60 }

  ViewVC Help
Powered by ViewVC 1.1.20