Merge branch 'opendreambox' of git://git.opendreambox.org/git/openembedded into opend...
[openembedded.git] / recipes / opie-reader / opie-reader.inc
1 DESCRIPTION = "E-Book reader"
2 SECTION = "opie/applications"
3 PRIORITY = "optional"
4 LICENSE = "GPL"
5 APPNAME = "opie-reader"
6 APPTYPE = "binary"
7
8 S = "${WORKDIR}/opie-reader"
9
10 EXTRA_QMAKEVARS_POST += "LIBS+=-L${S}"
11 PARALLEL_MAKE = ""
12
13 inherit opie
14
15 DEPENDS += " flite "
16 EXTRA_QMAKEVARS_POST += " SUBDIRS+=FliteDyn SUBDIRS+=FliteDyn16 INCLUDEPATH+=${STAGING_INCDIR}/flite"
17
18 do_install() {
19                 install -d ${D}${palmtopdir}/pics/${APPNAME}/
20                 install -d ${D}${palmtopdir}/lib/
21                 install -d ${D}${palmtopdir}/plugins/reader/data/
22                 install -d ${D}${palmtopdir}/plugins/reader/filters/
23                 install -d ${D}${palmtopdir}/plugins/reader/support/
24                 install -d ${D}${palmtopdir}/plugins/reader/outcodecs/
25                 install -d ${D}${palmtopdir}/plugins/reader/codecs/ 
26                 install -m 0644 ${WORKDIR}/pics/${APPNAME}/*.png ${D}${palmtopdir}/pics/${APPNAME}/
27
28                 for f in libAportis libCHM libPlucker libReb libWeasel libiSilo libppms libArriereGo
29                 do
30                         install -m 644 ${S}/$f.so ${D}${palmtopdir}/plugins/reader/codecs/
31                 done
32
33                 for f in libreader_codec libreader_pdb libreader_pluckerbase pluckerdecompress
34                 do
35                         oe_libinstall -so -C ${S}/ $f ${D}${palmtopdir}/lib/
36                 done
37
38                 install -m 644 ${S}/libHTMLfilter.so ${D}${palmtopdir}/plugins/reader/filters/
39                 install -m 644 ${S}/libpluckerdecompress.so ${D}${palmtopdir}/plugins/reader/support/
40
41                 for f in libflitecmd libflitedyn libflitedyn16
42                 do
43                    install -m 644 ${S}/$f.so ${D}${palmtopdir}/plugins/reader/outcodecs
44                 done
45
46                 install -m 0644 ${S}/HTMLentities ${D}${palmtopdir}/plugins/reader/data/
47 }
48
49 python populate_packages_prepend () {
50         print "opie-reader:", bb.data.getVar( 'RDEPENDS_opie-reader', d )
51         plugindir = bb.data.expand('${palmtopdir}/plugins/reader', d)                                     
52         for dir, type in [ ( 'codecs', 'codec' ), ( 'filters', 'filter' ), ( 'outcodecs', 'output' ) ]:
53             dir = plugindir + '/' + dir
54             do_split_packages(d, dir,
55                               '^lib(.*)\.so$', 'opie-reader-' + type + '-%s',
56                               'Opie reader %s ' + type,
57                               prepend=True)
58
59         # input codes are small and should be installed together with opie-reader,
60         # flite output pulls in libflite and thus should only be installed if
61         # really wanted by the user
62         suggests=[]
63         recommends=[]
64         for package in bb.data.getVar('PACKAGES', d).split():
65             if 'flite' in package:
66                 suggests.append(package)
67             else:
68                 recommends.append(package)
69         bb.data.setVar('RRECOMMENDS_opie-reader', " ".join( recommends ), d)
70         bb.data.setVar('RSUGGESTS_opie-reader', " ".join( suggests ), d)
71 }