updated on Thu Jan 12 04:00:44 UTC 2012
[aur-mirror.git] / webpics / PKGBUILD
blob6cb00fe76b80944d637508ace77b0cdbedcfd2f3
1 # Maintainer: IgnorantGuru <ignorantguru@users.sourceforge.net>
2 # This PKGBUILD will download and build the latest version
3 pkgname=webpics
4 # pkgver will be changed dynamically in build() to latest version
5 pkgver=1.0.0
6 pkgrel=2
7 pkgdesc="Creates a complete javascript website from a folder of pics"
8 PACKAGER="IgnorantGuru <ignorantguru@users.sourceforge.net>"
9 arch=(any)
10 depends=('imagemagick' 'jhead')
11 license=('GPL3')
12 url=("http://igurublog.wordpress.com/downloads/script-$pkgname/")
13 source=("http://downloads.sourceforge.net/project/ig-scripts/$pkgname.sh")
14 #md5sums=(`wget -O - http://downloads.sourceforge.net/project/ig-scripts/$pkgname.sh | md5sum | head -c 32`)
15 md5sums=('da99615523a3cb30ade3b03ca40d72c6')
17 build() {
18         _autover=`grep -m 1 "$pkgname version [[:digit:]]" ${startdir}/$pkgname.sh | sed 's/^.* version \([[:digit:]]*\.[[:digit:]]*\.[[:digit:]]*\).*/\1/'`
19         if [ "$_autover" != "" ] && [ "$_autover" != "$pkgver" ]; then
20                 # link to keep yaourt happy
21                 ln -s $pkgname-$_autover-$pkgrel-any.pkg.tar.gz ${startdir}/$pkgname-$pkgver-$pkgrel-any.pkg.tar.gz 
22                 eval "pkgver=$_autover"
23         fi
24         cd ${startdir}/pkg || return 1
25         mkdir -p usr/bin || return 1
26         cd usr/bin || return 1
27         cp ${startdir}/$pkgname.sh ./$pkgname
28         chmod +x $pkgname