updated on Wed Jan 11 00:07:16 UTC 2012
[aur-mirror.git] / sane-dev / PKGBUILD
blobe9cde5caf9336f4874c15a38dbda50593f03b829
1 # SANE (Dev): Installer: Arch
2 # Maintainer: Jeremy M. <jskier (at) gmail (dot) com>
3 # Contributor: Xavion <Xavion (dot) 0 (at) Gmail (dot) com>
4 # Contributor: Tobias Powalowski <tpowa@archlinux.org>
5 # Contributed by Sarah Hay <sarahhay@mb.sympatico.ca>, Tobias Powalowski <t.powa@gmx.de>, Simo L. <neotuli@yahoo.com>, eric <eric@archlinux.org>
6 # Maintainer: Andrew Panchenko <panchenkoac@gmail.com>
7 _basename=sane
8 pkgname=${_basename}-dev
9 pkgver=20110825
10 pkgrel=1
11 pkgdesc="Scanner Access Now Easy.  This is git version with mustek_usb2"
12 arch=("i686" "x86_64")
13 url="http://www.${_basename}-project.org"
14 license=("GPL")
15 provides=("${_basename}=${pkgver}")
16 depends=("libtiff" "libgphoto2" "libjpeg" "libieee1284" "libusb" "libv4l" "avahi" "bash")
17 conflicts=("${_basename}" "${_basename}-git" "${_basename}-mustek_usb2")
18 backup=(etc/${_basename}.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,leo.conf,lexmark.conf,ma1509.conf,matsushita.conf,microtek.conf,microtek2.conf,mustek.conf,mustek_pp.conf,mustek_usb.conf,nec.conf,net.conf,pie.conf,pixma.conf,plustek.conf,plustek_pp.conf,qcam.conf,ricoh.conf,rts8891.conf,s9036.conf,${_basename}d.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,v4l.conf} etc/xinetd.d/${_basename})
19 options=(!libtool)
20 install="${_basename}.install"
21 #source=(http://www.sane-project.org/snapshots/${_basename}-backends-git${pkgver}.tar.gz)
22 source=(${_basename}.xinetd)
23 md5sums=('da946cc36fb83612162cf9505986d4b2')
24 _gitroot="git://git.debian.org/sane/sane-backends.git"
25 _gitname="${_basename}-backends"
26 build() {
27         if [ -d $srcdir/${_gitname} ] ; then
28                 cd $srcdir/${_gitname} && git pull origin
29                 msg "The local files are updated."
30         else
31                 git clone ${_gitroot}
32         fi
33         cd "${srcdir}/${_gitname}"
35         # Build
36         ./configure --prefix=/usr --enable-pthread --sysconfdir=/etc --localstatedir=/var --with-docdir=/usr/share/doc/${_basename} --enable-avahi || return 1
37         make || return 1
38         make DESTDIR="${pkgdir}" install || return 1
40         # fix hp officejets
41         echo "#hpaio" >> "${pkgdir}/etc/${_basename}.d/dll.conf" || return 1
43         # install udev files
44         install -D -m0644 tools/udev/lib${_basename}.rules \
45         "${pkgdir}/lib/udev/rules.d/53-${_basename}.rules" || return 1
47         # fix group on /var/lock
48         mkdir -p "${pkgdir}/var/lock/${_basename}"
49         chgrp 0 "${pkgdir}/var"
50         chmod 755 "${pkgdir}/var"
51         chmod 1777 "${pkgdir}/var/lock"
52         chgrp 0 "${pkgdir}/var/lock"
53         chmod 775 "${pkgdir}/var/lock/${_basename}"
54         chgrp 96 "${pkgdir}/var/lock/${_basename}"
56         # install xinetd file
57         # It was on the previous version, but it's not working longer on my computer... Uncoment if you want !
58         install -D -m 644 "${srcdir}/${_basename}.xinetd" "${pkgdir}/etc/xinetd.d/${_basename}"