[arch-commits] Commit in sane/trunk (PKGBUILD libv4l-0.8.3.patch sane.install)

Andrea Scarpino andrea at archlinux.org
Mon May 9 20:29:22 UTC 2011


    Date: Monday, May 9, 2011 @ 16:29:22
  Author: andrea
Revision: 123295

disable lock dir usage and remove it from package; add patch to build with v4l-utils 0.8.3

Added:
  sane/trunk/libv4l-0.8.3.patch
Modified:
  sane/trunk/PKGBUILD
  sane/trunk/sane.install

--------------------+
 PKGBUILD           |   33 +++++++++++++++-----------
 libv4l-0.8.3.patch |   64 +++++++++++++++++++++++++++++++++++++++++++++++++++
 sane.install       |   10 +++----
 3 files changed, 88 insertions(+), 19 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2011-05-09 20:15:36 UTC (rev 123294)
+++ PKGBUILD	2011-05-09 20:29:22 UTC (rev 123295)
@@ -1,12 +1,14 @@
 # $Id$
 # Maintainer: Tobias Powalowski <tpowa at archlinux.org>
-# Contributed by Sarah Hay <sarahhay at mb.sympatico.ca>, Tobias Powalowski <t.powa at gmx.de>, Simo L. <neotuli at yahoo.com>, eric <eric at archlinux.org>
+# Contributor: Sarah Hay <sarahhay at mb.sympatico.ca>
+# Contributor: Simo L. <neotuli at yahoo.com>
+# Contributor: eric <eric at archlinux.org>
 
 pkgname=sane
 pkgver=1.0.22
-pkgrel=1
+pkgrel=2
 pkgdesc="Scanner Access Now Easy"
-url="http://www.sane-project.org"
+url="http://www.sane-project.org/"
 arch=('i686' 'x86_64')
 license=('GPL')
 depends=('libtiff>=3.9.2-2' 'libgphoto2>=2.4.7-2' 'libjpeg>=8' 'libieee1284' 'libusb-compat' 'v4l-utils' 'avahi' 'bash')
@@ -14,12 +16,21 @@
 install=$pkgname.install
 backup=(etc/sane.d/{abaton.conf,agfafocus.conf,apple.conf,artec.conf,artec_eplus48u.conf,avision.conf,bh.conf,canon.conf,canon630u.conf,canon_dr.conf,canon_pp.conf,cardscan.conf,coolscan2.conf,coolscan3.conf,coolscan.conf,dc25.conf,dc210.conf,dc240.conf,dell1600n_net.conf,dll.conf,dmc.conf,epjitsu.conf,epson.conf,epson2.conf,fujitsu.conf,genesys.conf,gphoto2.conf,gt68xx.conf,hp.conf,hp3900.conf,hp4200.conf,hp5400.conf,hpsj5s.conf,hs2p.conf,ibm.conf,kodak.conf,leo.conf,lexmark.conf,ma1509.conf,magicolor.conf,matsushita.conf,microtek.conf,microtek2.conf,mustek.conf,mustek_pp.conf,mustek_usb.conf,nec.conf,net.conf,p5.conf,pie.conf,pixma.conf,plustek.conf,plustek_pp.conf,qcam.conf,ricoh.conf,rts8891.conf,s9036.conf,saned.conf,sceptre.conf,sharp.conf,sm3840.conf,snapscan.conf,sp15c.conf,st400.conf,stv680.conf,tamarack.conf,teco1.conf,teco2.conf,teco3.conf,test.conf,u12.conf,umax.conf,umax1220u.conf,umax_pp.conf,xerox_mfp.conf,v4l.conf} etc/xinetd.d/sane)
 source=(ftp://ftp2.sane-project.org/pub/sane/$pkgname-backends-$pkgver/$pkgname-backends-$pkgver.tar.gz
-        sane.xinetd)
+        'sane.xinetd'
+        'libv4l-0.8.3.patch')
 options=(!libtool)
 
 build() {
   cd "${srcdir}/${pkgname}-backends-${pkgver}"
-  ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --with-docdir=/usr/share/doc/sane --enable-avahi
+
+  patch -p1 -i "${srcdir}"/libv4l-0.8.3.patch
+
+  ./configure --prefix=/usr \
+    --sysconfdir=/etc \
+    --localstatedir=/var \
+    --with-docdir=/usr/share/doc/sane \
+    --enable-avahi \
+    --disable-locking
   make
 }
 
