diff options
author | Ricardo (XenGi) Band | 2015-12-23 20:21:35 +0100 |
---|---|---|
committer | Ricardo (XenGi) Band | 2015-12-23 20:21:35 +0100 |
commit | b9a8f81bfeb82a41b2c16879e1b706ff84036a39 (patch) | |
tree | c600f41c1ff9f89910d9a2d85149e5796be64003 | |
download | aur-b9a8f81bfeb82a41b2c16879e1b706ff84036a39.tar.gz |
Initial commit
-rw-r--r-- | .SRCINFO | 12 | ||||
-rw-r--r-- | PKGBUILD | 44 |
2 files changed, 56 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..b1ace6f1b867 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,12 @@ +pkgbase = pokeshell + pkgdesc = Displays pokemons in your shell + pkgver = 1.0.0 + pkgrel = 1 + url = https://github.com/XenGi/pokeshell + arch = any + license = MIT + options = !emptydirs + source = https://github.com/rossy/pokeshell/archive/v1.0.0.tar.gz + +pkgname = pokeshell + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..dc382d2cc9b3 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,44 @@ +# Maintainer: Ricardo (XenGi) Band <email@ricardo.band> + +_maxwidth=80 +_maxheight=22 +_firstpokemon=1 +_lastpokemon=151 +pkgname=pokeshell +pkgver=1.0.0 +pkgrel=1 +pkgdesc="Displays pokemons in your shell" +arch=(any) +url="https://github.com/XenGi/pokeshell" +license=('MIT') +builddepends=('curl' 'imagemagick' 'img2xterm') +options=(!emptydirs) +install='pokeshell.install' +#source=("https://github.com/rossy/$pkgname/archive/v$pkgver.tar.gz") +#sha256sums=('') + +build() { + cd "$srcdir/" + for _i in `seq $_firstpokemon 1 $_lastpokemon` ; do + printf "Generating Pokemon #$_i" + # download pokemon image + curl -s http://pokeapi.co/media/img/$_i.png -o $_i.png + printf "." + # trim image + convert $_i.png -trim -resize ${_maxwidth}x$(($_maxheight * 2))\> $_i.png + printf "." + # convert to escape sequences + img2xterm $_i.png > $_i.pokemon + printf ". done\n" + # cleanup + rm -f $_i.png + done +} + +package() { + cd "$srcdir/" + for _i in `seq $_firstpokemon 1 $_lastpokemon` ; do + install -D -m644 $_i.pokemon "${pkgdir}/usr/share/${pkgname}/$_i.pokemon" + done +} + |