From 730ac1fa5bef1ab3ecf8469a5b5913f0274dce8f Mon Sep 17 00:00:00 2001 From: André Fabian Silva Delgado Date: Thu, 4 Sep 2014 23:47:34 -0300 Subject: mcomix: remove libre suffix and add complex pkgrel --- libre/mcomix/PKGBUILD | 65 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 libre/mcomix/PKGBUILD (limited to 'libre/mcomix/PKGBUILD') diff --git a/libre/mcomix/PKGBUILD b/libre/mcomix/PKGBUILD new file mode 100644 index 000000000..3727242e8 --- /dev/null +++ b/libre/mcomix/PKGBUILD @@ -0,0 +1,65 @@ +# $Id: PKGBUILD 106934 2014-03-10 18:30:38Z schuay $ +# Maintainer (Arch): schuay +# Contributor (Arch): Ray Powell +# Maintainer: André Silva + +pkgname=mcomix +pkgver=1.00 +pkgrel=6.parabola1 +pkgdesc="A user-friendly, customizable image viewer specifically designed to handle comic books, without nonfree unrar support" +arch=('any') +url="http://sourceforge.net/projects/mcomix/" +license=('GPL') +depends=('pygtk' 'python2-pillow' 'xdg-utils' 'python2' \ + 'desktop-file-utils' 'hicolor-icon-theme' 'python2-setuptools') +makedepends=('gettext' 'intltool') +conflicts=('comix' 'mcomix-libre') +replaces=('comix' 'mcomix-libre') +install='mcomix.install' +source=("http://downloads.sourceforge.net/project/mcomix/MComix-${pkgver}/mcomix-${pkgver}.tar.bz2" + 'zoom.patch' + 'libre.patch') + +prepare() { + cd ${srcdir}/${pkgname}-${pkgver} + + # Remove nonfree unRAR support + rm -v mcomix/archive/rar{,file}.py + rm -v mime/icons/*/application-x-cbr.png + patch -Np1 -i ${srcdir}/libre.patch +} + +build() { + cd ${srcdir}/${pkgname}-${pkgver} + + # https://www.archlinux.org/todo/replace-pil-with-pillow/ + sed -i 's/import Image/from PIL import Image/' mime/comicthumb + + # python2 fix + for file in $(grep -Rl "/usr/bin/env python" .); + do + sed -i 's_#!/usr/bin/env python_#!/usr/bin/env python2_' $file + done + + # Fix zoom in, zoom out keyboard shortcuts: + # https://sourceforge.net/p/mcomix/bugs/62/ + patch -Np1 < ${srcdir}/zoom.patch +} + +package() { + cd ${srcdir}/${pkgname}-${pkgver} + + export PYTHONPATH=${pkgdir}/usr/lib/python2.7/site-packages/ + mkdir -p $PYTHONPATH + + python2 setup.py install --prefix=/usr --optimize=1 \ + --single-version-externally-managed --root=${pkgdir} + + install -Dm755 mime/comicthumb ${pkgdir}/usr/bin/comicthumb + install -Dm644 mime/comicthumb.1.gz ${pkgdir}/usr/share/man/man1/comicthumb.1.gz + install -Dm644 mime/comicbook.schemas ${pkgdir}/usr/share/gconf/schemas/mcomix.schemas +} + +md5sums=('3a916dd9da17043ab59ccd17e26eb932' + 'c80705bf6f132bfba20dcb84b79c9cb7' + 'cbb3730d3bed153b88208163e83d60e2') -- cgit v1.2.3-54-g00ecf