@@ -33,16 +44,10 @@
     "${pkgdir}/lib/udev/rules.d/53-sane.rules"
   # fix udev rules
   sed -i 's|NAME="%k", ||g' ${pkgdir}/lib/udev/rules.d/53-sane.rules
-  # fix group on /var/lock
-  mkdir -p "${pkgdir}/var/lock/sane"
-  chgrp 0 "${pkgdir}/var"
-  chmod 755 "${pkgdir}/var"
-  chmod 1777 "${pkgdir}/var/lock"
-  chgrp 0 "${pkgdir}/var/lock"
-  chmod 775 "${pkgdir}/var/lock/sane"
-  chgrp 96 "${pkgdir}/var/lock/sane"
+  
   # install xinetd file
   install -D -m644 "${srcdir}/sane.xinetd" "${pkgdir}/etc/xinetd.d/sane"
 }
 md5sums=('fadf56a60f4776bfb24491f66b617cf5'
-         'da946cc36fb83612162cf9505986d4b2')
+         'da946cc36fb83612162cf9505986d4b2'
+         'e645a8921cff9f18ffbdabb2ed885060')

Added: libv4l-0.8.3.patch
===================================================================
--- libv4l-0.8.3.patch	                        (rev 0)
+++ libv4l-0.8.3.patch	2011-05-09 20:29:22 UTC (rev 123295)
@@ -0,0 +1,64 @@
+From 26c69b228b29f612faf4b0cc85db969ee7cc4ea6 Mon Sep 17 00:00:00 2001
+From: Nils Philippsen <nils at redhat.com>
+Date: Mon, 14 Mar 2011 13:35:05 +0100
+Subject: [PATCH] patch: v4l
+
+Squashed commit of the following:
+
+commit 23381932c76846191b42a48e505b37cd74711265
+Author: Julien BLACHE <jb at jblache.org>
+Date:   Wed Feb 16 19:37:43 2011 +0100
+
+    Fix v4l build with libv4l 0.8.3+
+
+    (cherry picked from commit c5ca46c2d1be78c651afb843cc834cf2b5b24953)
+
+    Conflicts:
+
+    	ChangeLog
+
+    Signed-off-by: Nils Philippsen <nils at redhat.com>
+---
+ backend/v4l.c |    3 +--
+ backend/v4l.h |    3 ++-
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/backend/v4l.c b/backend/v4l.c
+index 6510ef0..38595ed 100644
+--- a/backend/v4l.c
++++ b/backend/v4l.c
+@@ -84,9 +84,8 @@
+ #include "../include/sane/sanei_config.h"
+ #define V4L_CONFIG_FILE "v4l.conf"
+ 
+-#include "v4l.h"
+-
+ #include <libv4l1.h>
++#include "v4l.h"
+ 
+ static const SANE_Device **devlist = NULL;
+ static int num_devices;
+diff --git a/backend/v4l.h b/backend/v4l.h
+index 588b96e..6aee586 100644
+--- a/backend/v4l.h
++++ b/backend/v4l.h
+@@ -29,6 +29,7 @@
+ #ifndef v4l_h
+ #define v4l_h
+ 
++#ifndef __LINUX_VIDEODEV_H
+ /* Kernel interface */
+ /* Only the stuff we need. For more features, more defines are needed */
+ 
+@@ -165,7 +166,7 @@ struct video_channel
+ 
+ 
+ /* end of kernel interface */
+-
++#endif /* !__LINUX_VIDEODEV_H */
+ 
+ #include <../include/sane/sane.h>
+ 
+-- 
+1.7.4
+

Modified: sane.install
===================================================================
--- sane.install	2011-05-09 20:15:36 UTC (rev 123294)
+++ sane.install	2011-05-09 20:29:22 UTC (rev 123295)
@@ -1,6 +1,5 @@
-# arg 1:  the new package version
 post_install() {
-getent group scanner >/dev/null || usr/sbin/groupadd -g 96 scanner
+    getent group scanner >/dev/null 2>&1 || groupadd -g 96 scanner &>/dev/null
 	/bin/cat <<THEEND
 NOTE
 ----
@@ -8,7 +7,8 @@
 THEEND
 }
 
-# arg 1:  the old package version
-pre_remove() {
-  usr/sbin/groupdel scanner &>/dev/null
+post_remove() {
+    if getent group scanner >/dev/null 2>&1; then
+        groupdel scanner
+    fi
 }




More information about the arch-commits mailing list