upgpkg: wordpress 6.2.1-1
[ArchLinux/community.git] / smali / trunk / PKGBUILD
blob91122c76fdd502e8a5a58d9c100b9063ffdcbff4
1 # Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
2 # Contributor: Firef0x <Firefgx (at) gmail (dot) com>
3 # Contributor: sh0 <mee@sh0.org>
4 # Contributor: Lekensteyn <lekensteyn@gmail.com>
6 pkgname=smali
7 pkgver=2.5.2
8 pkgrel=1
9 pkgdesc="Assembler/disassembler for Android's dex format"
10 url='https://github.com/JesusFreke/smali'
11 arch=('any')
12 license=('BSD')
13 depends=('java-runtime=11' 'bash')
14 makedepends=('java-environment=11' 'gradle')
15 source=(https://github.com/JesusFreke/${pkgname}/archive/v${pkgver}/${pkgname}-v${pkgver}.tar.gz)
16 sha512sums=('33628637b096adeb5bf67f5f03efff7c0e0c988fe2f6ed41614e836a66b270a4ef7e7c544f23c91ff8a416ff06034ba64d23aa2bd49a5af3070191021c0b9258')
17 b2sums=('6aa7d3b5a9be07fec3f43d7bef46f78df54ee205df6816c540b3d9b3430baa416c4967d86948eaef11edff760833bd699819f27894a70eadd2d645dd8566b1cd')
19 prepare() {
20   cd ${pkgname}-${pkgver}
21   for file in baksmali smali; do
22     # prevent from printing path on launch
23     sed '/echo ${newProg}/d' -i scripts/${file}
24     # fix ls path
25     sed 's|/bin/ls|/usr/bin/ls|' -i scripts/${file}
26   done
29 build() {
30   cd ${pkgname}-${pkgver}
31   gradle build
34 check() {
35   cd ${pkgname}-${pkgver}
36   gradle test
39 package() {
40   cd ${pkgname}-${pkgver}
41   install -d "${pkgdir}/usr/bin"
42   for file in baksmali smali; do
43     install -Dm 644 "${file}/build/libs/${file}.jar" "${pkgdir}/usr/share/java/${pkgname}/${file}.jar"
44     install -Dm 755 scripts/${file} "${pkgdir}/usr/share/java/${pkgname}/${file}"
45     ln -s "/usr/share/java/${pkgname}/${file}" "${pkgdir}/usr/bin/${file}"
46   done
47   install -Dm 644 NOTICE -t "${pkgdir}/usr/share/licenses/${pkgname}"
50 # vim: ts=2 sw=2 et: