1 # Maintainer: Andreas Radke <andyrtr@archlinux.org>
4 pkgname=('foomatic-db' 'foomatic-db-ppds' 'foomatic-db-nonfree' 'foomatic-db-nonfree-ppds')
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=d883a215dc062e478c64d4e2eee9b0e39e6c629d #2023-03-30
18 foomatic-db-nonfree::git+https://github.com/OpenPrinting/foomatic-db-nonfree#commit=6ddae02ac89240c019f8b5026cfe70e30fd2b3db #2015-06-05
28 cp -a foomatic-db foomatic-db-ppds
29 cp -a foomatic-db-nonfree foomatic-db-nonfree-ppds
36 ./configure --prefix=/usr \
38 --disable-ppds-to-cups \
39 --with-drivers=NOOBSOLETES,NOEMPTYCMDLINE
43 pushd foomatic-db-ppds
45 ./configure --prefix=/usr
49 pushd foomatic-db-nonfree
51 ./configure --prefix=/usr
54 # foomatic-db-nonfree-ppds
55 pushd foomatic-db-nonfree-ppds
57 ./configure --prefix=/usr
60 # remove "hpijs" support in hplip - FS#77101
61 find -type f -name 'hpijs*' | xargs rm -vf
64 package_foomatic-db() {
66 pkgdesc="Foomatic - The collected knowledge about printers, drivers, and driver options in XML files, used by foomatic-db-engine to generate PPD files."
67 license=('GPL' 'custom')
68 optdepends=('foomatic-db-ppds: PostScript PPD files')
69 replaces=('foomatic-db-foo2zjs') # AUR pkg no more conflicting and dropped, formerly required by foo2zjs-utils
70 conflicts=('foomatic-db-foo2zjs')
71 provides=('foomatic-db-foo2zjs')
73 cd "${srcdir}"/foomatic-db
74 make DESTDIR="${pkgdir}" install
77 install -Dm644 USAGE "${pkgdir}"/usr/share/doc/${pkgname}/USAGE
78 install -Dm644 README "${pkgdir}"/usr/share/doc/${pkgname}/README
79 install -v -Dm644 "${srcdir}"/${pkgname}/COPYING "${pkgdir}"/usr/share/licenses/${pkgname}/COPYING
80 install -Dm644 "${pkgdir}"/usr/share/foomatic/db/source/PPD/Kyocera/ReadMe.htm "${pkgdir}"/usr/share/doc/${pkgname}/Kyocera/ReadMe.htm
81 # remove files from foomatic-db-ppds pkg
82 rm -rf "${pkgdir}"/usr/share/cups/model/foomatic-db-ppds
83 rm -rf "${pkgdir}"/usr/share/foomatic/db/source/PPD
86 package_foomatic-db-ppds() {
88 pkgdesc="Foomatic - PPDs from printer manufacturers"
89 license=('GPL' 'custom')
91 cd "${srcdir}"/foomatic-db-ppds
92 make DESTDIR="${pkgdir}" install
94 # remove files from foomatic-db pkg
95 rm -rf "${pkgdir}"/usr/share/foomatic/db/oldprinterids
96 rm -rf "${pkgdir}"/usr/share/foomatic/db/source/{driver,opt,printer}
97 rm -rf "${pkgdir}"/usr/share/foomatic/xmlschema
98 rm -f "${pkgdir}"/usr/share/foomatic/db/source/PPD/Kyocera/ReadMe.htm
100 install -v -Dm644 "${srcdir}"/${pkgname}/COPYING "${pkgdir}"/usr/share/licenses/${pkgname}/COPYING
103 package_foomatic-db-nonfree() {
105 pkgdesc="Foomatic - database extension consisting of manufacturer-supplied PPD files released under non-free licenses"
107 optdepends=('foomatic-db-nonfree-ppds: nonfree PPD files')
109 cd ${srcdir}/foomatic-db-nonfree
110 make DESTDIR="${pkgdir}" install
111 # remove files from foomatic-db-nonfree-ppds pkg
112 rm -rf "${pkgdir}"/usr/share/foomatic/db/source/PPD
114 install -Dm644 COPYING "${pkgdir}"/usr/share/licenses/${pkgname}/COPYING
117 package_foomatic-db-nonfree-ppds() {
119 pkgdesc="Foomatic - non-free PPDs from printer manufacturers"
122 cd ${srcdir}/foomatic-db-nonfree-ppds
123 make DESTDIR="${pkgdir}" install
124 # remove files from foomatic-db-nonfree pkg
125 rm -rf "${pkgdir}"/usr/share/foomatic/db/source/driver
127 install -Dm644 COPYING "${pkgdir}"/usr/share/licenses/${pkgname}/COPYING