summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 4333bce0ce5e264951734c08d7a441454382afc0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# Maintainer: Julien Nicoulaud <julien.nicoulaud@gmail.com>
# Source: https://github.com/nicoulaj/archlinux-packages
pkgname=mvnsh
pkgver=1.1.0
pkgrel=1
pkgdesc="Interactive CLI interface for Apache Maven."
arch=(i686 x86_64)
url="http://shell.sonatype.org"
license=('EPL')
depends=('java-environment>=5' 'bash')
changelog=Changelog
source=(https://repo1.maven.org/maven2/org/sonatype/maven/shell/dist/mvnsh-assembly/$pkgver/mvnsh-assembly-$pkgver-bin.tar.gz)
md5sums=('c78128e61aba90e4e34afb18b78931c9')

package() {
  msg2 "Install the assembly at /usr/share/java/${pkgname}..."
  install -dm755                                  ${pkgdir}/usr/share/java/${pkgname}
  cp -r ${srcdir}/${pkgname}-${pkgver}/* ${pkgdir}/usr/share/java/$pkgname

  msg2 "Install links to documentation resources at /usr/share/doc/${pkgname}..."
  install -dm755                              ${pkgdir}/usr/share/doc/${pkgname}
  ln -s /usr/share/java/${pkgname}/README.txt ${pkgdir}/usr/share/doc/${pkgname}/
  ln -s /usr/share/java/${pkgname}/examples   ${pkgdir}/usr/share/doc/${pkgname}/

  msg2 "Install links to copyright resources at /usr/share/licenses/${pkgname}..."
  install -dm755                          ${pkgdir}/usr/share/licenses/${pkgname}
  ln -s /usr/share/java/${pkgname}/LICENSE.txt ${pkgdir}/usr/share/licenses/${pkgname}/
  ln -s /usr/share/java/${pkgname}/NOTICE.txt  ${pkgdir}/usr/share/licenses/${pkgname}/

  msg2 "Install links to executables in /usr/bin..."
  # NOTE The package provides 'mvnsh', 'mvn' and 'mvnDebug', but only
  #      'mvnsh' is symlinked. Should the other ones too ? This would
  #      make the package provide+conflict with 'maven' and 'maven2'.
  install -dm755                             ${pkgdir}/usr/bin
  ln -s /usr/share/java/${pkgname}/bin/mvnsh ${pkgdir}/usr/bin/
}

# vim:set ts=2 sw=2 et: