Merge branch 'org.openembedded.dev' of git://git.openembedded.net/openembedded into...
[vuplus_openembedded] / packages / altboot / altboot_1.0.8+1.0.9_pre1.bb
1 require altboot.inc
2
3 DEFAULT_PREFERENCE = "-1"
4
5 ## Laibsch: The following DEPENDS lines seem broken in light of the fact that
6 ## they have circular dependencies and depend on stuff that is recommended
7 ## elsewhere.  Let's activate them only after further discussion
8 #RDEPENDS_${PN} = "${PN}-conf kexec-tools ncurses"
9 #RDEPENDS_${PN}_append_poodle = " kexec-tools"
10 #RDEPENDS_${PN}-conf = "${PN}"
11
12 PR = "r2"
13
14 SVN_REV="65"
15 #TAG = "${@'v' + bb.data.getVar('PV',d,1).replace('.', '-')}"
16 TAG = '1.0.x'
17 SRC_URI = "svn://hentges.net/public/altboot/branches/;module=${TAG};rev=${SVN_REV};proto=svn"
18
19 LDFLAGS += "-lncurses -lmenu"   
20
21 S = "${WORKDIR}/${TAG}/"
22
23 do_configure() {
24         cat ${S}/init.altboot | sed "s/^VERSION=.*/VERSION=\"${PV}\"/" > ${S}/init.altboot_
25         mv ${S}/init.altboot_ ${S}/init.altboot
26 }
27
28 do_compile() {
29         ${CC} ${CFLAGS} ${LDFLAGS} ${S}curses_menu/altboot_menu.c -o altboot_menu
30 }
31
32 do_install() {
33         install -d ${D}/sbin
34         install -d ${D}/etc/altboot-menu
35         install -d ${D}/etc/altboot-menu/Advanced
36         install -d ${D}/etc/altboot.rc
37         install -d ${D}/usr/share/doc/altboot
38         install -d ${D}/usr/share/sounds
39
40         if test -d ${S}/${MACHINE}
41         then
42                 install -m 0644 ${S}/${MACHINE}/altboot*.cfg ${D}/etc
43         else
44                 install -m 0644 ${S}/altboot*.cfg ${D}/etc
45         fi
46
47         install -m 0644 ${S}/beep.raw ${D}/usr/share/sounds
48         install -m 0644 ${S}/altboot.func ${D}/etc
49         install -m 0755 ${S}/init.altboot ${D}/sbin
50         install -m 0755 ${S}/altboot_menu ${D}/sbin
51
52         install -m 0755 ${S}/altboot-menu/*-* ${D}/etc/altboot-menu
53
54         install -m 0755 ${S}/altboot-menu/Advanced/*-* ${D}/etc/altboot-menu/Advanced
55
56         install -m 0755 ${S}/altboot.rc/*.sh ${D}/etc/altboot.rc
57         install -m 0644 ${S}/altboot.rc/*.txt ${D}/etc/altboot.rc
58 }
59
60 pkg_postinst_${PN}() {
61         update-alternatives --install /sbin/init init /sbin/init.altboot 55
62 }
63
64 pkg_postrm_${PN}() {
65         update-alternatives --remove init /sbin/init.altboot
66 }
67
68 do_rm_work() {
69 }
70
71 PACKAGE_ARCH_${PN} = "all"
72 PACKAGE_ARCH_${PN}-doc = "all"
73 PACKAGE_ARCH_${PN}-conf = "${MACHINE}"
74 PACKAGES = "${PN}-dbg ${PN}-conf ${PN}-doc ${PN}"
75
76 FILES_${PN}-conf = "/etc/altboot*.cfg"