omap3-sgx-modules: strip unneeded stuff
[openembedded.git] / recipes / sysconf / sysconf_0.1.bb
1 DESCRIPTION = "System Configuration save/restore functionality"
2 SECTION = "base"
3 PRIORITY = "optional"
4 LICENSE = "GPL"
5 RDEPENDS = "devio cpio findutils diffutils"
6 PR = "r10"
7
8 # Currently, the scripts only support ixp4xx machines.
9 # Feel free to add to the scripts ...
10 COMPATIBLE_MACHINE = '(ixp4xx|nslu2)'
11
12 SRC_URI = "file://sysconfsetup \
13            file://conffiles \
14            file://sysconf \
15            "
16
17 SCRIPTS = "sysconf"
18 INITSCRIPTS = "sysconfsetup"
19
20 # This just makes things easier...
21 S="${WORKDIR}"
22
23 do_install() {
24         # Directories
25         install -d ${D}${sysconfdir} \
26                    ${D}${sysconfdir}/default \
27                    ${D}${sysconfdir}/init.d \
28                    ${D}${base_sbindir}
29
30         # Init scripts
31         install -m 0755 sysconfsetup ${D}${sysconfdir}/init.d/
32
33         # Configuration files
34         install -m 0644 conffiles ${D}${sysconfdir}/default
35
36         # Shell scripts
37         install -m 0755 sysconf ${D}${base_sbindir}/sysconf
38 }
39
40 pkg_postinst() {
41         opt=
42         test -n "$D" && opt="-r $D"
43         update-rc.d $opt sysconfsetup start 12 S .
44 }
45
46 pkg_postrm() {
47         opt=
48         test -n "$D" && opt="-r $D"
49         update-rc.d $opt sysconfsetup remove
50 }