summaryrefslogtreecommitdiff
path: root/libre/ponysay-libre/PKGBUILD
diff options
context:
space:
mode:
authorAndré Fabian Silva Delgado <emulatorman@parabola.nu>2014-02-26 06:38:32 -0200
committerAndré Fabian Silva Delgado <emulatorman@parabola.nu>2014-02-26 06:38:32 -0200
commita3cfe41783612cf03aa68aa1436c46f68b909405 (patch)
tree2524ea4db55a8bfeb93989622d09c6ba87fd7d2a /libre/ponysay-libre/PKGBUILD
parent76a076f357e3b73829c0df6847f497dff535801c (diff)
ponysay-libre: add new package to [libre]
Diffstat (limited to 'libre/ponysay-libre/PKGBUILD')
-rw-r--r--libre/ponysay-libre/PKGBUILD49
1 files changed, 49 insertions, 0 deletions
diff --git a/libre/ponysay-libre/PKGBUILD b/libre/ponysay-libre/PKGBUILD
new file mode 100644
index 000000000..703a562d6
--- /dev/null
+++ b/libre/ponysay-libre/PKGBUILD
@@ -0,0 +1,49 @@
+# Maintainer: Sven-Hendrik Haase <sh@lutzhaase.com>
+# Contributor: Erkin Batu Altunbaş <erkinbatu@gmail.com>
+# Maintainer (Parabola): André Silva <emulatorman@parabola.nu>
+# Contributor (Parabola): Márcio Silva <coadde@parabola.nu>
+
+_pkgname=ponysay
+pkgname=ponysay-libre
+pkgver=3.0.1
+pkgrel=1
+pkgdesc="cowsay reimplemention for ponies, without nonfree pony graphics"
+url="http://erkin.github.com/ponysay/"
+arch=('any')
+license=('GPL3')
+replaces=$_pkgname
+conflicts=$_pkgname
+provides=$_pkgname=$pkgver
+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=('3fac23eb1a3a9d0640ecebd1919b4390')
+md5sums=('21451fee1a773eb76572cc1cafad8422')
+
+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
+}