summaryrefslogtreecommitdiff
path: root/extra/foomatic/PKGBUILD
blob: a40138ff34dd4a941cb6bcf84e4c9b4724de0797 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
# $Id: PKGBUILD 163470 2012-07-12 17:32:05Z andyrtr $
# Maintainer: Andreas Radke <andyrtr@archlinux.org>
 
pkgbase="foomatic"
pkgname=('foomatic-db' 'foomatic-filters' 'foomatic-db-engine' 'foomatic-db-nonfree')
arch=('i686' 'x86_64') # needs to be changed  in the subpackages when makepkg will support it
_snapdate=20120712
_filtersver=4.0.17
_enginever=4.0.8
pkgver=${_filtersver}_${_snapdate}
pkgrel=1
epoch=1
makedepends=('cups' 'perl' 'libxml2' 'enscript' 'perl' 'net-snmp' 'bash')
_url1=http://www.openprinting.org/download/foomatic/
_url2=ftp://ftp.archlinux.org/other/foomatic/
source=(${_url1}/$pkgbase-filters-${_filtersver}.tar.gz
        ${_url1}/$pkgbase-db-engine-${_enginever}.tar.gz
        ${_url2}/$pkgbase-db-4.0-${_snapdate}.tar.gz				# switch after build url1 -> url2
        ${_url2}/$pkgbase-db-nonfree-${_snapdate}.tar.gz) 			# switch after build url1 -> url2
url="http://www.linuxprinting.org/foomatic.html"
options=('!emptydirs')
md5sums=('b05f5dcbfe359f198eef3df5b283d896'
         '5283cd5125a96dc0b35d896326512b1a'
         '7ea8ed6c34495e237d8071ab5821e871'
         'da4fbbb3556f56d2f5f922af3face539')

package_foomatic-db() {

 pkgdesc="Foomatic - The collected knowledge about printers, drivers, and driver options in XML files, used by foomatic-db-engine to generate PPD files."
# arch=('any')
 license=('GPL' 'custom')
 depends=('perl' 'libxml2')
 replaces=('foomatic-db-ppd' 'foomatic-db-hpijs')
 conflicts=('foomatic-db-ppd' 'foomatic-db-hpijs')
 provides=('foomatic-db-hpijs')

   cd ${srcdir}/${pkgname}-${_snapdate}
   ./configure --prefix=/usr
   make DESTDIR=${pkgdir} install
   install -v -Dm644 ${srcdir}/${pkgname}-${_snapdate}/COPYING ${pkgdir}/usr/share/licenses/${pkgname}/COPYING
}

package_foomatic-filters() {

 pkgdesc="Foomatic - Filter scripts used by the printer spoolers to convert the incoming PostScript data into the printer's native format."
# arch=('i686' 'x86_64')
 license=('GPL')
 backup=(etc/foomatic/filter.conf)
 depends=('glibc' 'dbus-core')
 optdepends=('perl:      for the "beh" Backend End Handler used by cups'
            'net-snmp:  certain (mostly HP) printers need it to work')

   cd ${srcdir}/foomatic-filters-${_filtersver}
   ./configure --prefix=/usr --sysconfdir=/etc
   make
   make DESTDIR=${pkgdir} install
}

package_foomatic-db-engine() {

 pkgdesc="Foomatic - Foomatic's database engine generates PPD files from the data in Foomatic's XML database. It also contains scripts to directly generate print queues and handle jobs."
# arch=(i686 x86_64)
 license=('GPL')
 depends=('perl' 'libxml2' 'foomatic-filters' 'bash')

   cd ${srcdir}/foomatic-db-engine-${_enginever}
    ./configure --prefix=/usr
   make
   eval `perl -V:archname`
   make DESTDIR=${pkgdir} \
        INSTALLARCHLIB=/usr/lib/perl5/vendor_perl/ \
        INSTALLSITELIB=/usr/lib/perl5/vendor_perl/ \
        INSTALLSITEARCH=/usr/lib/perl5/vendor_perl/ install
   /usr/bin/find ${pkgdir} -name '.packlist' -delete
   # fix permissions
   chmod 755 ${pkgdir}/usr/lib{,/perl5,/perl5/vendor_perl}
}

package_foomatic-db-nonfree() {

 pkgdesc="Foomatic - database extension consisting of manufacturer-supplied PPD files released under non-free licenses"
# arch=('any')
 license=('custom')
 depends=('perl' 'libxml2' "foomatic-db-engine" 'foomatic-db')

   cd ${srcdir}/foomatic-db-nonfree-${_snapdate}
   ./configure --prefix=/usr
   make DESTDIR=${pkgdir} install
   install -Dm644 COPYING ${pkgdir}/usr/share/licenses/${pkgname}/COPYING
}