fix included modules.
[vuplus_openembedded] / recipes / ipkg / ipkg.inc
1 DESCRIPTION = "Itsy Package Manager"
2 DESCRIPTION_libipkg = "Itsy Package Manager Library"
3 SECTION = "base"
4 LICENSE = "GPL"
5 PROVIDES = "virtual/ipkg libipkg"
6
7 PACKAGES =+ "libipkg-dev libipkg"
8 FILES_libipkg-dev = "${libdir}/*.a ${libdir}/*.la ${libdir}/*.so"
9 FILES_libipkg = "${libdir}/*.so.*"
10 AUTO_LIBNAME_PKGS = "libipkg"
11
12 SRC_URI = "${HANDHELDS_CVS};module=familiar/dist/ipkg;tag=${@'V' + bb.data.getVar('PV',d,1).replace('.', '-')} \
13         file://update_version_comparision.patch;patch=1 \
14         file://enable_debversion.patch;patch=1 \
15         file://ipkg-configure \
16         file://terse.patch;patch=1"
17
18 S = "${WORKDIR}/ipkg/C"
19
20 inherit autotools pkgconfig update-rc.d
21
22 # Define a variable to allow distros to run configure earlier.
23 # (for example, to enable loading of ethernet kernel modules before networking starts)
24 IPKG_INIT_POSITION = "98"
25 IPKG_INIT_POSITION_slugos = "41"
26
27 INITSCRIPT_NAME = "ipkg-configure"
28 INITSCRIPT_PARAMS = "start ${IPKG_INIT_POSITION} S ."
29
30
31 pkg_postinst_ipkg () {
32 #!/bin/sh
33 update-alternatives --install ${bindir}/ipkg ipkg ${bindir}/ipkg-cl 100
34 }
35
36 pkg_postrm_ipkg () {
37 #!/bin/sh
38 update-alternatives --remove ipkg ${bindir}/ipkg-cl
39 }
40
41 do_install_append() {
42         install -d ${D}${sysconfdir}/init.d
43         install -m 0755 ${WORKDIR}/${INITSCRIPT_NAME} ${D}${sysconfdir}/init.d/
44 }
45
46 do_stage() {
47         oe_libinstall -so libipkg ${STAGING_LIBDIR}
48         install -d ${STAGING_INCDIR}/replace/
49         install -m 0644 replace/replace.h ${STAGING_INCDIR}/replace/
50         install -d ${STAGING_INCDIR}/libipkg/
51         for f in *.h
52         do
53                 install -m 0644 $f ${STAGING_INCDIR}/libipkg/
54         done
55 }
56
57 #
58 # FIXME: Install /etc/ipkg.conf and /etc/ipkg/arch.conf
59 #