Advertisement
Guest User

Untitled

a guest
Nov 14th, 2011
144
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.98 KB | None | 0 0
  1. #Maintainer Michael P <ptchinster@archlinux.us>
  2. pkgname=wireshark-svn
  3. pkgver=39823
  4. pkgrel=1
  5. pkgdesc="A free network protocol analyzer for Unix/Linux. SVN version"
  6. arch=('i686' 'x86_64')
  7. license=('GPL2')
  8. depends=('gtk2' 'heimdal' 'libpcap' 'gnutls' 'c-ares' 'e2fsprogs' 'lua' 'portaudio' 'geoip' 'libsmi' 'perl-parse-yapp' 'python2')
  9. makedepends=('subversion' 'cmake')
  10. url="http://www.wireshark.org/"
  11. md5sums=('504ede44c02b2a52f6cbd3bffdf93b8d'
  12.          'e771800a8c977fe223583a453bc27397')
  13. replaces=('ethereal')
  14. provides=('wireshark')
  15. source=("wireshark.desktop"
  16.         "wireshark.png")
  17. conflicts=('wireshark-gtk')
  18.  
  19.  _svnmod="wireshark"
  20.  _svntrunk="http://anonsvn.wireshark.org/wireshark/trunk/"
  21.  
  22. build() {
  23.     cd ${srcdir}
  24.  
  25.     if [ -d $_svnmod/.svn ]; then
  26.         (cd $_svnmod && svn up -r $pkgver)
  27.     else   
  28.         svn co $_svntrunk --config-dir ./ -r $pkgver $_svnmod
  29.     fi
  30.  
  31.     cd $srcdir
  32.     msg "SVN checkout done or server timeout"
  33.     msg "Starting make..."
  34.     if [[ -d $_svnmod-build ]] ; then
  35.         rm -rf $_svnmod-build
  36.     fi
  37.     #mkdir $_svnmod-build
  38.     cp -r $_svnmod $_svnmod-build
  39.     cd ./$_svnmod-build
  40.     unset PYTHON
  41.     export PYTHON=/usr/bin/python2
  42.     export CFLAGS="-Wno-error=old-style-definition -Wno-error=clobbered -Wno-error=unused-but-set-variable -fno-unit-at-a-time ${CFLAGS}"
  43.     find . -type f -exec sed -i 's|#!/usr/bin/env python|#!/usr/bin/python2|' '{}' \;
  44.     find . -type f -name '*.py' -exec expand -t4 '{}' \;
  45.     sed -i 's/python /python2 /' autogen.sh
  46.     ./autogen.sh
  47.     ./configure --prefix=/usr --with-ssl --enable-airpcap PYTHON=/usr/bin/python2 || return 1
  48.     #cmake -DCMAKE_INSTALL_PREFIX=/usr PYTHON=/usr/bin/python2 ../$_svnmod
  49.     find . -name Makefile -exec sed -i 's#python3.2mu#python2.7#g' '{}' +
  50.     make -j2 PYTHON=/usr/bin/python2 || return 1
  51.     make -j2 DESTDIR=${pkgdir} install || return 1
  52.  
  53.     install -Dm644 ${srcdir}/wireshark.png ${pkgdir}/usr/share/icons/wireshark.png
  54.     install -Dm644 ${srcdir}/wireshark.desktop ${pkgdir}/usr/share/applications/wireshark.desktop
  55. }
  56.  
  57.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement