updated on Thu Jan 12 04:00:44 UTC 2012
[aur-mirror.git] / pysatellites-svn / PKGBUILD
blobaa2e6fd84e75c8ed6ab1da8eb50071c82478e987
1 # Maintainer: moostik <mooostik_at_gmail.com>
3 pkgname=pysatellites-svn
4 _pkgname=pysatellites
5 pkgver=61
6 pkgrel=3
7 pkgdesc="PySatellites is a simulator of 2D trajectories of satellites"
8 url='http://outilsphysiques.tuxfamily.org/pmwiki.php/Oppl/Pysatellites'
9 license=('GPL3') 
10 arch=('any')
11 depends=('python2-qt' 'python2' 'python-matplotlib' 'xplanet' 'celestia')
12 makedepends=('docbook-xsl')
13 source=($pkgname.desktop
14         $pkgname.png
15         ${_pkgname}.sh)
16 _svntrunk=svn://svn.tuxfamily.org/svnroot/oppl/${_pkgname}/trunk
17 _svnmod=${_pkgname}
19 build() {
20   cd "$srcdir"
21   msg "Connecting to SVN server...."
23   if [[ -d "$_svnmod/.svn" ]]; then
24     (cd "$_svnmod" && svn up -r "$pkgver")
25   else
26     svn co "$_svntrunk" --config-dir ./ -r "$pkgver" "$_svnmod"
27   fi
29   msg "SVN checkout done or server timeout"
30   msg "Starting build..."
32   rm -rf "$srcdir/$_svnmod-build"
33   cp -r "$srcdir/$_svnmod" "$srcdir/$_svnmod-build"
34   cd "$srcdir/$_svnmod-build"
36   find -name "*py" -exec sed 's/python/python2/' -i {} \;
38   pyuic4 graphe.ui > UI_graphe.py
39   pyuic4 pysat.ui > UI_pysat.py
40   xsltproc --nonet /usr/share/xml/docbook/xsl-stylesheets-1.76.1/manpages/docbook.xsl manpage.xml
41   python2 setup.py install --root=$pkgdir/ --optimize=1
44 package() {
45   cd $srcdir/$_svnmod-build
46   install -D -m755 ${srcdir}/${_pkgname}.sh $pkgdir/usr/bin/${_pkgname}
47   install -D -m644 ${_pkgname}.1 $pkgdir/usr/share/man/man1/${_pkgname}.1
48   # Creating menu item
49   install -D -m644 $srcdir/$pkgname.png $pkgdir/usr/share/pixmaps/${_pkgname}.png
50   install -D -m644 $srcdir/$pkgname.desktop $pkgdir/usr/share/applications/${_pkgname}.desktop
54 md5sums=('7e32597d54dd793bb8aa2695a766e083'
55          '4dcce3ad8fbf1e0309a4505136ded7ec'
56          'a5a2890b2e691c6d55cd71dd2af9a90b')