updated on Sun Jan 15 20:01:04 UTC 2012
[aur-mirror.git] / creepy-git / PKGBUILD
blobcf3eae07f84d6f0115e81a9957142439947a8f66
1 # Contributor: fnord0 <fnord0 AT riseup DOT net>
3 pkgname=creepy-git
4 pkgver=20110504
5 pkgrel=1
6 pkgdesc="A geolocation information gatherer. Offers geolocation information gathering through social networking platforms."
7 arch=('i686' 'x86_64')
8 url=("http://github.com/ilektrojohn/creepy")
9 license=('GPL3')
10 provides=('creepy')
11 makedepends=('git')
12 depends=('python2' 'python2-tweepy-git' 'python-osmgpsmap' 'flickrapi' 'python-beautifulsoup' 'pyexiv2' 'python-configobj' 'python-simplejson')
13 _gitroot=("https://github.com/ilektrojohn/creepy.git")
14 _gitname=("creepy")
16 build() {
17   cd ${srcdir}
19  ## Git checkout
20   if [ -d ${srcdir}/${_gitname} ] ; then
21     msg "Git checkout:  Updating existing tree"
22     cd ${_gitname} && git pull origin
23     msg "Git checkout:  Tree has been updated"
24   else
25     msg "Git checkout:  Retrieving sources"
26     git clone ${_gitroot}
27   fi
28   msg "Checkout completed"
30  ## Build
31   rm -rf ${srcdir}/${_gitname}-build
32   cp -r ${srcdir}/${_gitname} ${srcdir}/${_gitname}-build
33   cd ${srcdir}/${_gitname}-build
36 package() {
37   cd ${srcdir}/${_gitname}-build
38   install -d ${pkgdir}/usr/share/${_gitname} || return 1
39   install -d ${pkgdir}/usr/bin || return 1
40   install -d ${pkgdir}/usr/share/${_gitname}/doc || return 1
41   cp -a  ${srcdir}/${_gitname}-build/* \
42     ${pkgdir}/usr/share/${_gitname}/ || return 1
43   chmod -R 755 ${pkgdir}/usr/share/${_gitname}/${_gitname}/*.py || return 1
45   ## create startup app /usr/bin/creepy
46   echo "#!/bin/sh" > ${pkgdir}/usr/bin/${_gitname}
47   echo "cd /usr/share/creepy/creepy" >> ${pkgdir}/usr/bin/${_gitname}
48   echo "python2 ./creepymap.py \"\$@\"" >> ${pkgdir}/usr/bin/${_gitname}
49   echo "cd -" >> ${pkgdir}/usr/bin/${_gitname}
50   chmod +x ${pkgdir}/usr/bin/${_gitname}
52   ## user notification
53   echo -e ""
54   echo -e "\e[1;31m[\e[0m\e[1;34m*\e[0m\e[1;31m]\e[0m \e[1;31mrun '\e[0m\e[1;34m/usr/bin/creepy\e[0m\e[1;31m' to start the application\e[0m"
55   echo -e "\e[1;34m>>>\e[0m \e[1;31mcreepy homepage @ \e[0m\e[1;32mhttps://github.com/ilektrojohn/creepy\e[0m"
56   echo -e ""