archrelease: copy trunk to extra-x86_64
[arch-packages.git] / foomatic-db / trunk / PKGBUILD
bloba19b021809ed147ee0e257c12a9af63c922b65d5
1 # Maintainer: Andreas Radke <andyrtr@archlinux.org>
3 pkgbase="foomatic-db"
4 pkgname=('foomatic-db' 'foomatic-db-ppds' 'foomatic-db-nonfree' 'foomatic-db-nonfree-ppds')
5 arch=('any')
6 pkgver=20211116
7 pkgrel=1
8 epoch=3
10 makedepends=('cups' 'perl' 'libxml2' 'enscript' 'perl' 'net-snmp' 'bash' 'git')
11 url="http://www.linuxprinting.org/foomatic.html"
12 options=('!emptydirs')
14 # check https://github.com/OpenPrinting/foomatic-db
15 # for latest commits and development, currently identical to foomatic-4.0 branch
17 source=(foomatic-db::git+https://github.com/OpenPrinting/foomatic-db#commit=b35c73eafe139f5943e07ac1512abbf5a4a4b753                    #2022-11-16
18         foomatic-db-nonfree::git+https://github.com/OpenPrinting/foomatic-db-nonfree#commit=6ddae02ac89240c019f8b5026cfe70e30fd2b3db    #2015-06-05
20 sha256sums=('SKIP'
21             'SKIP')
23 pkgver() {
24   date +%Y%m%d
27 prepare(){
28   cp -a foomatic-db foomatic-db-ppds
29   cp -a foomatic-db-nonfree foomatic-db-nonfree-ppds
32 build() {
33   # foomatic-db
34   pushd foomatic-db
35   ./make_configure
36   ./configure --prefix=/usr \
37     --disable-gzip-ppds \
38     --disable-ppds-to-cups \
39     --with-drivers=NOOBSOLETES,NOEMPTYCMDLINE
40   popd
41   
42   # foomatic-db-ppds
43   pushd foomatic-db-ppds
44   ./make_configure
45   ./configure --prefix=/usr
46   popd
47   
48   # foomatic-db-nonfree
49   pushd foomatic-db-nonfree
50   ./make_configure
51   ./configure --prefix=/usr
52   popd
53   
54   # foomatic-db-nonfree-ppds
55   pushd foomatic-db-nonfree-ppds
56   ./make_configure
57   ./configure --prefix=/usr
58   popd
61 package_foomatic-db() {
63  pkgdesc="Foomatic - The collected knowledge about printers, drivers, and driver options in XML files, used by foomatic-db-engine to generate PPD files."
64  license=('GPL' 'custom')
65  optdepends=('foomatic-db-ppds: PostScript PPD files')
66  replaces=('foomatic-db-foo2zjs') # AUR pkg no more conflicting and dropped, formerly required by foo2zjs-utils
67  conflicts=('foomatic-db-foo2zjs')
68  provides=('foomatic-db-foo2zjs')
70    cd "${srcdir}"/foomatic-db
71    make DESTDIR="${pkgdir}" install
72    
73    # add some docs
74    install -Dm644 USAGE "${pkgdir}"/usr/share/doc/${pkgname}/USAGE
75    install -Dm644 README "${pkgdir}"/usr/share/doc/${pkgname}/README
76    install -v -Dm644 "${srcdir}"/${pkgname}/COPYING "${pkgdir}"/usr/share/licenses/${pkgname}/COPYING
77    install -Dm644 "${pkgdir}"/usr/share/foomatic/db/source/PPD/Kyocera/ReadMe.htm "${pkgdir}"/usr/share/doc/${pkgname}/Kyocera/ReadMe.htm
78    # remove files from foomatic-db-ppds pkg
79    rm -rf "${pkgdir}"/usr/share/cups/model/foomatic-db-ppds
80    rm -rf "${pkgdir}"/usr/share/foomatic/db/source/PPD
83 package_foomatic-db-ppds() {
85  pkgdesc="Foomatic - PPDs from printer manufacturers"
86  license=('GPL' 'custom')
88    cd "${srcdir}"/foomatic-db-ppds
89    make DESTDIR="${pkgdir}" install
91    # remove files from foomatic-db pkg
92    rm -rf "${pkgdir}"/usr/share/foomatic/db/oldprinterids
93    rm -rf "${pkgdir}"/usr/share/foomatic/db/source/{driver,opt,printer}
94    rm -rf "${pkgdir}"/usr/share/foomatic/xmlschema
95    rm -f "${pkgdir}"/usr/share/foomatic/db/source/PPD/Kyocera/ReadMe.htm
97    install -v -Dm644 "${srcdir}"/${pkgname}/COPYING "${pkgdir}"/usr/share/licenses/${pkgname}/COPYING
100 package_foomatic-db-nonfree() {
102  pkgdesc="Foomatic - database extension consisting of manufacturer-supplied PPD files released under non-free licenses"
103  license=('custom')
104  optdepends=('foomatic-db-nonfree-ppds: nonfree PPD files')
106    cd ${srcdir}/foomatic-db-nonfree
107    make DESTDIR="${pkgdir}" install
108    # remove files from foomatic-db-nonfree-ppds pkg
109    rm -rf "${pkgdir}"/usr/share/foomatic/db/source/PPD
110    
111    install -Dm644 COPYING "${pkgdir}"/usr/share/licenses/${pkgname}/COPYING
114 package_foomatic-db-nonfree-ppds() {
116  pkgdesc="Foomatic - non-free PPDs from printer manufacturers"
117  license=('custom')
119    cd ${srcdir}/foomatic-db-nonfree-ppds
120    make DESTDIR="${pkgdir}" install
121    # remove files from foomatic-db-nonfree pkg
122    rm -rf "${pkgdir}"/usr/share/foomatic/db/source/driver
123    
124    install -Dm644 COPYING "${pkgdir}"/usr/share/licenses/${pkgname}/COPYING