archrelease: copy trunk to extra-x86_64
[arch-packages.git] / foomatic-db / trunk / PKGBUILD
blob704bb64af0631f033aefe7fa1dde0bdf65e1df06
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=20230402
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=d883a215dc062e478c64d4e2eee9b0e39e6c629d                    #2023-03-30
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
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
75    
76    # add some docs
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"
106  license=('custom')
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
113    
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"
120  license=('custom')
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
126    
127    install -Dm644 COPYING "${pkgdir}"/usr/share/licenses/${pkgname}/COPYING