/[gentoo-alt]/trunk/sys-apps/freebsd-baselayout/freebsd-baselayout-0.1.ebuild
Gentoo

Contents of /trunk/sys-apps/freebsd-baselayout/freebsd-baselayout-0.1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 93 - (show annotations) (download)
Mon Nov 1 22:57:06 2004 UTC (10 years, 1 month ago) by spb
File size: 2732 byte(s)
Adding KEYWORDS might help.

1 # $Header$
2
3 inherit flag-o-matic eutils
4
5 SV=0.3
6 SVREV=
7
8 S="${WORKDIR}/freebsd-rcscripts-${SV}${SVREV}"
9 DESCRIPTION="Filesystem baselayout and init scripts"
10 HOMEPAGE="http://gentoo-alt.gentoo.org"
11 SRC_URI="http://www.srcf.ucam.org/~spb42/g-fbsd/freebsd-rcscripts-${SV}${SVREV}.tar.bz2"
12
13 KEYWORDS="~x86-fbsd"
14
15 RDEPEND="sys-apps/freebsd-sbin
16 >=sys-apps/gawk-3.1.1-r2 "
17 DEPEND="virtual/os-headers"
18
19 #src_unpack() {
20 # unpack ${A}
21 #}
22
23 src_compile() {
24 use static && append-ldflags -static
25
26 make -C ${S}/src CC="${CC:-gcc}" LD="${CC:-gcc} ${LDFLAGS}" \
27 CFLAGS="${CFLAGS}" || die
28 }
29
30 src_install() {
31 dodir /usr/share/baselayout
32
33 dodir /etc
34 insinto /etc
35 doins ${S}/etc/*
36
37 mv ${D}/etc/{passwd,group,fstab} ${D}/usr/share/baselayout
38
39 keepdir /etc/runlevels
40 keepdir /etc/init.d
41 insinto /etc/init.d
42 doins ${S}/etc/init.d/*
43
44 dodir /etc/conf.d
45
46 dodir /var/db/pkg
47
48 dodir /lib/rcscripts
49 cp -r ${S}/lib/rcscripts/* ${D}/lib/rcscripts/
50 cp -r ${S}/src/awk ${D}/lib/rcscripts/awk
51
52 cp -r ${S}/rc-lists ${D}/usr/share/baselayout
53
54 echo "Gentoo/FreeBSD: FreeBSD version $(uname -r); Gentoo base version ${SV}" >${D}/etc/gentoo-release
55
56 into /
57
58 dobin ${S}/bin/rc-status
59
60 dosbin ${S}/sbin/functions.sh
61 dosbin ${S}/sbin/runscript.sh
62 dosbin ${S}/sbin/depscan.sh
63 dosbin ${S}/sbin/rc-update
64 dosym ../../sbin/functions.sh /etc/init.d/functions.sh
65 dosym ../../sbin/runscript.sh /etc/init.d/runscript.sh
66 dosym ../../sbin/depscan.sh /etc/init.d/depscan.sh
67
68 cd ${S}/src
69 make DESTDIR="${D}" install || die
70 }
71
72 pkg_postinst() {
73 # Set up the default runlevels.
74 if [ -z "$(/bin/ls ${ROOT}/etc/runlevels 2>/dev/null)" ]; then
75 cd ${ROOT}/usr/share/baselayout/rc-lists
76 for x in *; do
77 einfo "Creating default runlevel symlinks for ${x}"
78 mkdir -p ${ROOT}/etc/runlevels/${x}
79 for y in $(<${ROOT}/usr/share/baselayout/rc-lists/${x}); do
80 if [ ! -e ${ROOT}/etc/init.d/${y} ]; then
81 ewarn "init.d/${y} not found; skipping"
82 else
83 ln -sfn ${ROOT}/etc/init.d/${y} \
84 ${ROOT}/etc/runlevels/${x}/${y}
85 fi
86 done
87 done
88 fi
89
90 if [ ! -e ${ROOT}/etc/hosts ]; then
91 cp ${ROOT}/usr/share/baselayout/hosts ${ROOT}/etc
92 fi
93
94 if use build || use bootstrap; then
95 cp ${ROOT}/usr/share/baselayout/{passwd,group,fstab} ${ROOT}/etc
96 fi
97
98 if [ ${ROOT} == / ] && ! use build && ! use bootstrap; then
99 /sbin/depscan.sh &>/dev/null
100 fi
101
102 # This file shouldn't be managed with etc-update; we want it
103 # written immediately.
104 if [ -e ${ROOT}/etc/._cfg????_gentoo-release ]; then
105 rm -f ${ROOT}/etc/gentoo-release
106 mv ${ROOT}/etc/._cfg????_gentoo-release ${ROOT}/etc/gentoo-release
107 fi
108
109 einfo "Make sure to update all pending config files in /etc"
110 einfo "or things will break. Use etc-update or dispatch-conf to do this."
111 echo
112 }

Properties

Name Value
svn:eol-style native
svn:keywords Author Date Id Revision

  ViewVC Help
Powered by ViewVC 1.1.20