aboutsummaryrefslogtreecommitdiffstats
path: root/testing/calibre/APKBUILD
blob: 2bfe885c908a945051e8d4586d646bd6cd1058e4 (plain) (blame)
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
# Contributor: Francesco Colista <francesco.colista@gmail.com>
# Maintainer:
pkgname=calibre
pkgver=0.8.8
pkgrel=0
pkgdesc="Ebook management application"
url="http://calibre-ebook.com/"
arch="all"
license="GPL3"
depends=
depends_dev="python-dev imagemagick-dev py-qt py-sip py-imaging libusb-dev poppler-dev poppler-qt4-dev py-dbus py-pycountry py-lxml icu-dev desktop-file-utils py-sqlite sqlite-dev chmlib-dev podofo-dev py-sip-dev py-dateutil py-cherrypy py-beautifulsoup py-mechanize libwmf xdg-utils"
makedepends="$depends_dev"
install=""
subpackages=""
source="http://downloads.sourceforge.net/${pkgname}/${pkgname}-${pkgver}.tar.gz
	calibre.confd
	calibre.initd"
_builddir="$srcdir"/$pkgname
build() {
	cd "$_builddir"
  	rm -rf src/cherrypy
	sed -i -e "s/ldflags = shlex.split(ldflags)/ldflags = shlex.split(ldflags) + ['-fPIC']/" setup/extensions.py
	sed -i -e 's:\(#!/usr/bin/env[ ]\+python$\|#!/usr/bin/python$\):\12:g' \
	$(find . -regex ".*.py\|.*.recipe")
	python setup.py build
	python setup.py resources
	python setup.py translations
}
package() {
	cd "$_builddir"
	# Fix the environment module location
	sed -i -e "s|(prefix=.*)|(prefix='$pkgdir/usr')|g" setup/install.py
	install -d "${pkgdir}/usr/lib/python2.7/site-packages"
	python setup.py install --root="${pkgdir}" --prefix=/usr \
		--staging-bindir="${pkgdir}/usr/bin" \
		--staging-libdir="${pkgdir}/usr/lib" \
		--staging-sharedir="${pkgdir}/usr/share"
	install -m755 -D ../$pkgname.initd \
		"$pkgdir"/etc/init.d/$pkgname || return 1
        install -m644 -D ../$pkgname.confd \
                "$pkgdir"/etc/conf.d/$pkgname || return 1
}
md5sums="dab191175d370920b366bcd8c0dad917  calibre-0.8.8.tar.gz
76d36815abf4c64bb54366e70a68305c  calibre.confd
d2d1dd5d6c6faf80dd94c75288451fcd  calibre.initd"