summaryrefslogtreecommitdiff
path: root/packages/fbreader/fbreader_0.8.2a.bb
blob: d8b6a33297d181157c2880c32a197718ba23c3d7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
DESCRIPTION = "FBreader is an ebook reader"
LICENSE = "GPL2"
HOMEPAGE = "http://only.mawhrin.net/fbreader/"
SECTION = "x11/utils"
PRIORITY = "optional"
DEPENDS = "gtk+ enca expat bzip2 libgpewidget"
PR = "r2"

# The RESOLUTION is defined at compile time which makes
# this package MACHINE specific.
PACKAGE_ARCH_${PN} = "${MACHINE}"

SRC_URI = "http://only.mawhrin.net/fbreader/fbreader-sources-${PV}.tgz \
	file://fbreader-0.8.2a_buildsys_oe.patch;patch=1 \
	file://480x640-buildfix.patch;patch=1"

# Set the defaults
READER_RESOLUTION = "240x320"
READER_ARCH	  = "openzaurus"
READER_GUI	  = "gpe"
READER_STATUS	  = "release"

# Set device specific overrides
RESOLUTION_fic-gta01 = "480x640"

FILES_${PN} += "${datadir}/FBReader ${datadir}/zlibrary"

CFLAGS_append = " RESOLUTION=${RESOLUTION} INSTALLDIR=/usr"
EXTRA_OEMAKE = "CC='${CXX}' LD='${CXX}' OE_CFLAGS='${CXXFLAGS}' INCPATH='${STAGING_INCDIR}' LIBPATH='${STAGING_LIBDIR}'"

inherit pkgconfig

do_configure() {
	cd ${WORKDIR}/${PN}-${PV}
	mv makefiles/target.mk makefiles/target.mk.orig
	
	echo "TARGET_ARCH = ${READER_ARCH}" > makefiles/target.mk	
	echo "UI_TYPE = ${READER_GUI}" >> makefiles/target.mk
	echo "TARGET_STATUS = ${READER_STATUS}" >> makefiles/target.mk
	
	cd fbreader/data/help
	ln -s MiniHelp.240x320.fb2 MiniHelp.openzaurus_480x640.fb2
}

do_install () {
        cd fbreader/openzaurus; oe_runmake .builddir RESOLUTION=${RESOLUTION}
	cp -r data/* ${D}
}