Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

AUR - Subsonic packaging submission

By: a guest on Oct 30th, 2012  |  syntax: None  |  size: 2.04 KB  |  views: 318  |  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. -------------------------------------------------------------------
  2. FILE PKGBUILD : do not include these 3 lines in the file
  3. -------------------------------------------------------------------
  4. # Maintainer: M0Rf30 <morf3089@gmail.com>
  5. # Contributors : Nrm
  6. pkgname=subsonic
  7. pkgver=4.7
  8. pkgrel=1
  9. pkgdesc="Subsonic is a free, web-based media streamer and jukebox."
  10. arch=('i686' 'x86_64')
  11. url="http://subsonic.org/"
  12. license=('GPL')
  13. depends=('java-runtime')
  14. conflicts=('subsonic-beta')
  15. source=(http://prdownloads.sourceforge.net/subsonic/${pkgname}-${pkgver}-standalone.tar.gz      
  16. 'subsonic.rc'
  17. 'subsonic.service')
  18. backup=('var/subsonic/db')
  19. install=$pkgname.install
  20.  
  21. build() {
  22.   cd ${srcdir}
  23.   mkdir -p $pkgdir/var/subsonic
  24.   mkdir -p $pkgdir/etc/rc.d
  25.   mkdir -p $pkgdir/usr/lib/systemd/system
  26.   cp  * $pkgdir/var/subsonic
  27.   rm $pkgdir/var/subsonic/{subsonic.rc,subsonic.bat,${pkgname}-${pkgver}-standalone.tar.gz}
  28.   cp $srcdir/subsonic.rc $pkgdir/etc/rc.d/subsonic
  29.   cp $srcdir/subsonic.service $pkgdir/usr/lib/systemd/system
  30.   chmod +x $pkgdir/etc/rc.d/subsonic
  31.   chmod +x $pkgdir/var/subsonic/subsonic.sh
  32.  
  33. # Compatibility with both java runtime available in repos and AUR
  34.   javahome="JAVA_HOME=/opt/java/jre:/usr/lib/jvm/java-7-openjdk"
  35.   sed -i "20 i $javahome" $pkgdir/var/$pkgname/$pkgname.sh  
  36.  
  37. # Locale Fixes
  38.   lang_a="export LANG="en_US.UTF-8""
  39.   lang_b="export LC_CTYPE="en_US.UTF-8""
  40.   sed -i "21 i $lang_a" $pkgdir/var/$pkgname/$pkgname.sh
  41.   sed -i "22 i $lang_b" $pkgdir/var/$pkgname/$pkgname.sh
  42. }
  43.  
  44. md5sums=('42a4986f450cca01d73ba9b72e38ae85'
  45.          'fe298af83a38e4e3a794f3be18ca6af6'
  46.          'a9a21db853d3778d78a9508260d97bbd')
  47.  
  48. -------------------------------------------------------------------
  49. FILE subsonic.service : do not include these 3 lines in the file
  50. -------------------------------------------------------------------
  51. [Unit]
  52. Description=Subsonic
  53. After=network.target
  54.  
  55. [Service]
  56. ExecStart=/var/subsonic/subsonic.sh
  57. ExecStop=/bin/kill -15 $MAINPID
  58. Type=forking
  59.  
  60. [Install]
  61. WantedBy=multi-user.target