desktop/maven/PKGBUILD
2016-01-22 14:30:14 +01:00

36 lines
1.1 KiB
Bash

pkgname=maven
pkgver=3.3.9
pkgrel=1
pkgdesc="A Java project management and project comprehension tool"
arch=('any')
url="http://maven.apache.org"
license=('APACHE')
depends=('java-environment')
makedepends=('apache-ant')
backup=('opt/maven/conf/settings.xml')
source=(http://apache-mirror.rbc.ru/pub/apache/maven/maven-3/$pkgver/source/apache-maven-$pkgver-src.tar.gz
maven.sh)
sha256sums=('9150475f509b23518e67a220a9d3a821648ab27550f4ece4d07b92b1fc5611bc'
'24dc65607ff9e25c74ff2f75711911471910eaf415bce1856789c9d047209b8b')
package() {
cd $srcdir/apache-maven-$pkgver
#. /etc/profile.d/jre.sh
#. /etc/profile.d/jdk.sh
mkdir -p $srcdir/repo
mkdir $pkgdir/opt
export MAVEN_OPTS=-Xmx512m
export M2_HOME=$pkgdir/opt/maven
export PATH=$PATH:$M2_HOME/bin
# FIXME: downloads many deps from Internet. Probably they should be
# packaged or added into source=()
ant -Dmaven.repo.local=$srcdir/repo
install -D -m 755 $srcdir/maven.sh $pkgdir/etc/profile.d/maven.sh
rm $pkgdir/opt/maven/*.txt
install -d $pkgdir/usr/bin
ln -s /opt/maven/bin/mvn $pkgdir/usr/bin/mvn
}