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

Untitled

By: a guest on Jul 29th, 2010  |  syntax: Bash  |  size: 1.02 KB  |  views: 37  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
This paste has a previous version, view the difference. Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. # Contributor: Moritz Heidkamp <moritz.heidkamp@bevuta.com>
  2. pkgname=mshaper
  3. pkgver=0.7
  4. pkgrel=1
  5. pkgdesc="A traffic shaper and prioritizer designed specifically for DSLs, in particular the variety using PPPoE on top of G.922.1."
  6. arch=('i686' 'x86_64')
  7. url="http://mshaper.florz.de/"
  8. license=('GPL')
  9. source=(http://mshaper.florz.de/${pkgname}_${pkgver}.tar.gz)
  10. md5sums=('a3f6d319a857e1d9f794fa66cc925ff4')
  11. install=mshaper.install
  12.  
  13. build() {
  14.   mkdir -p "${startdir}/pkg/usr/sbin"
  15.   cd "${startdir}/src/${pkgname}-${pkgver}"
  16.   sed -i '/BACKEND_INTERFACE/s|eth1|eth0|' config.h
  17.   sed -i '/UPSTREAM_BANDWIDTH/s|224000|307200|' config.h
  18.   sed -i '/DOWNSTREAM_BANDWIDTH/s|2300000|4000000|' config.h
  19.   make DESTDIR="${startdir}/pkg" PREFIX="/usr" install
  20.   mkdir -p $pkgdir/var/lib/mshaper
  21. }
  22.  
  23. # vim:set ts=2 sw=2 et:
  24.  
  25.  
  26. ============
  27. mshaper.install
  28. ===========
  29.  
  30. post_install() {
  31.         if ! grep -q ^mshaper /etc/passwd; then
  32.                 useradd -s /bin/false -d /var/lib/mshaper mshaper
  33.         fi
  34. }
  35.  
  36.  
  37. post_remove() {
  38.         userdel mshaper
  39. }
clone this paste RAW Paste Data