increase dvbapp PR.
[vuplus_openembedded] / recipes / gpsd / gpsd.inc
1 DESCRIPTION = "A TCP/IP Daemon simplifying the communication with GPS devices"
2 SECTION = "console/network"
3 PRIORITY = "optional"
4 LICENSE = "GPL"
5 DEPENDS = "dbus-glib ncurses python"
6 PROVIDES = "virtual/gpsd"
7
8 EXTRA_OECONF = "--x-includes=${STAGING_INCDIR}/X11 \
9                 --x-libraries=${STAGING_LIBDIR} \
10                 --enable-dbus \
11                 --enable-python"
12
13 SRC_URI = "http://download.berlios.de/gpsd/gpsd-${PV}.tar.gz \
14            file://gpsd-default \
15            file://gps-hardware \
16            file://gpsd"
17
18 SRC_URI_append_om-gta01 = " \
19            file://restart_gllin.sh \
20 "
21                            
22 inherit autotools_stage update-rc.d
23
24 INITSCRIPT_NAME = "gpsd"
25 INITSCRIPT_PARAMS = "defaults 35"
26
27 LDFLAGS += "-L${STAGING_LIBDIR} -lm"
28 export STAGING_INCDIR
29 export STAGING_LIBDIR
30
31 do_compile_prepend() {
32     export BUILD_SYS="${BUILD_SYS}"
33     export HOST_SYS="${HOST_SYS}"
34         find ${S} -name "*.so" -exec rm -f {} \;
35 }
36
37 do_install_prepend() {
38     export BUILD_SYS="${BUILD_SYS}"
39     export HOST_SYS="${HOST_SYS}"
40 }
41
42 do_install_append() {
43         install -d ${D}/${sysconfdir}/init.d
44         install -d ${D}/dev
45         install -m 0755 ${WORKDIR}/gpsd ${D}/${sysconfdir}/init.d/
46         install -m 0755 ${WORKDIR}/gps-hardware ${D}/${sysconfdir}/init.d/gps-hardware.default
47         install -d ${D}/${sysconfdir}/default
48         install -m 0644 ${WORKDIR}/gpsd-default ${D}/${sysconfdir}/default/gpsd.default
49 }
50
51 do_install_append_om-gta01() {
52         install -d ${D}/${sysconfdir}/apm/resume.d
53         install -m 755 ${WORKDIR}/restart_gllin.sh ${D}/${sysconfdir}/apm/resume.d
54 }
55
56 pkg_postinst_${PN}-conf() {
57         update-alternatives --install ${sysconfdir}/default/gpsd gpsd-defaults ${sysconfdir}/default/gpsd.default 10
58         update-alternatives --install ${sysconfdir}/init.d/gps-hardware gps-hardware ${sysconfdir}/init.d/gps-hardware.default 10
59 }
60
61 pkg_postrm_${PN}-conf() {       
62         update-alternatives --remove gpsd-defaults ${sysconfdir}/default/gpsd.default
63         update-alternatives --remove gps-hardware ${sysconfdir}/init.d/gps-hardware.default             
64 }
65
66 SRC_URI_OVERRIDES_PACKAGE_ARCH = "0"
67
68 PACKAGES =+ "libgps python-pygps gpsd-conf gpsd-gpsctl gps-utils"
69
70 PACKAGE_ARCH_gpsd-conf = "${MACHINE_ARCH}"
71
72 RDEPENDS_${PN} = "gpsd-gpsctl"
73 RRECOMMENDS_${PN} = "gpsd-conf"
74
75 FILES_libgps = "${libdir}/*.so.*"
76 FILES_gpsd-conf = "${sysconfdir}"
77 FILES_gpsd-gpsctl = "${bindir}/gpsctl"
78 FILES_gps-utils = "${bindir}/*"
79
80 # might split them up even more fine granular
81 RDEPENDS_gps-utils = "python-pygps"
82
83 DESCRIPTION_python-pygps = "Python bindings to gpsd"
84 FILES_python-pygps = "${libdir}/*/site-packages/*"
85 RDEPENDS_python-pygps = "python-core python-curses gpsd"
86