summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: c84c413e20042db402fddd99379ea23a88a2bfeb (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
# Maintainer: Tomasz Jakub Rup <tomasz.rup@gmail.com>
pkgname=openapi-generator-cli
pkgver=4.2.3
_tag=4.2.3
pkgrel=1
pkgdesc="OpenAPI Generator CLI + bash completion"
arch=('any')
url="https://openapi-generator.tech/"
license=('Apache')
source=("https://repo1.maven.org/maven2/org/openapitools/$pkgname/$_tag/$pkgname-$_tag.jar"
        "https://raw.githubusercontent.com/OpenAPITools/openapi-generator/v$_tag/scripts/openapi-generator-cli-completion.bash"
        "openapi-generator-cli")
noextract=("$pkgname-$_tag.jar")
md5sums=('cda48eb414c8b4585e280c3fb2656e24'
         'fada86f59eb92ad50983d250bf0319a3'
         '9c6bf97fc32c0b8e289068d81cf96b33')

package() {
	depends=('java-runtime' 'bash')

	install -Dm755 openapi-generator-cli "$pkgdir/usr/bin/openapi-generator-cli"
	install -Dm644 openapi-generator-cli-completion.bash "$pkgdir/etc/bash_completion.d/openapi-generator-cli"
	install -Dm644 $pkgname-$_tag.jar "$pkgdir/usr/share/java/$pkgname-$pkgver.jar"

        sed -i -e "s/\$pkgname/$pkgname/g" "$pkgdir/usr/bin/openapi-generator-cli"
        sed -i -e "s/\$pkgver/$pkgver/g" "$pkgdir/usr/bin/openapi-generator-cli"

	ln -sr "$pkgdir/usr/bin/openapi-generator-cli" "$pkgdir/usr/bin/openapi-generator"
}