updated on Thu Jan 26 00:18:00 UTC 2012
[aur-mirror.git] / nexus / PKGBUILD
blob08b9ad97ac6221b703626c24470accf490f96d19
1 #Contributor: Markus M. May <mmay AT javafreedom DOT org>
2 #Maintainer:  Yahya Mohajer <yaya_2013 {AT} yahoo {DOT} com >
4 pkgname=nexus
5 pkgver=1.9.2.4
6 pkgrel=1
7 pkgdesc="A Maven Repository Manager."
8 url="http://nexus.sonatype.org"
9 arch=('i686' 'x86_64')
10 license=('GPL3')
11 depends=('java-environment')
12 optdepends=('apache: a full featured webserver'
13             'maven: a java project management and project comprehension tool')
15 install=nexus.install
16 backup=(opt/nexus/conf/wrapper.conf)
17 conflicts=('java-nexus')
18 provides=('java-nexus' 'nexus')
19 options=(!strip !docs)
21 source=(http://nexus.sonatype.org/downloads/nexus-oss-webapp-${pkgver}-bundle.tar.gz
22         'nexus'
23         'wrapper.conf') 
25 md5sums=('33e61c03bb3668fd4c8f8de97c9b0669'
26          'c9fc1eb5527ce9273c73bd00ae99a887'
27          'c9d8a5454e89c1bdf5de86edcca82c3a')
29 build() {
30   cd ${srcdir}
32   # Create directories
33   install -d $pkgdir/opt/nexus
35   # Move startup scripts and wrapper
36   if [ $CARCH = 'x86_64' ]; then
37     mv $srcdir/nexus-oss-webapp-${pkgver}/bin/jsw/linux-x86-64 $pkgdir/opt/nexus/bin || return 1
38   elif [ $CARCH = 'i686' ]; then
39     mv $srcdir/nexus-oss-webapp-${pkgver}/bin/jsw/linux-x86-32 $pkgdir/opt/nexus/bin || return 1
40   fi
41   
42   # Move wrapper lib
43   mv $srcdir/nexus-oss-webapp-${pkgver}/bin/jsw/lib/wrapper-3.2.3.jar $pkgdir/opt/nexus/bin/lib || return 1
45   # deleting unnecessary files before copying them
46   rm -r $srcdir/nexus-oss-webapp-${pkgver}/bin || return 1
48   install $srcdir/nexus $pkgdir/opt/nexus/bin/nexus
50   # move documentation to the right location
51   mkdir -p $pkgdir/usr/share/doc/nexus
52   install $srcdir/nexus-oss-webapp-$pkgver/*.txt $pkgdir/usr/share/doc/nexus
53   rm $srcdir/nexus-oss-webapp-$pkgver/*.txt
55   # move example configuration to the right location
56   mkdir -p $pkgdir/usr/share/doc/nexus/conf
57   mv $srcdir/nexus-oss-webapp-$pkgver/conf/examples $pkgdir/usr/share/doc/nexus/conf
59   mkdir -p $pkgdir/var/lib/nexus
60   mkdir -p $pkgdir/var/run/nexus
62   # copy the source to the final directory
63   cp -a $srcdir/nexus-oss-webapp-${pkgver}/* $pkgdir/opt/nexus || return 1
65   install $srcdir/wrapper.conf $pkgdir/opt/nexus/conf/wrapper.conf || return 1
66