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

Sigma0

By: a guest on Jun 27th, 2010  |  syntax: Bash  |  size: 2.02 KB  |  views: 90  |  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: Markus M. May <mmay AT javafreedom DOT org>
  2. pkgname=nexus
  3. pkgver=1.7.0
  4. pkgrel=1
  5. pkgdesc="A Maven Repository Manager."
  6. url="http://nexus.sonatype.org"
  7. arch=('i686' 'x86_64')
  8. license=('GPL3')
  9. depends=('java-environment')
  10. optdepends=('apache: a full featured webserver'
  11.             'maven: a java project management and project comprehension tool')
  12.  
  13. install=nexus.install
  14. conflicts=('java-nexus')
  15. provides=('java-nexus' 'nexus')
  16. options=(!strip !docs)
  17.  
  18. source=(http://nexus.sonatype.org/downloads/$pkgname-oss-webapp-${pkgver}-bundle.tar.gz
  19.         'nexus'
  20.         'wrapper.conf')
  21.  
  22. md5sums=('9531c3ae296adeb802004fa42dc3c58d'
  23.          '21ca7a935e5eaa47be031e899005d5a1'
  24.          '8c736b24b4cbda36d8646c7f5b20a719')
  25.  
  26. build() {
  27.   cd ${srcdir}
  28.  
  29.   # Create directory
  30.   install -d $pkgdir/opt/nexus
  31.  
  32.   # deleting unnecessary files before copying them
  33.   if [ $CARCH = 'x86_64' ]; then
  34.     mv $srcdir/$pkgname-oss-webapp-${pkgver}/bin/jsw/linux-x86-64 $pkgdir/opt/$pkgname/bin || return 1
  35.     rm -r $srcdir/$pkgname-oss-webapp-${pkgver}/bin || return 1
  36.   elif [ $CARCH} = 'i686' ]; then
  37.     mv $srcdir/$pkgname-oss-webapp-${pkgver}/bin/jsw/linux-x86-32 $pkgdir/opt/$pkgname/bin || return 1
  38.     rm -r $srcdir/nexus-oss-webapp-${pkgver}/bin || return 1
  39.   fi
  40.  
  41.   install $srcdir/$pkgname $pkgdir/opt/$pkgname/bin/$pkgname
  42.  
  43.   # move documentation to the right location
  44.   mkdir -p $pkgdir/usr/share/doc/$pkgname
  45.   install $srcdir/$pkgname-oss-webapp-$pkgver/*.txt $pkgdir/usr/share/doc/$pkgname
  46.   rm $srcdir/$pkgname-oss-webapp-$pkgver/*.txt
  47.  
  48.   # move example configuration to the right location
  49.   mkdir -p $pkgdir/usr/share/doc/$pkgname/conf
  50.   mv $srcdir/$pkgname-oss-webapp-$pkgver/conf/examples $pkgdir/usr/share/doc/$pkgname/conf
  51.  
  52.   mkdir -p $pkgdir/var/lib/nexus
  53.   mkdir -p $pkgdir/var/run/nexus
  54.  
  55.   # copy the source to the final directory
  56.   cp -a $srcdir/$pkgname-oss-webapp-${pkgver}/* $pkgdir/opt/nexus || return 1
  57.  
  58.   install $srcdir/wrapper.conf $pkgdir/opt/$pkgname/conf/wrapper.conf || return 1
  59.  
  60. }
clone this paste RAW Paste Data