summaryrefslogtreecommitdiff
path: root/libre/ponysay
diff options
context:
space:
mode:
authorAndré Fabian Silva Delgado <emulatorman@parabola.nu>2014-09-04 22:00:51 -0300
committerAndré Fabian Silva Delgado <emulatorman@parabola.nu>2014-09-04 22:00:51 -0300
commit35f7581c202decb6716adca302099aa6e136f00f (patch)
tree2509e39e657628e5fa93583293ebf9097b57e13c /libre/ponysay
parent7121fa40a8f5a195f91efcd4cb42a17c64652ed6 (diff)
downloadabslibre-35f7581c202decb6716adca302099aa6e136f00f.tar.gz
abslibre-35f7581c202decb6716adca302099aa6e136f00f.tar.bz2
abslibre-35f7581c202decb6716adca302099aa6e136f00f.zip
ponysay: remove libre suffix and add complex pkgrel
Diffstat (limited to 'libre/ponysay')
-rw-r--r--libre/ponysay/PKGBUILD48
1 files changed, 48 insertions, 0 deletions
diff --git a/libre/ponysay/PKGBUILD b/libre/ponysay/PKGBUILD
new file mode 100644
index 000000000..3248ea577
--- /dev/null
+++ b/libre/ponysay/PKGBUILD
@@ -0,0 +1,48 @@
+# Maintainer (Arch): Sven-Hendrik Haase <sh@lutzhaase.com>
+# Contributor (Arch): Erkin Batu Altunbaş <erkinbatu@gmail.com>
+# Maintainer: André Silva <emulatorman@parabola.nu>
+# Contributor: Márcio Silva <coadde@parabola.nu>
+
+_pkgname=ponysay-libre
+pkgname=ponysay
+pkgver=3.0.2
+pkgrel=1.parabola1
+pkgdesc="cowsay reimplemention for ponies, without nonfree pony graphics"
+url="http://erkin.github.com/ponysay/"
+arch=('any')
+license=('GPL3')
+replaces=($_pkgname)
+conflicts=($_pkgname)
+depends=('python' 'bash')
+makedepends=('git')
+mksource=("ponysay-$pkgver.tar.gz::https://github.com/erkin/ponysay/tarball/$pkgver")
+source=("https://repo.parabolagnulinux.org/other/$_pkgname/$_pkgname-$pkgver.tar.gz")
+mkmd5sums=('84b04705a0a57b2f43327ac6b7952013')
+md5sums=('0cf3f97b30a374f448747b7594179081')
+
+mksource() {
+ cd "$srcdir/erkin-ponysay-"*
+
+ # Generate a nonfree pony graphics list to replace it with empty files
+ # NOTE: empty files are necessary for the building checking only, --freedom=strict will not include them for the packaging
+ grep -rIl 'FREE: sharable' | cat > nonfree-pony-graphics-list.txt
+ grep -rIl 'FREE: no' | cat >> nonfree-pony-graphics-list.txt
+
+ # Remove nonfree pony graphics
+ rm -v $(grep -rIl 'FREE: sharable')
+ rm -v $(grep -rIl 'FREE: no')
+
+ # Generate empty files
+ for x in $(cat nonfree-pony-graphics-list.txt); do
+ touch $x
+ done
+
+ # Remove list
+ rm -v nonfree-pony-graphics-list.txt
+}
+
+package() {
+ cd "$srcdir/erkin-ponysay-"*
+
+ python3 setup.py --prefix=/usr --dest-dir=$pkgdir --freedom=strict --everything --with-pdf=/usr/share/doc/ponysay --without-pdf-compression install
+}