[arch-commits] Commit in xsane/trunk (4 files)

andyrtr at archlinux.org andyrtr at archlinux.org
Wed Jun 9 13:43:57 EDT 2010


    Date: Wednesday, June 9, 2010 @ 13:43:57
  Author: andyrtr
Revision: 82251

upgpkg: xsane 0.997-3
split out gimp plugin; add patch to fix the help browser

Added:
  xsane/trunk/xsane-0.995-xdg-open.patch
Modified:
  xsane/trunk/PKGBUILD
  xsane/trunk/xsane.install
Deleted:
  xsane/trunk/MissingCapsFlag.patch

----------------------------+
 MissingCapsFlag.patch      |   14 ---------
 PKGBUILD                   |   62 +++++++++++++++++++++++++++++++++----------
 xsane-0.995-xdg-open.patch |   12 ++++++++
 xsane.install              |   26 ++----------------
 4 files changed, 63 insertions(+), 51 deletions(-)

Deleted: MissingCapsFlag.patch
===================================================================
--- MissingCapsFlag.patch	2010-06-09 16:29:34 UTC (rev 82250)
+++ MissingCapsFlag.patch	2010-06-09 17:43:57 UTC (rev 82251)
@@ -1,14 +0,0 @@
---- src/xsane-back-gtk.c	2009-06-24 00:12:18.000000000 +0200
-+++ src/xsane-back-gtk,c.new	2009-06-24 00:13:41.000000000 +0200
-@@ -2612,10 +2612,7 @@
-       continue;
-     }
- 
--    if (!(opt->cap & SANE_CAP_ALWAYS_SETTABLE))
--    {
--      gtk_widget_set_sensitive(xsane.element[i].widget, sensitive);
--    }
-+    gtk_widget_set_sensitive(xsane.element[i].widget, sensitive);
-   }
- 
-   if (xsane.xsanemode_widget)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2010-06-09 16:29:34 UTC (rev 82250)
+++ PKGBUILD	2010-06-09 17:43:57 UTC (rev 82251)
@@ -2,31 +2,65 @@
 # Maintainer: Tobias Powalowski <tpowa at archlinux.org>
 # Contributor: Sarah Hay <sarahhay at mb.sympatico.ca>
 
-pkgname=xsane
+pkgbase=xsane
+pkgname=('xsane' 'xsane-gimp')
 pkgver=0.997
-pkgrel=2
-pkgdesc="A GTK-based X11 frontend for SANE and plugin for Gimp."
+pkgrel=3
 arch=(i686 x86_64)
 url="http://www.xsane.org"
 license=('GPL2')
-makedepends=('gimp')
-depends=('gtk2' 'lcms' 'sane' 'zlib' 'libjpeg')
-install=$pkgname.install
-source=(http://www.xsane.org/download/$pkgname-$pkgver.tar.gz)
+makedepends=('gtk2' 'lcms' 'sane' 'zlib' 'libjpeg' 'gimp')
+source=(http://www.xsane.org/download/$pkgname-$pkgver.tar.gz
+	xsane-0.995-xdg-open.patch)
+md5sums=('8377b3e3b792f3d2b7f13895467c7082'
+         '15541ff0ddc10acfa2059cf99d5478eb')
 
 build() {
   cd "$srcdir/$pkgname-$pkgver"
-  ./configure --prefix=/usr --mandir=/usr/share/man --disable-gimp
+  # 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
-  /usr/bin/make DESTDIR="$pkgdir" install || return 1
-  # build xsane with gimp
+  mv src/xsane src/xsane-gimp
+
+  # build again with gimp enabled
   make clean
-  ./configure --prefix=/usr
-  /usr/bin/make || return 1
-  install -D -m755 "$srcdir/$pkgname-$pkgver/src/xsane" "$pkgdir/usr/bin/xsane-gimp" || return 1
+  ./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=('sane' '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=('8377b3e3b792f3d2b7f13895467c7082')

Added: xsane-0.995-xdg-open.patch
===================================================================
--- xsane-0.995-xdg-open.patch	                        (rev 0)
+++ xsane-0.995-xdg-open.patch	2010-06-09 17:43:57 UTC (rev 82251)
@@ -0,0 +1,12 @@
+diff -up xsane-0.995/src/xsane.h.xdg-open xsane-0.995/src/xsane.h
+--- xsane-0.995/src/xsane.h.xdg-open	2007-08-13 09:20:32.000000000 +0200
++++ xsane-0.995/src/xsane.h	2007-11-23 11:50:49.000000000 +0100
+@@ -251,7 +251,7 @@
+ # elif defined(HAVE_OS2_H)
+ #  define DEFAULT_BROWSER "netscape"
+ # else
+-#  define DEFAULT_BROWSER "netscape"
++#  define DEFAULT_BROWSER "xdg-open"
+ # endif
+ #endif
+ 

Modified: xsane.install
===================================================================
--- xsane.install	2010-06-09 16:29:34 UTC (rev 82250)
+++ xsane.install	2010-06-09 17:43:57 UTC (rev 82251)
@@ -1,4 +1,6 @@
 # arg 1:  the new package version
+# arg 2:  the old package version
+
 post_install() {
   echo "NOTE:"
   echo "  If you experience any problems after installing xsane "
@@ -9,28 +11,6 @@
   echo ""
 }
 
-# arg 1:  the new package version
-# arg 2:  the old package version
 post_upgrade() {
-  echo "NOTE:"
-  echo "  If you experience any problems after upgrading xsane "
-  echo "  it may help to remove the setup and preferences files"
-  echo "  of xsane:"
-  echo ""
-  echo "    \$ rm -rf ~/.sane/xsane"
-  echo ""
+  post_install $1
 }
-
-# arg 1:  the old package version
-pre_remove() {
-  /bin/true
-}
-
-# arg 1:  the old package version
-post_remove() {
-  /bin/true
-}
-
-op=$1
-shift
-$op $*



More information about the arch-commits mailing list