1 # Maintainer: AndyRTR <andyrtr@archlinux.org>
3 # Contributor: Alexander Rødseth <rodseth@gmail.com>
4 # Contributor: Mateusz Herych <heniekk@gmail.com>
5 # Contributor: royrocks <royrocks13@gmail.com>
10 pkgdesc="Library for handling paper characteristics"
12 url="https://github.com/rrthomas/libpaper"
13 license=('LGPL2.1' 'GPL3')
15 backup=('etc/papersize')
16 source=(https://github.com/rrthomas/libpaper/releases/download/v$pkgver/$pkgname-$pkgver.tar.gz
18 sha256sums=('474e9575e1235a0d8e3661f072de0193bab6ea1023363772f698a2cc39d640cf'
19 '7e49c6ce67fbaea77929ab5849026412d0f91f692a902805c0134a071cccde22')
26 cp ../localepaper.c src/
39 gcc $CFLAGS $LDFLAGS -I.. -Ilibgnu -o localepaper localepaper.c libgnu/.libs/libgnupaper.a
49 make DESTDIR="$pkgdir" install
52 install -Dt "$pkgdir/usr/lib" -m0755 src/localepaper
55 # add systemwide default papersize read by many office applications
56 install -dm 755 "$pkgdir"/etc
57 echo '# Simply write the paper name. See man 1 paper and "paper --no-size --all" for possible values' > "$pkgdir"/etc/papersize
59 # add libpaper.d directory other packages can use to store files
60 install -dm 755 "$pkgdir"/etc/libpaper.d
62 # https://github.com/rrthomas/libpaper/commit/b4f6846a3a9ae052a515ac0db913e5a68f947adf
63 # reintroduced deprecated paperconf binary
64 # # add paperconf executable, needed by libreoffice
65 # cat <<EOF > "${pkgdir}"/usr/bin/paperconf
66 #exec paper --no-size "\$@"
68 # chmod 755 "${pkgdir}"/usr/bin/paperconf
70 # currently no localisation available
72 # for i in `ls *.po`; do
73 # install -dm 755 "${pkgdir}"/usr/share/locale/${i%.po}/LC_MESSAGES/;
74 # msgfmt $i -o "${pkgdir}"/usr/share/locale/${i%.po}/LC_MESSAGES/${pkgname}.mo;