blob: 00ce9c291a4a5cf9b1777c322f44cc14d0578f66 (
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
|
# Maintainer: someone5678 <someone5678 dot dev at google dot com>
pkgname=bpfmt-git
_pkgname=bpfmt
pkgver=20241021.r32.5753849
pkgrel=1
pkgdesc='A tool for formatting AOSP soong blueprint build files'
url='https://android.googlesource.com/platform/build/blueprint'
arch=('any')
license=('Apache-2.0')
makedepends=('git' 'go')
provides=($_pkgname bpmodify)
source=('git+https://android.googlesource.com/platform/build/blueprint')
sha256sums=("SKIP")
pkgver() {
cd "${srcdir}/blueprint"
(
set -o pipefail
printf "%s.r%s.%s" \
"$(git log -1 --date=format:%Y%m%d --format=%ad bp{fmt,modify})" \
"$(git rev-list --count HEAD bp{fmt,modify})" \
"$(git log bp{fmt,modify} | head -n 1 | cut -d" " -f2 | awk '{print substr($0,0,7)}')"
)
}
build() {
cd "$srcdir/blueprint/$_pkgname"
go build
cd "$srcdir/blueprint/bpmodify/cmd"
go build -o bpmodify
}
package() {
install -Dm755 "$srcdir/blueprint/$_pkgname/$_pkgname" "$pkgdir/usr/bin/$_pkgname"
install -Dm644 "$srcdir/blueprint/LICENSE" -t "$pkgdir/usr/share/licenses/$_pkgname"
install -Dm755 "$srcdir/blueprint/bpmodify/cmd/bpmodify" "$pkgdir/usr/bin/bpmodify"
install -Dm644 "$srcdir/blueprint/LICENSE" -t "$pkgdir/usr/share/licenses/bpmodify"
}
|