From 03901c8c7a8f69748a75ee9c8481ee497e5323c3 Mon Sep 17 00:00:00 2001 From: Nicolás Reynolds Date: Sun, 14 Aug 2011 14:09:22 -0300 Subject: social/statusnet-0.9.9-1 Nicer plugin and locale finding --- social/statusnet/PKGBUILD | 37 ++++++++++++++++++++++--------------- 1 file changed, 22 insertions(+), 15 deletions(-) (limited to 'social') diff --git a/social/statusnet/PKGBUILD b/social/statusnet/PKGBUILD index e58240c32..998751df5 100644 --- a/social/statusnet/PKGBUILD +++ b/social/statusnet/PKGBUILD @@ -1,25 +1,32 @@ # Contributor: fauno pkgbase=statusnet +pkgname=statusnet-base pkgver=0.9.9 # find available plugins and locales -# tar xf ${pkgbase}-${pkgver}.tar.gz # this isn't optimal but i couldn't trick -# makepkg to do it by itself -plugins=($(find ${pkgbase}-${pkgver}/plugins/ -mindepth 1 -maxdepth 1 -type d -printf "%f\n")) -locales=($(find ${pkgbase}-${pkgver}/locale/ -mindepth 1 -maxdepth 1 -type d -printf "%f\n" )) - -pkgname=(statusnet-base -# plugins - $(echo ${plugins[@]} | \ - tr [A-Z] [a-z] | tr ' ' "\n" | \ - sed "s/^/statusnet-plugin-/") -# locales - $(echo ${locales[@]} | \ - tr [A-Z] [a-z] | tr ' ' "\n" | \ - sed "s/^/statusnet-i18n-/")) +srcfile=${SRCDEST}/${pkgbase}-${pkgver}.tar.gz +if [ -e ${srcfile} ]; then +plugins=($(bsdtar -tf ${srcfile} \ + ${pkgbase}-${pkgver}/plugins | \ + cut -d'/' -f3 | sort -u)) +locales=($(bsdtar -tf ${srcfile} \ + ${pkgbase}-${pkgver}/locale | \ + cut -d'/' -f3 | sort -u)) +fi + +# looping avoids having "statusnet-plugin-" package +pkgname=(${pkgname} + $(for plugin in ${plugins[@]}; do + echo ${plugin} | tr [A-Z] [a-z] | \ + sed "s/^/statusnet-plugin-/" + done) + $(for locale in ${locales[@]}; do + echo ${locale} | tr [A-Z] [a-z] | \ + sed "s/^/statusnet-i18n-/" + done)) pkgrel=1 -pkgdesc="StatusNet is a Free and Open Source microblogging platform." arch=('any') +pkgdesc="StatusNet is a Free and Open Source microblogging platform." url="http://status.net" license=('AGPL') depends=('php>=5.2.3' 'mysql>=5' 'php-gd' 'php-curl' 'php-gmp') -- cgit v1.2.3