summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 150e5e0a35ada65f93fba1250de53f201cd1a2ff (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
# Maintainer: Noeljnuior <liamgliamgmailcom>
# Contributor: redden0t8 -- contact via Arch Linux forums or AUR
# Contributor: Andreas Radke <andyrtr at archlinux.org>
# Contributor: Thomas Baechler <thomas.baechler@rwth-aachen.de>

pkgname=cups-pdf-to-pdf-git
pkgver=3.0.1_r7.63ab5e7
uppkgver=3.0.1
pkgrel=1
pkgdesc="CUPS-PDF v3 with text print support"
arch=(i686 x86_64)
depends=('cups' 'ghostscript')
provides=("cups-pdf=${pkgver}")
conflicts=('cups-pdf')
url="https://github.com/alexivkin/CUPS-PDF-to-PDF"
license=('GPL2')
source=("$pkgname::git+https://github.com/alexivkin/CUPS-PDF-to-PDF")
backup=(etc/cups/cups-pdf.conf)
md5sums=('SKIP')

build() {
    cd "$srcdir/$pkgname/"
    [ -z "$CC" ] && CC=gcc
    $CC $CFLAGS -lcups -Wall -o cups-pdf cups-pdf.c
    echo CFLAGS $CFLAGS
}

package() {
    cd "$srcdir/$pkgname/"
    install -D -m700 cups-pdf $pkgdir/usr/lib/cups/backend/cups-pdf

    # Install Postscript Color printer
    install -D -m644 CUPS-PDF_opt.ppd $pkgdir/usr/share/cups/model/CUPS-PDF_opt.ppd
    install -D -m644 CUPS-PDF_noopt.ppd $pkgdir/usr/share/cups/model/CUPS-PDF_noopt.ppd

    # Install config file & use lp group from cups pkg
    install -D -m644 -g lp cups-pdf.conf $pkgdir/etc/cups/cups-pdf.conf
}

pkgver() {
    cd "$srcdir/$pkgname/"
  printf "%s_r%s.%s" "$uppkgver" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}