summaryrefslogtreecommitdiff
path: root/libre/mcomix/PKGBUILD
blob: 1cf844b11f57975d601e17668e98182d80a0513f (plain)
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
46
47
48
49
50
51
52
53
54
55
# Maintainer (Arch): schuay <jakob.gruber@gmail.com>
# Contributor (Arch): Ray Powell <ray_al@xphoniexx.net>
# Maintainer (Hyperbola): André Silva <emulatorman@hyperbola.info>
# Maintainer: Omar Vega Ramos <ovruni@gnu.org.pe>

pkgname=mcomix
pkgver=1.2.1
pkgrel=5
pkgrel+=.parabola1
pkgdesc="A user-friendly, customizable image viewer specifically designed to handle comic books"
pkgdesc+=", without nonfree libunrar support"
arch=('any')
url="https://sourceforge.net/projects/mcomix/"
license=('GPL')
depends=('pygtk' 'python2-pillow' 'xdg-utils' 'python2' \
         'desktop-file-utils' 'hicolor-icon-theme' 'python2-setuptools')
makedepends=('gettext' 'intltool')
optdepends=('mupdf-tools: for pdf comics'
            'p7zip: for 7zip compressed comics')
conflicts=('mcomix-libre')
replaces=('mcomix-libre')
source=("https://downloads.sourceforge.net/project/mcomix/MComix-${pkgver}/mcomix-${pkgver}.tar.bz2"
        "486f02.patch"
        'libre.patch')
md5sums=('1d05ed7596bd670e5b3a97896e6d4d47'
         'e033a538925e6119a540bf084f1de878'
         '2fc7a69a673fbc4be5d1567489dd9b6e')
sha256sums=('7e43159dc585bc9bc31970a44bd2b4e42c303660c4c8cf7f0eda413a6f72fa3b'
            'be0f41404b079931bd899642fa256ac757bb3adc95f36b8cb38dec61781d87fc'
            '9037996a36782b970c736a55a315c421956bbd08511e4881d780f7c41d8945a6')

prepare() {
  cd ${srcdir}/${pkgname}-${pkgver}
  patch -Np1 < ${srcdir}/486f02.patch

  # Remove nonfree unRAR support
  rm -v mcomix/archive/rar{,_external}.py
  rm -v mime/icons/*/application-x-cbr.png
  patch -Np1 -i ${srcdir}/libre.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/comicthumb.thumbnailer ${pkgdir}/usr/share/thumbnailers/comicthumb.thumbnailer
}