diff options
-rw-r--r-- | libre/calibre/PKGBUILD | 77 | ||||
-rw-r--r-- | libre/calibre/calibre.install | 1 |
2 files changed, 32 insertions, 46 deletions
diff --git a/libre/calibre/PKGBUILD b/libre/calibre/PKGBUILD index 0d2a48282..17a3142db 100644 --- a/libre/calibre/PKGBUILD +++ b/libre/calibre/PKGBUILD @@ -1,4 +1,4 @@ -# $Id: PKGBUILD 138399 2015-08-16 08:18:11Z jelle $ +# $Id: PKGBUILD 139022 2015-08-31 18:19:44Z jelle $ # Maintainer (Arch): Jelle van der Waa <jelle@vdwaa.nl> # Maintainer (Arch): Daniel Wallace <danielwallace at gtmanfred dot com> # Contributor (Arch): Giovanni Scafora <giovanni@archlinux.org> @@ -8,12 +8,12 @@ # Maintainer: André Silva <emulatorman@parabola.nu> pkgname=calibre -_pkgname=$pkgname-libre -pkgver=2.35.0 -pkgrel=1.parabola1 +_pkgname=calibre-libre +pkgver=2.36.0 +pkgrel=2.parabola1 pkgdesc="Ebook management application, without nonfree decompression engine for RAR archives" arch=('i686' 'x86_64') -url="http://$pkgname-ebook.com/" +url="http://calibre-ebook.com/" license=('GPL3') depends=('python2-six' 'python2-dateutil' 'python2-cssutils' 'python2-cherrypy' 'python2-mechanize' 'podofo' 'libwmf' @@ -21,33 +21,35 @@ depends=('python2-six' 'python2-dateutil' 'python2-cssutils' 'python2-cherrypy' 'python2-pillow' 'shared-mime-info' 'python2-dnspython' 'python2-pyqt5' 'python2-psutil' 'icu=55.1' 'libmtp' 'python2-dbus' 'python2-netifaces' 'python2-cssselect' 'python2-apsw' 'qt5-webkit' - 'qt5-svg' 'python2-chardet' 'python2-html5lib' 'python2-pygments' 'mtdev') -makedepends=('python2-pycountry' 'qt5-x11extras') -optdepends=("ipython2: to use $pkgname-debug" + 'qt5-svg' 'python2-chardet' 'python2-html5lib' 'python2-pygments' 'mtdev' + 'desktop-file-utils' 'gtk-update-icon-cache') +makedepends=('qt5-x11extras' 'xdg-utils') +optdepends=('ipython2: to use calibre-debug' 'udisks: required for mounting certain devices' + 'poppler: required for converting pdf to html' ) replaces=($_pkgname) conflicts=($_pkgname) -install=$pkgname.install +install=calibre.install mksource=("http://download.$pkgname-ebook.com/${pkgver}/$pkgname-${pkgver}.tar.xz") source=("https://repo.parabola.nu/other/${_pkgname}/${_pkgname}-${pkgver}.tar.xz" 'libre.patch') -mkmd5sums=('2d4652c0247ae963186bd990a734bf00') -md5sums=('c8e2eab33a27f3b83b7729ea0874b5b6' +mkmd5sums=('f22f3666d6ab70faa52b01552b6f5965') +md5sums=('76f7a0b10a6f8c6f5d62ccd4db168638' '7e07f0c7cf71fdfd5950e5d648b07fd0') mksource(){ - cd "${srcdir}/${pkgname}-${pkgver}" + cd "${pkgname}-${pkgver}" # Remove nonfree unRAR utility files from the source rm -rv src/unrar } prepare(){ - cd "${srcdir}/${pkgname}-${pkgver}" + cd "${pkgname}-${pkgver}" # Remove nonfree rar/cbr support and references - rm -v src/$pkgname/{ebooks/metadata/rar.py,utils/unrar.{cpp,py}} + rm -v src/calibre/{ebooks/metadata/rar.py,utils/unrar.{cpp,py}} rm -v resources/images/mimetypes/{cbr,rar}.png rm -v imgsrc/mimetypes/rar.svg patch -Np1 -i "${srcdir}/libre.patch" @@ -58,52 +60,35 @@ prepare(){ src/html5lib \ src/chardet - sed -i "s/shlex.split(ldflags)/& + ['-fPIC']/" setup/extensions.py - - # Use python2 - sed -i 's:\(env[ ]\+python$\|/usr/bin/python$\):\12:g' $(find . -regex ".*\.py\|.*\.recipe") - # Desktop integration (e.g. enforce arch defaults) sed -e "/self.create_uninstaller()/,/os.rmdir(config_dir)/d" \ - -e "/\(cc('xdg-icon-resource\|self.icon_resources.append\|'128'))\)/d" \ - -e "/render_img/ s/\('calibre-.*\.png'\)/os.path.join(dir, \1)/g" \ - -e "/dir, 'calibre-lrf.png'/i \ -\ dir = os.path.join(self.opts.staging_sharedir,'../pixmaps')\n\ -\ os.mkdir(dir)" \ - -e "/f = open/ s/\('calibre-.*\.desktop'\)/os.path.join(dir, \1)/g" \ - -e "/dir, 'calibre-lrfviewer.desktop'/i \ -\ dir = os.path.join(self.opts.staging_sharedir,'../applications')\n\ -\ os.mkdir(dir)" \ + -e "/cc(\['xdg-desktop-menu', 'forceupdate'\])/d" \ + -e "/cc(\['xdg-mime', 'install', MIME\])/d" \ -e "s/'ctc-posml'/'text' not in mt and 'pdf' not in mt and 'xhtml'/" \ -e "s/^Name=calibre/Name=Calibre/g" \ - -i src/$pkgname/linux.py + -i src/calibre/linux.py } build() { - cd "${srcdir}/${pkgname}-${pkgver}" + cd "${pkgname}-${pkgver}" LANG='en_US.UTF-8' python2 setup.py build - # LANG='en_US.UTF-8' python2 setup.py resources - - # Don't build translations since building them is broken badly - #LANG='en_US.UTF-8' python2 setup.py translations + LANG='en_US.UTF-8' python2 setup.py gui } package() { - cd "${srcdir}/${pkgname}-${pkgver}" - - # Fix the environment module location - sed -i -e "s|(prefix=.*)|(prefix='$pkgdir/usr')|g" setup/install.py + cd "${pkgname}-${pkgver}" + + install -d "${pkgdir}/usr/share/zsh/site-functions" \ + "${pkgdir}"/usr/share/{applications,desktop-directories,icons/hicolor} - install -d "${pkgdir}/usr/lib/python2.7/site-packages" \ - "${pkgdir}/usr/share/zsh/site-functions" + install -Dm644 resources/calibre-mimetypes.xml \ + "${pkgdir}/usr/share/mime/packages/calibre-mimetypes.xml" - LANG='en_US.UTF-8' python2 setup.py install --root="${pkgdir}" --prefix=/usr \ - --staging-bindir="${pkgdir}/usr/bin" \ - --staging-libdir="${pkgdir}/usr/lib" \ - --staging-sharedir="${pkgdir}/usr/share" + XDG_DATA_DIRS="${pkgdir}/usr/share" LANG='en_US.UTF-8' \ + python2 setup.py install --staging-root="${pkgdir}/usr" --prefix=/usr # Compiling bytecode FS#33392 - python2 -m compileall "${pkgdir}/usr/lib/$pkgname/" - python2 -O -m compileall "${pkgdir}/usr/lib/$pkgname/" + python2 -m compileall "${pkgdir}/usr/lib/calibre/" + python2 -O -m compileall "${pkgdir}/usr/lib/calibre/" } diff --git a/libre/calibre/calibre.install b/libre/calibre/calibre.install index 6210bd0ab..34ab919aa 100644 --- a/libre/calibre/calibre.install +++ b/libre/calibre/calibre.install @@ -1,6 +1,7 @@ post_install() { update-desktop-database -q update-mime-database usr/share/mime &> /dev/null + gtk-update-icon-cache -q -t -f usr/share/icons/hicolor } post_upgrade() { |