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

Untitled

By: a guest on Jan 25th, 2011  |  syntax: Bash  |  size: 1.35 KB  |  views: 123  |  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. # Contributor: Alessio Biancalana <dottorblaster@gmail.com>
  2.  
  3. pkgname=asterisk
  4. pkgver=1.8.2.2
  5. pkgrel=1
  6. pkgdesc="A complete PBX solution"
  7. arch=('i686' 'x86_64')
  8. url="http://www.asterisk.org"
  9. license=('GPL')
  10. depends=('alsa-lib' 'speex' 'popt' 'libvorbis' 'curl')
  11. makedepends=('postgresql' 'unixodbc' 'sqlite3')
  12. backup=(etc/asterisk/asterisk.conf)
  13. source=(http://downloads.digium.com/pub/asterisk/releases/asterisk-$pkgver.tar.gz \
  14.         asterisk \
  15.         asterisk.logrotated)
  16. install=$pkgname.install
  17. md5sums=('213ff45524dcd1bfc08ed526ffe38878'
  18.          '300efd73ec5e627889786deace5a2094'
  19.          '486e07a0a1405ea25ec5b1736034653e')
  20.  
  21. build() {
  22.   cd ${srcdir}/${pkgname}-${pkgver}
  23.   ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var
  24.   make || return 1
  25. }
  26.  
  27. package(){
  28.   cd ${srcdir}/${pkgname}-${pkgver}
  29.   make DESTDIR=${pkgdir} install || return 1
  30.   make DESTDIR=${pkgdir} samples || return 1
  31.  
  32.   (cd ${pkgdir}/etc/asterisk
  33. #  for i in `ls`; do [ $i = "asterisk.conf" ] || mv $i $i.default; done
  34. ls -I asterisk.conf | xargs -I '{}' mv '{}' '{}.default')
  35. #  cp ${srcdir}/modules.conf  modules.conf
  36.   sed -i -e "s/\/var\/run/\/var\/run\/asterisk/" $startdir/pkg/etc/asterisk/asterisk.conf
  37.  
  38.   install -D -m 755 ${srcdir}/asterisk ${pkgdir}/etc/rc.d/asterisk
  39.   install -D -m 644 ${srcdir}/asterisk.logrotated ${pkgdir}/etc/logrotate.d/asterisk
  40.  }
clone this paste RAW Paste Data