updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / mcomix / PKGBUILD
blob6b31fa1a09686c6927bad7473606c85e5d1c5980
1 # Maintainer: Ray Powell <ray_al@xphoniexx.net>
2 # Changelog: 2011-10-04 Updated to 0.94, fixed desktop icons not being installed correctly
4 pkgname=mcomix
5 pkgver=0.94
6 pkgrel=1
7 pkgdesc="A comic book viewer forked from comix"
8 #arch=('i386' 'x86_64')
9 arch=('any')
10 url="http://sourceforge.net/projects/mcomix/"
11 license=('GPL')
12 depends=('pygtk' 'pil' 'unrar' 'xdg-utils' 'python2' 'desktop-file-utils' 'hicolor-icon-theme' 'python2-distribute')
13 makedepends=('gettext' 'intltool')
14 conflicts=('comix')
15 install=mcomix.install
16 source=(http://downloads.sourceforge.net/project/mcomix/MComix-${pkgver}/mcomix-${pkgver}.tar.bz2)
17 md5sums=('46a1e9f7c99ebb29325c9925069fa6ea')
18 build() {
19         cd ${srcdir}/${pkgname}-${pkgver}
20         # python2 fix
21         for file in $(grep -Rl "/usr/bin/env python" ./);
22         do
23                 sed -i 's_#!/usr/bin/env python_#!/usr/bin/env python2_' $file
24         done
26         export PYTHONPATH=${pkgdir}/usr/lib/python2.7/site-packages/
27         mkdir -p $PYTHONPATH
28         python2 setup.py install --prefix ${pkgdir}/usr
32 package() {
33         
34         #Create needed directory structure
35         mkdir -p ${pkgdir}/usr/share/icons/hicolor
36         mkdir -p ${pkgdir}/usr/share/applications
37         cd ${srcdir}/${pkgname}-${pkgver}
39         cp -r ${pkgname}/images ${pkgdir}/usr/share/${pkgname}/
40         cp -r mime/icons/* ${pkgdir}/usr/share/icons/hicolor/
42     install -D -m644  mcomix/images/22x22/mcomix.png ${pkgdir}/usr/share/icons/hicolor/22x22/apps/mcomix.png
43     install -D -m644  mcomix/images/16x16/mcomix.png ${pkgdir}/usr/share/icons/hicolor/16x16/apps/mcomix.png
44     install -D -m644  mcomix/images/24x24/mcomix.png ${pkgdir}/usr/share/icons/hicolor/24x24/apps/mcomix.png
45     install -D -m644  mcomix/images/32x32/mcomix.png ${pkgdir}/usr/share/icons/hicolor/32x32/apps/mcomix.png
46     install -D -m644  mcomix/images/48x48/mcomix.png ${pkgdir}/usr/share/icons/hicolor/48x48/apps/mcomix.png
48         install -D -m644 mime/comicbook.schemas ${pkgdir}/usr/share/gconf/schemas/mcomix.schemas
49         install -D -m644 mime/comicthumb.1.gz ${pkgdir}/usr/share/man/man1/comicthumb.1.gz
50         install -D -m644 mime/${pkgname}.desktop ${pkgdir}/usr/share/applications/
52         rm ${pkgdir}/usr/bin/easy_install-2.7 
53         rm ${pkgdir}/usr/lib/python2.7/site-packages/*.p*