summaryrefslogtreecommitdiffstats
path: root/unmaintained/calibre
diff options
context:
space:
mode:
authorFrancesco Colista <francesco.colista@gmail.com>2013-06-12 12:36:51 +0000
committerFrancesco Colista <francesco.colista@gmail.com>2013-06-12 12:36:51 +0000
commitd974a1e91a8d6727c482091a027ae5843257b1ed (patch)
treee094faae784bf5c416009a7f75ea66befc8eba10 /unmaintained/calibre
parent6830cce2141bc5dde856a7e9cecda6a257196499 (diff)
downloadaports-d974a1e91a8d6727c482091a027ae5843257b1ed.tar.bz2
aports-d974a1e91a8d6727c482091a027ae5843257b1ed.tar.xz
testing/calibre: moved to unmaintained
Diffstat (limited to 'unmaintained/calibre')
-rw-r--r--unmaintained/calibre/APKBUILD58
-rw-r--r--unmaintained/calibre/calibre.confd6
-rw-r--r--unmaintained/calibre/calibre.initd17
3 files changed, 81 insertions, 0 deletions
diff --git a/unmaintained/calibre/APKBUILD b/unmaintained/calibre/APKBUILD
new file mode 100644
index 000000000..627aeafee
--- /dev/null
+++ b/unmaintained/calibre/APKBUILD
@@ -0,0 +1,58 @@
+# Contributor: Francesco Colista <francesco.colista@gmail.com>
+# Maintainer: Francesco Colista <francesco.colista@gmail.com>
+pkgname=calibre
+pkgver=0.9.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-cssselect py-imaging libusb-dev
+ poppler-dev poppler-qt4-dev py-dbus py-pycountry py-lxml icu-dev py-sip-dev
+ desktop-file-utils py-sqlite sqlite-dev chmlib-dev podofo-dev py-netifaces
+ py-psutil py-dateutil py-cherrypy py-beautifulsoup py-mechanize py-cssutils
+ py-dnspython shared-mime-info unrar xdg-utils libmtp-dev libwmf-dev"
+makedepends="$depends_dev"
+install=""
+subpackages=""
+source="http://downloads.sourceforge.net/${pkgname}/${pkgname}-${pkgver}.tar.xz
+ 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 || return 1
+ python setup.py resources || return 1
+ python setup.py translations
+}
+package() {
+ cd "$_builddir"
+ # More on desktop integration (e.g. enforce arch defaults)
+ sed -i -e "/self.create_uninstaller()/,/os.rmdir(config_dir)/d" \
+ -e "s|self.opts.staging_sharedir, 'man/man1'|self.opts.staging_root, 'usr/share/man/man1'|" \
+ -e "s|manpath, prog+'.1'+__appname__+'.bz2'|manpath, prog+'.1'+'.bz2'|" \
+ -e "s|old_udev = '/etc|old_udev = '${pkgdir}/etc|" \
+ -e "s/^Name=calibre/Name=Calibre/g" src/calibre/linux.py
+ # Create a dir for ebook repository
+ mkdir -p "${pkgdir}/var/lib/calibre"
+ # 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 \
+ --no-postinstall \
+ --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="53ab4be53567b254099a48a31ecf41ec calibre-0.9.8.tar.xz
+a53086675b33859da1d18cc21daa090b calibre.confd
+96a7744a8b5d63ed8fbe3c4919b0e40f calibre.initd"
diff --git a/unmaintained/calibre/calibre.confd b/unmaintained/calibre/calibre.confd
new file mode 100644
index 000000000..c20e67699
--- /dev/null
+++ b/unmaintained/calibre/calibre.confd
@@ -0,0 +1,6 @@
+DAEMON=/usr/bin/$NAME
+PIDFILE=/var/run/$NAME.pid
+CONTENT=/var/lib/calibre
+PORT=8080
+MAX_COVER=600x800
+DAEMON_ARGS="--auto-reload --with-library=$CONTENT --pidfile=$PIDFILE --port=$PORT --max-cover=$MAX_COVER --daemonize"
diff --git a/unmaintained/calibre/calibre.initd b/unmaintained/calibre/calibre.initd
new file mode 100644
index 000000000..25117ed37
--- /dev/null
+++ b/unmaintained/calibre/calibre.initd
@@ -0,0 +1,17 @@
+#!/sbin/runscript
+
+depend() {
+ need net
+ after firewall
+}
+start() {
+ ebegin "Starting Calibre Server"
+ start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- $DAEMON_ARGS
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping Calibre Server"
+ start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE
+ eend $?
+}