Want more features on Pastebin? Sign Up, it's FREE!
Guest

airgraph-ng-svn PKGBUILD

By: a guest on Apr 7th, 2011  |  syntax: Bash  |  size: 2.05 KB  |  views: 217  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. # Maintainer: Jens Pranaitis <jens@jenux.homelinux.org>
  2. # Contributor: Techlive Zheng <techlivezheng [at] gmail [dot] com>
  3.  
  4. pkgname=airgraph-ng-svn
  5. pkgdesc="Graphing tool for the aircrack-ng suite"
  6. pkgver=1854
  7. pkgrel=1
  8. arch=('i686' 'x86_64')
  9. url="http://www.aircrack-ng.org"
  10. license=('GPLv2')
  11. depends=('python2' 'graphviz')
  12. optdepends=("psyco: JIT compiler for python")
  13. makedepends=('subversion')
  14. conflicts=('airgraph-ng' 'aircrack-ng-scripts')
  15. source=()
  16. install=airgraph-ng-svn.install
  17.  
  18. _svnmod=airgraph-ng
  19. _svntrunk="http://trac.aircrack-ng.org/svn/trunk/scripts/airgraph-ng"
  20.  
  21. build() {
  22.   cd ${srcdir}
  23.  
  24.   msg "Connecting to SVN server...."
  25.   if [ -d ${_svnmod}/.svn ]; then
  26.     msg "Updating airdrop-ng SVN..."
  27.     svn up ${_svnmod} -r ${pkgver}
  28.   else
  29.     msg "Checking out airdrop-ng SVN..."
  30.     svn co ${_svntrunk} -r ${pkgver} ${_svnmod}
  31.   fi
  32.   msg "SVN checkout done or server timeout."
  33.  
  34.   msg "Starting make..."
  35.  
  36.   if [ -d ${_svnmod}-build/ ]; then
  37.     msg "Build exists, cleaning it up... "
  38.     rm -rf ${_svnmod}-build || return 1
  39.   fi
  40.  
  41.   msg "Creating build folder... "
  42.   svn export ${_svnmod} ${_svnmod}-build
  43.  
  44.   grep -rl python ${_svnmod}-build | xargs sed -i 's|python|python2|g' || return 1
  45. }
  46.  
  47. package() {
  48.   cd ${srcdir}
  49.  
  50.   install -D -m755 ${_svnmod}-build/dump-join               ${pkgdir}/usr/bin/dump-join                      || return 1
  51.   install -D -m755 ${_svnmod}-build/airgraph-ng             ${pkgdir}/usr/bin/airgraph-ng                    || return 1
  52.   install -D -m644 ${_svnmod}-build/lib/lib_Airgraphviz.py  ${pkgdir}/usr/lib/airgraph-ng/lib_Airgraphviz.py || return 1
  53.   install -D -m644 ${_svnmod}-build/man/dump-join.1         ${pkgdir}/usr/share/man/man1/dump-join.1         || return 1
  54.   install -D -m644 ${_svnmod}-build/man/airgraph-ng.1       ${pkgdir}/usr/share/man/man1/airgraph-ng.1       || return 1
  55.   install -D -m644 ${_svnmod}-build/README                  ${pkgdir}/usr/share/doc/airgraph-ng/README       || return 1
  56.  
  57.   #Remove build directory
  58.   rm -rf ${_svnmod}-build || return 1
  59. }
  60.  
  61. md5sums=()
clone this paste RAW Paste Data