/[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 200 - (show annotations) (download)
Sun Jan 16 14:41:46 2005 UTC (9 years, 7 months ago) by spb
File size: 3200 byte(s)
Bumped portage version; updated baselayout ebuild

1 # $Header$
2
3 inherit flag-o-matic eutils
4
5 SV=0.6
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://dev.gentoo.org/~spb/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 pkg_setup() {
24 ewarn ""
25 ewarn "This ebuild is completely experimental, and"
26 ewarn "probably doesn't work properly."
27 ewarn "If it breaks, tell me, but don't say i didn't"
28 ewarn "warn you."
29 ewarn ""
30 }
31
32 src_compile() {
33 use static && append-ldflags -static
34
35 make -C ${S}/src CC="${CC:-gcc}" LD="${CC:-gcc} ${LDFLAGS}" \
36 CFLAGS="${CFLAGS}" || die
37 make -C ${S}/src/filefuncs CC="${CC:-gcc}" LD="${CC:-gcc} ${LDFLAGS}" \
38 CFLAGS="${CFLAGS}" || die
39 }
40
41 src_install() {
42 dodir /usr/share/baselayout
43
44 dodir /etc
45 insinto /etc
46 doins ${S}/etc/*
47
48 mv ${D}/etc/{passwd,group,fstab} ${D}/usr/share/baselayout
49
50 keepdir /etc/runlevels
51 keepdir /etc/init.d
52 exeinto /etc/init.d
53 doexe ${S}/etc/init.d/*
54
55 dodir /etc/conf.d
56 insinto /etc/conf.d
57 [ -d ${S}/etc/conf.d ] && doins ${S}/etc/conf.d/*
58
59 dodir /var/db/pkg
60
61 dodir /lib/rcscripts
62 cp -r ${S}/lib/rcscripts/* ${D}/lib/rcscripts/
63 cp -r ${S}/src/awk ${D}/lib/rcscripts/awk
64 cp ${S}/src/filefuncs/*.so ${D}/lib/rcscripts/
65
66 cp -r ${S}/rc-lists ${D}/usr/share/baselayout
67
68 echo "Gentoo/FreeBSD: FreeBSD version $(uname -r); Gentoo base version ${SV}" >${D}/etc/gentoo-release
69
70 into /
71
72 dobin ${S}/bin/rc-status
73
74 dosbin ${S}/sbin/functions.sh
75 dosbin ${S}/sbin/runscript.sh
76 dosbin ${S}/sbin/depscan.sh
77 dosbin ${S}/sbin/rc-update
78 dosym ../../sbin/functions.sh /etc/init.d/functions.sh
79 dosym ../../sbin/runscript.sh /etc/init.d/runscript.sh
80 dosym ../../sbin/depscan.sh /etc/init.d/depscan.sh
81
82 cd ${S}/src
83 make DESTDIR="${D}" install || die
84 cd filefuncs
85 make DESTDIR="${D}" install || die
86 }
87
88 pkg_postinst() {
89 # Set up the default runlevels.
90 if [ -z "$(/bin/ls ${ROOT}/etc/runlevels 2>/dev/null)" ]; then
91 cd ${ROOT}/usr/share/baselayout/rc-lists
92 for x in *; do
93 einfo "Creating default runlevel symlinks for ${x}"
94 mkdir -p ${ROOT}/etc/runlevels/${x}
95 for y in $(<${ROOT}/usr/share/baselayout/rc-lists/${x}); do
96 if [ ! -e ${ROOT}/etc/init.d/${y} ]; then
97 ewarn "init.d/${y} not found; skipping"
98 else
99 ln -sfn ${ROOT}/etc/init.d/${y} \
100 ${ROOT}/etc/runlevels/${x}/${y}
101 fi
102 done
103 done
104 fi
105
106 if [ ! -e ${ROOT}/etc/hosts ]; then
107 cp ${ROOT}/usr/share/baselayout/hosts ${ROOT}/etc
108 fi
109
110 if use build || use bootstrap; then
111 cp ${ROOT}/usr/share/baselayout/{passwd,group,fstab} ${ROOT}/etc
112 fi
113
114 if [ ${ROOT} == / ] && ! use build && ! use bootstrap; then
115 /sbin/depscan.sh &>/dev/null
116 fi
117
118 # This file shouldn't be managed with etc-update; we want it
119 # written immediately.
120 if [ -e ${ROOT}/etc/._cfg????_gentoo-release ]; then
121 rm -f ${ROOT}/etc/gentoo-release
122 mv ${ROOT}/etc/._cfg????_gentoo-release ${ROOT}/etc/gentoo-release
123 fi
124
125 einfo "Make sure to update all pending config files in /etc"
126 einfo "or things will break. Use etc-update or dispatch-conf to do this."
127 echo
128 }

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.20