summaryrefslogtreecommitdiff
path: root/extra/xsane/PKGBUILD
diff options
context:
space:
mode:
authorParabola <dev@list.parabolagnulinux.org>2011-04-05 14:26:38 +0000
committerParabola <dev@list.parabolagnulinux.org>2011-04-05 14:26:38 +0000
commit415856bdd4f48ab4f2732996f0bae58595092bbe (patch)
treeede2018b591f6dfb477fe9341ba17b9bc000fab9 /extra/xsane/PKGBUILD
Tue Apr 5 14:26:38 UTC 2011
Diffstat (limited to 'extra/xsane/PKGBUILD')
-rw-r--r--extra/xsane/PKGBUILD66
1 files changed, 66 insertions, 0 deletions
diff --git a/extra/xsane/PKGBUILD b/extra/xsane/PKGBUILD
new file mode 100644
index 000000000..531985301
--- /dev/null
+++ b/extra/xsane/PKGBUILD
@@ -0,0 +1,66 @@
+# $Id: PKGBUILD 100458 2010-11-23 17:10:57Z tpowa $
+# Maintainer: Tobias Powalowski <tpowa@archlinux.org>
+# Contributor: Sarah Hay <sarahhay@mb.sympatico.ca>
+
+pkgbase=xsane
+pkgname=('xsane' 'xsane-gimp')
+pkgver=0.998
+pkgrel=1
+arch=(i686 x86_64)
+url="http://www.xsane.org"
+license=('GPL2')
+makedepends=('gtk2' 'lcms' 'sane' 'zlib' 'libjpeg' 'gimp')
+source=(http://www.xsane.org/download/$pkgname-$pkgver.tar.gz
+ xsane-0.995-xdg-open.patch)
+
+build() {
+ cd "$srcdir/$pkgname-$pkgver"
+ # fix use "xdg-open" instead of "netscape" to launch help browser - taken from Fedora
+ patch -Np1 -i ${srcdir}/xsane-0.995-xdg-open.patch || return 1
+
+ ./configure --prefix=/usr --mandir=/usr/share/man --enable-gimp
+ /usr/bin/make || return 1
+ mv src/xsane src/xsane-gimp
+
+ # build again with gimp enabled
+ make clean
+ ./configure --prefix=/usr --mandir=/usr/share/man --disable-gimp
+}
+
+package_xsane() {
+ pkgdesc="A GTK-based X11 frontend for SANE and plugin for Gimp."
+ install=$pkgname.install
+ depends=('gtk2' 'lcms' 'sane' 'zlib' 'libjpeg')
+ optdepends=('xsane-gimp; for gimp plugin support')
+ cd "$srcdir/$pkgname-$pkgver"
+ make DESTDIR="$pkgdir" install || return 1
+}
+
+package_xsane-gimp() {
+ pkgdesc="XSane Gimp plugin"
+ depends=('xsane' 'gimp')
+ cd "$srcdir/$pkgname-$pkgver"
+ install -D -m755 src/xsane-gimp ${pkgdir}/usr/bin/xsane-gimp || return 1
+
+ ## For making Gimp Plugin available
+ /bin/mkdir -p "$pkgdir/usr/lib/gimp/2.0/plug-ins"
+ cd "$pkgdir/usr/lib/gimp/2.0/plug-ins/"
+ /bin/ln -s ../../../../bin/xsane-gimp xsane
+
+# http://cvs.fedoraproject.org/viewvc/rpms/xsane/devel/xsane.spec?revision=1.80&view=markup
+# when makepkg will allow splitted pkg install file support we might change add a xsane-gimp.install file with the commands that are used by fedora,
+# gentoo has something similar
+#%post gimp
+#107 if [ -x "%{_sbindir}/gimp-plugin-mgr" ]; then
+#108 %{_sbindir}/gimp-plugin-mgr --install xsane
+#109 fi
+#110
+#111 %preun gimp
+#112 if [ $1 = 0 ]; then
+#113 if [ -x "%{_sbindir}/gimp-plugin-mgr" ]; then
+#114 %{_sbindir}/gimp-plugin-mgr --uninstall xsane
+#115 fi
+#116 fi
+}
+md5sums=('936f1cc76b37caa8f285e1e15ac7e0aa'
+ '15541ff0ddc10acfa2059cf99d5478eb')