updated on Sat Jan 14 00:11:12 UTC 2012
[aur-mirror.git] / polynomial-free / PKGBUILD
blob4933274651122d0c56b65e8a10de4e5e867a81cb
1 # Maintainer: kfgz <kfgz at interia pl>
3 pkgname=polynomial-free
4 pkgver=124
5 #_rpkgver=100
6 pkgrel=1
7 arch=('i686' 'x86_64')
8 pkgdesc="A 3D space shooter with mathematically generated fractal scenery and models"
9 url="http://dmytry.pandromeda.com/games/try_polynomial.html"
10 license=('unknown')
11 depends=('alure' 'fontconfig' 'gstreamer0.10-base' 'libpng' 'libvorbis' 'mesa' 'pango')
12 source=(http://dmytry.com/games/Polynomial-free-${pkgver}_linux.tar.gz
13 #source=(http://kfgz.mydevil.net/Polynomial-free-${pkgver}_linux.tar.gz
14         ${pkgname}
15         ${pkgname}.desktop
16         ${pkgname}.png)
17 md5sums=('c90b9bf2544e9b1fae087b5d808679d9'
18          'e7d3d3485b4c5dfc1fed5a8f1f4d63a7'
19          '8524e8d019c2644968529cdbeaf55351'
20          '55829b1b75a167637fed5495335c53af')
22 _libpngv="libpng12.so.0.40.0"
24 package() {
25   install -dm755 "${pkgdir}"/opt/${pkgname}/bin/data
26   
27   cd "${srcdir}"/Polynomial-free-${pkgver}_linux/bin/data
28   for x in `LC_ALL=C ls -l | grep ^d | tail -n $(($(ls -l | wc -l) - 1)) | awk '{print $9}'`; do
29     install -dm755 "${pkgdir}"/opt/${pkgname}/bin/data/${x}
30   done;
31   
32   install -dm755 "${pkgdir}"/usr/{bin,share/{applications,pixmaps}}
33   
34   cd "${srcdir}"/Polynomial-free-${pkgver}_linux
35   install -m644 readme.html "${pkgdir}"/opt/${pkgname}
36   
37   if [ `uname -m` = "x86_64" ]; then
38     install -dm755 "${pkgdir}"/opt/${pkgname}/bin/lib64
39     install -m755 Polynomial64 "${pkgdir}"/opt/${pkgname}
40     install -m755 bin/Polynomial64 "${pkgdir}"/opt/${pkgname}/bin
41     install -m755 bin/lib64/${_libpngv} "${pkgdir}"/opt/${pkgname}/bin/lib64
42     ln -s "/opt/${pkgname}/bin/lib64/${_libpngv}" "${pkgdir}"/opt/${pkgname}/bin/lib64/libpng12.so
43     ln -s "/opt/${pkgname}/bin/lib64/${_libpngv}" "${pkgdir}"/opt/${pkgname}/bin/lib64/libpng12.so.0
44   else
45     install -dm755 "${pkgdir}"/opt/${pkgname}/bin/lib32
46     install -m755 Polynomial32 "${pkgdir}"/opt/${pkgname}
47     install -m755 bin/Polynomial32 "${pkgdir}"/opt/${pkgname}/bin
48     install -m755 bin/lib32/${_libpngv} "${pkgdir}"/opt/${pkgname}/bin/lib32
49     ln -s "/opt/${pkgname}/bin/lib32/${_libpngv}" "${pkgdir}"/opt/${pkgname}/bin/lib32/libpng12.so
50     ln -s "/opt/${pkgname}/bin/lib32/${_libpngv}" "${pkgdir}"/opt/${pkgname}/bin/lib32/libpng12.so.0
51   fi
52         
53   cd bin/data
54   #the coolest "oneliner" I've ever wrote ;)
55   for x in `LC_ALL=C ls -l | grep -v ^d | tail -n $(($(ls -l | grep -v ^d | wc -l) - 1)) | awk '{print $9}'`; do
56     install -m644 ${x} "${pkgdir}"/opt/${pkgname}/bin/data
57   done;
59   for x in `LC_ALL=C ls -l | grep ^d | tail -n $(($(ls -l | wc -l) - 1)) | awk '{print $9}'`; do
60     cd ${x}
61     for y in `ls`; do
62       install -m644 ${y} "${pkgdir}"/opt/${pkgname}/bin/data/${x}
63     done;
64     cd ..
65   done;
66   
67   cd "${srcdir}"
68   install -m755 ${pkgname} "${pkgdir}"/usr/bin
69   install -m644 ${pkgname}.desktop "${pkgdir}"/usr/share/applications
70   install -m644 ${pkgname}.png "${pkgdir}"/usr/share/pixmaps