mirror of
https://gitdl.cn/https://github.com/chakralinux/desktop.git
synced 2025-01-25 02:52:13 +08:00
62 lines
2.4 KiB
Bash
62 lines
2.4 KiB
Bash
# Apps Packages for Chakra, part of chakra-project.org
|
|
# maintainer: abveritas@chakra-project.org
|
|
# contributor: Fabian Kosmale <0inkane@googlemail.com>
|
|
|
|
pkgname=calibre
|
|
pkgver=0.9.14
|
|
pkgrel=1
|
|
pkgdesc="Ebook management application"
|
|
arch=('x86_64')
|
|
url="http://calibre.kovidgoyal.net/"
|
|
license=('GPL3')
|
|
depends=('python2' 'python2-imaging' 'libusb' 'pyqt' 'python-mechanize'
|
|
'imagemagick' 'dbus-python' 'python-lxml' 'beautiful-soup' 'python-dateutil'
|
|
'python-cssutils' 'desktop-file-utils' 'python-dnspython' 'libmtp'
|
|
'podofo' 'xdg-utils' 'cherrypy' 'python-pypdf' 'unrar' 'chmlib' 'poppler'
|
|
'poppler-qt' 'icu' 'libwmf' 'libffi' 'python2-six' 'python2-netifaces' 'python2-cssselect')
|
|
makedepends=('python-pycountry' 'qt-private-headers')
|
|
optdepends=('ipython: to use calibre-debug')
|
|
screenshot=('https://lh5.googleusercontent.com/_lG58t3XWd3c/TcNwiXkAx_I/AAAAAAAAAEc/M34I4uY9UUY/s800/gui.jpeg')
|
|
install=calibre.install
|
|
source=("http://calibre-ebook.googlecode.com/files/${pkgname}-${pkgver}.tar.xz"
|
|
'desktop_integration.patch')
|
|
md5sums=('0a809b1c1378f95a69337b9bc8207493'
|
|
'cbf6da95f3885e80d3d8b0ae2733674d')
|
|
|
|
build() {
|
|
cd "${srcdir}/${pkgname}"
|
|
|
|
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")
|
|
|
|
LANG='en_US.UTF-8' python2 setup.py build
|
|
LANG='en_US.UTF-8' python2 setup.py translations
|
|
}
|
|
|
|
package() {
|
|
cd ${pkgname}
|
|
|
|
patch -p1 -i "${srcdir}/desktop_integration.patch"
|
|
|
|
# More on desktop integration (e.g. enforce Chakra 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
|
|
|
|
# Fix the environment module location
|
|
sed -i -e "s|(prefix=.*)|(prefix='$pkgdir/usr')|g" setup/install.py
|
|
|
|
mkdir -p ${pkgdir}/usr/lib/python2.7/site-packages
|
|
python2 setup.py install --root=${pkgdir}/ --prefix=/usr \
|
|
--staging-bindir=${pkgdir}/usr/bin \
|
|
--staging-libdir=${pkgdir}/usr/lib \
|
|
--staging-sharedir=${pkgdir}/usr/share
|
|
|
|
find ${pkgdir} -type d -empty -delete
|
|
}
|
|
|