updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / jssfx / PKGBUILD
blob07888f6ea3ba635869d1fe71d9ac00d3d55abedd
1 # Contributor: fnord0 < fnord0 AT riseup DOT net >
3 pkgname=jssfx
4 pkgver=14
5 pkgrel=3
6 pkgdesc="Tool for creating self-extracting compressed JavaScript"
7 arch=('i686' 'x86_64')
8 url="http://code.google.com/p/jssfx/"
9 license=('BSD')
10 depends=('python2')
11 _svntrunk="http://jssfx.googlecode.com/svn/trunk/"
12 provides=('jssfx-svn')
14 build() {
15           if [ -d ${srcdir}/.svn ]; then
16             msg 'Updating...'
17             svn up ${srcdir}
18           else
19             msg 'Checking out...'
20             svn co ${_svntrunk} ${srcdir}
21           fi
22           mkdir -p ${pkgdir}/usr/{bin,src} || return 1
23           install -d ${pkgdir}/usr/share/licenses/jssfx || return 1
24           cd ${pkgdir}/usr/src
25           svn export ${srcdir} ${pkgname} || return 1
26           install -Dm644 ${pkgname}/COPYRIGHT.txt ${pkgdir}/usr/share/licenses/${pkgname}/ || return 1
28   #create startup app
29   echo "#!/bin/sh" > ${pkgdir}/usr/bin/${pkgname}
30   echo "#cd /usr/src/jssfx" >> ${pkgdir}/usr/bin/${pkgname}
31   echo "python2 /usr/src/jssfx/JsSfx.py \"\$@\"" >> ${pkgdir}/usr/bin/${pkgname}
32   echo "#cd -" >> ${pkgdir}/usr/bin/${pkgname}
33   chmod +x ${pkgdir}/usr/bin/${pkgname}
35 # vim:syntax=sh