Merge remote-tracking branch 'dm/opendreambox-1.6' into test_0701
[vuplus_openembedded] / recipes / gpe-helpviewer / gpe-helpviewer_1.0.bb
1 DESCRIPTION = "A helpviewer based on gtk+webcore"
2 LICENSE = "GPL"
3 DEPENDS = "osb-nrcit"
4 RDEPENDS = "gpe-helpviewer-doc"
5 PR = "r2"
6
7 SRC_URI = "http://stag.mind.be/gpe-helpviewer-${PV}.tar.bz2"
8
9 S = "${WORKDIR}/gpe-helpviewer"
10
11 inherit autotools
12
13 do_install() {
14                 install -d ${D}${docdir}/gpe
15                 install -m 0644 ${S}/gpe-helpviewer.html  ${D}${docdir}/gpe/
16                 install -d ${D}${datadir}/applications
17                 install -m 0644 ${S}/gpe-helpviewer.desktop ${D}${datadir}/applications/gpe-helpviewer.desktop
18                 install -d ${D}${datadir}/pixmaps
19                 install -m 0644 ${S}/gpe-help.png ${D}${datadir}/pixmaps/gpe-help.png
20                 autotools_do_install
21 }
22
23 pkg_postinst_${PN}-doc () {
24         #!/bin/sh
25         if [ "x$D" != "x" ]; then
26         if [ -e ${sysconfdir}/gpe/gpe-help.conf ]; then
27                 echo gpe-helpviewer = ${docdir}/gpe/gpe-helpviewer.html >> ${sysconfdir}/gpe/gpe-help.conf
28         else
29                  echo [Help] >> ${sysconfdir}/gpe/gpe-help.conf
30                  echo gpe-helpviewer = ${docdir}/gpe/gpe-helpviewer.html >> ${sysconfdir}/gpe/gpe-help.conf
31         fi
32         if [ -x ${bindir}/gpe-helpindex ]; then
33                 echo generating help-index
34                 gpe-helpindex
35         else
36                 echo not generating index for gpe-helpviewer
37         fi
38         fi
39 }
40
41 pkg_postrm_${PN}-doc () {
42         #!/bin/sh
43         if [ "x$D" != "x" ]; then
44         if [ -e ${sysconfdir}/gpe/gpe-help.conf ]; then
45                 sed '/^\<gpe-helpviewer\>/d' ${sysconfdir}/gpe/gpe-help.conf > /tmp/gpe-help.conf
46                 mv /tmp/gpe-help.conf ${sysconfdir}/gpe/gpe-help.conf
47         fi
48         if [ -x ${bindir}/gpe-helpindex ]; then
49                 echo generating help-index
50                 gpe-helpindex
51         else
52                 echo not generating index for gpe-helpviewer
53         fi
54         fi
55 }
56