summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 81d920337076d958f5bd209382992c429ad954a0 (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
39
40
41
42
43
44
# Contributor: prurigro <prurigro at gmail dot com>
# Contributor: Rorschach <r0schach at lavabit dot com>
# Maintainer:  max.bra <max dot bra at alice dot it>

pkgname=ipscan
pkgver=3.9.1
pkgrel=3
pkgdesc='Angry IP Scanner (or simply ipscan) is an open-source and cross-platform network scanner designed to be fast and simple to use. It scans IP addresses and ports as well as has many other features.'
arch=('i686' 'x86_64')
license=('GPL2')
url='https://angryip.org'
depends=('java-runtime')
makedepends=(jdk17-openjdk)

source=(ipscan ipscan.desktop build.gradle.patch \
  "https://github.com/angryip/${pkgname}/archive/refs/tags/${pkgver}.zip")

sha512sums=('e2caf62412c35a7a29128d0ae176aca1e4a45cf81e44b76e4bb23ad1c0633fa8833d674d7d514942a170ab54223b6c4a93ab458f2736107e7bbe9a5e806a7c5e'
            'c17db5e4ac90af8675e9ac2a8e77f1322beb8bacb578a288bcfbf8da67270004ec40314b2793ea8ed8eeeeb64f9c03b3f80694e38c55be9d213486b825689a0f'
            '8ec4aae1b2226af984e58acd20ddc7d78268ab53a1f39cb6c85143741638727cf94794597bb9755483968c5f93e37cc96c33c61527529c074782f9447914399a'
            '0b09e252f56ac6632a377a6757e9b3e1b07b12229112f3c3cc9faf15380d93309ef028e8a5eb2650c061756fbeca453440518aff396f52aa700e37f1c82e3076')

prepare() {
  cd "${srcdir}/${pkgname}-${pkgver}"
  patch < ../build.gradle.patch
  sed -i "s|^version = .*|version = '${pkgver}'|" build.gradle
  sed -i -E "s|^( *'Version':) version,|\1 '${pkgver}',|g" build.gradle
}

build() {
  cd "${srcdir}/${pkgname}-${pkgver}"
  unset _JAVA_OPTIONS
  export PATH=/usr/lib/jvm/java-17-openjdk/bin:$PATH
  GRADLE_USER_HOME="${srcdir}" ./gradlew current
}

package() {
  cd "${srcdir}/${pkgname}-${pkgver}"
  install -Dm755 "../${pkgname}" "${pkgdir}/usr/bin/${pkgname}"
  install -Dm644 "../${pkgname}.desktop" "${pkgdir}/usr/share/applications/${pkgname}.desktop"
  install -Dm644 resources/images/icon256.png "${pkgdir}/usr/share/pixmaps/${pkgname}.png"
  install -Dm644 build/libs/ipscan-*-${pkgver}.jar "$pkgdir/usr/share/java/$pkgname/$pkgname.jar"
}