summaryrefslogtreecommitdiff
path: root/libre/psutils/PKGBUILD
blob: 8b3d3a0e72170d6709f633f2b94ccf06f7202ec5 (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
# Maintainer (Arch): Ronald van Haren <ronald.archlinux.org>
# Contributor (Arch): eric <eric@archlinux.org>
# Contributor (Arch): Tom Newsom <Jeepster@gmx.co.uk>
# Maintainer (Hyperbola): André Silva <emulatorman@hyperbola.info>
# Maintainer: Omar Vega Ramos <ovruni@gnu.org.pe>
# Contributor: xihh <hahj87@gmail.com>
 
pkgname=psutils
pkgver=1.17
pkgrel=6
pkgrel+=.parabola2
arch=('x86_64')
arch+=('i686' 'armv7h')
pkgdesc="A set of postscript utilities"
pkgdesc+=", without nonfree files"
url="http://knackered.org/angus/psutils/"
license=('custom')
depends=('glibc' 'ghostscript')
provides=('psutils-lprng')
replaces=('psutils-lprng')
options=('!makeflags')
source=("https://sources.archlinux.org/other/psutils/${pkgname}-${pkgver}.tar.gz"
        'psutils-1.17.diff')
source+=('libre.patch')
sha512sums=('91feff88c885173ab1c4ba6b5ffd0d9e90bfa6105479b074065584fc2a87e78fbe71e4bc90d2e7079d86b467caf092b6744b0ea4234880ba78cad8dd7820de77'
            '795f45c6315e3c02485d1d5243c1541992b669539257249a185f57136e623c489a9f3635d3f171f698428aeb9710332cf36bb0aa0ade8ea351514044630f12f0'
            'c5eed23aa3be06cd07a79f3ff8bfcd9aa5722302a267d07b2e58a240d92f0c08a7bdde81660ef5509779cab0f6a1ca8b1e0e832818dcfd6a314035bb8df8021f')

prepare() {
  cd "${srcdir}/${pkgname}"
  # apply patch to remove nonfree files support from Makefile
  patch -Np1 -i "${srcdir}/libre.patch"
  # remove nonfree files
  rm -v {fixmacps.{man,pl},md{68_0,71_0}.ps}
}

build() {
  cd "${srcdir}/${pkgname}"
  patch -Np1 -i "${srcdir}/psutils-1.17.diff"
  make -f Makefile.unix BINDIR=/usr/bin \
    INCLUDEDIR=/usr/include/psutils PERL=/usr/bin/perl \
    MANDIR=/usr/share/man/man1 \
    CFLAGS="$CFLAGS -DPAPER=\\\"letter\\\" -DUNIX -Wall" \
    CCFLAGS="$LDFLAGS"
}

package() {
  cd "${srcdir}/${pkgname}"
  install -d -m755 "${pkgdir}/usr/include"
  install -d -m755 "${pkgdir}/usr/share/man"
  make -f Makefile.unix BINDIR="${pkgdir}/usr/bin" \
    INCLUDEDIR="${pkgdir}/usr/include/psutils" PERL=/usr/bin/perl \
    MANDIR="${pkgdir}/usr/share/man/man1" install
  install -m755 -d "${pkgdir}/usr/share/licenses/${pkgname}"
  install -m644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/"
}