From 7a4f3457a1e00122f6b121b5c7511bfba41a29c5 Mon Sep 17 00:00:00 2001 From: André Fabian Silva Delgado Date: Fri, 17 Aug 2012 15:45:15 -0300 Subject: mcomix-libre: new package for [libre] repo --- libre/mcomix-libre/PKGBUILD | 47 +++++++++++++++++++++++++++++++++++++++ libre/mcomix-libre/mcomix.install | 32 ++++++++++++++++++++++++++ 2 files changed, 79 insertions(+) create mode 100644 libre/mcomix-libre/PKGBUILD create mode 100644 libre/mcomix-libre/mcomix.install diff --git a/libre/mcomix-libre/PKGBUILD b/libre/mcomix-libre/PKGBUILD new file mode 100644 index 000000000..d30bbb1a3 --- /dev/null +++ b/libre/mcomix-libre/PKGBUILD @@ -0,0 +1,47 @@ +# $Id$ +# Maintainer: schuay +# Contributor: Ray Powell +# Maintainer (Parabola): André Silva + +_pkgname=mcomix +pkgname=mcomix-libre +pkgver=0.99 +pkgrel=1 +pkgdesc="A user-friendly, customizable image viewer specifically designed to handle comic books" +arch=('any') +url="http://sourceforge.net/projects/mcomix/" +license=('GPL') +depends=('pygtk' 'python-imaging' 'xdg-utils' 'python2' \ + 'desktop-file-utils' 'hicolor-icon-theme' 'python2-distribute') +makedepends=('gettext' 'intltool') +optdepends=('ununrar: for rar compressed comics') +conflicts=('mcomix' 'comix') +replaces=('mcomix' 'comix') +provides=("mcomix=${pkgver}") +install='mcomix.install' +source=("http://downloads.sourceforge.net/project/mcomix/MComix-${pkgver}/mcomix-${pkgver}.tar.bz2") + +build() { + cd ${srcdir}/${_pkgname}-${pkgver} + + # 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 +} + +package() { + cd ${srcdir}/${_pkgname}-${pkgver} + + export PYTHONPATH=${pkgdir}/usr/lib/python2.7/site-packages/ + mkdir -p $PYTHONPATH + + python2 setup.py install --prefix=${pkgdir}/usr --optimize=1 \ + --single-version-externally-managed --root=/ + + install -Dm644 mime/comicbook.schemas \ + ${pkgdir}/usr/share/gconf/schemas/mcomix.schemas +} + +md5sums=('a1ff7e1955042069d5005b4034e7a914') diff --git a/libre/mcomix-libre/mcomix.install b/libre/mcomix-libre/mcomix.install new file mode 100644 index 000000000..2d3c6c3e3 --- /dev/null +++ b/libre/mcomix-libre/mcomix.install @@ -0,0 +1,32 @@ +pkgname=mcomix + +post_install() { + if [ -f usr/bin/xdg-icon-resource ]; then + xdg-icon-resource forceupdate + fi + if [ -f usr/sbin/gconfpkg ]; then + usr/sbin/gconfpkg --install ${pkgname} + fi + update-desktop-database -q +} + +pre_upgrade() { + pre_remove $1 +} + +post_upgrade() { + post_install $1 +} + +pre_remove() { + if [ -f usr/sbin/gconfpkg ]; then + usr/sbin/gconfpkg --uninstall ${pkgname} + fi +} + +post_remove() { + if [ -f usr/bin/xdg-icon-resource ]; then + xdg-icon-resource forceupdate + fi + update-desktop-database -q +} -- cgit v1.2.3