This week only. Pastebin PRO Accounts Christmas Special! Don't miss out!Want more features on Pastebin? Sign Up, it's FREE!
Guest

PKGBUILD

By: a guest on May 14th, 2014  |  syntax: None  |  size: 2.61 KB  |  views: 145  |  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: skydrome <skydrome@i2pmail.org>
  2. # Contributor: KillYourTV <killyourtv@i2pmail.org>
  3.  
  4. ########[ OPTIONS ]########################################
  5. # Build syndie with i2p.jar from kytv's debian mirror.
  6. # Useful if you dont want to build i2p just to install syndie.
  7. _external_i2p=1
  8. _i2p_ver=0.9.12-2~pq1
  9. ###########################################################
  10.  
  11. pkgname=syndie
  12. pkgver=1.105b
  13. pkgrel=1
  14. pkgdesc="Java based open source system for operating secure distributed forums"
  15. license=('Public Domain')
  16. url="https://syndie.i2p2.de"
  17. arch=('any')
  18. depends=('java-runtime' 'swt')
  19. makedepends=('java-environment' 'apache-ant')
  20. optdepends=('words: for spelling correction support')
  21. DLAGENTS=('https::/usr/bin/curl -kfLC - --retry 3 --retry-delay 3 -o %o %u')
  22. source=("${url}/files/${pkgname}-${pkgver}.src.tar.bz2"
  23.         "${url}/files/${pkgname}-${pkgver}.src.tar.bz2.sig"
  24.         'syndie.desktop' 'syndie.xpm' 'syndie.sh')
  25.  
  26. sha256sums=('f6bd632b0264016fb57255e8c3db1bea8d1d1004e163c10cd7c1d44c980f36bb'
  27.             'SKIP'
  28.             'a4711e9876f8e185a5de84976f2b5a72a8890329c86688ffa583ae8741ecc6cc'
  29.             '552d02ae3724d969e668996b67d0d7b1d70f39bf03ad43287073511696c995f7'
  30.             'a3e9d28f4e2da66cf91b4f1e57bf902dcd091ac1b97dadd9ec819f383cd83df8')
  31.  
  32. if [[ "$_external_i2p" = 1 ]]; then
  33.     source+=("https://launchpad.net/~i2p.packages/+archive/i2p/+files/i2p-router_${_i2p_ver}_all.deb")
  34.     sha256sums+=('SKIP')
  35.     _i2p_path="../usr/share/i2p/lib/i2p.jar"
  36. else
  37.     makedepends+=('i2p')
  38. fi
  39.  
  40. prepare() {
  41.     cd "$pkgname-$pkgver"
  42.     source /etc/profile.d/apache-ant.sh
  43.     source /etc/profile.d/jdk.sh
  44.     export LG2=en
  45.  
  46.     [[ "$_external_i2p" = 1 ]] &&
  47.         ( cd .. ; bsdtar -xf "${srcdir}/data.tar.xz" )
  48.  
  49.     sed -i build.properties \
  50.         -e "s|#lib.dir=|lib.dir=/usr/share/java|" \
  51.         -e "s|#hsqldb.jar=|hsqldb.jar=lib/hsqldb.jar|" \
  52.         -e "s|#i2p.jar=|i2p.jar=${_i2p_path:-/opt/i2p/lib/i2p.jar}|"
  53.     sed -i build.xml \
  54.         -e 's|target="1.5"|target="1.7"|'
  55. }
  56.  
  57. build() {
  58.     cd "$pkgname-$pkgver"
  59.     ant singlejar
  60. }
  61.  
  62. package(){
  63.     cd "$pkgname-$pkgver"
  64.     install -Dm644 "LICENSE"                "$pkgdir/usr/share/licenses/syndie/LICENSE"
  65.     install -Dm644 "syndie.jar"             "$pkgdir/usr/share/syndie/syndie.jar"
  66.     install -Dm644 "doc/syndie.1"           "$pkgdir/usr/share/man/man1/syndie.1"
  67.     install -Dm644 "$srcdir/syndie.xpm"     "$pkgdir/usr/share/pixmaps/syndie.xpm"
  68.     install -Dm644 "$srcdir/syndie.desktop" "$pkgdir/usr/share/applications/syndie.desktop"
  69.     install -Dm755 "$srcdir/syndie.sh"      "$pkgdir/usr/bin/syndie"
  70. }
clone this paste RAW Paste Data