blob: 3b84f1aa72539fac5170c5c44e008fb068086099 (
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
45
46
47
48
49
|
# Maintainer: Daniel Milde <daniel@milde.cz>
pkgname=gdu-git
_gitname=gdu
pkgver=v4.11.2
pkgrel=1
license=('MIT')
pkgdesc="Fast disk usage analyzer"
conflicts=(gdu gdu-bin)
depends=('glibc')
makedepends=('go' 'pandoc')
arch=('x86_64')
url="https://github.com/dundee/gdu"
source=("$_gitname::git+https://github.com/Dundee/gdu")
sha256sums=('SKIP')
pkgver() {
cd "$_gitname"
git describe --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}
prepare(){
cd "$_gitname"
mkdir -p dist/
}
build() {
cd "$_gitname"
local _BUILDINFO="-X 'github.com/dundee/gdu/v4/build.Version=${pkgver}' \
-X 'github.com/dundee/gdu/v4/build.User=${PACKAGER}' \
-X 'github.com/dundee/gdu/v4/build.Time=$(date)'"
go build \
-trimpath \
-buildmode=pie \
-mod=readonly \
-modcacherw \
-ldflags "-linkmode external -extldflags \"${LDFLAGS}\" ${_BUILDINFO}" \
-o dist/gdu \
github.com/dundee/gdu/v4/cmd/gdu
pandoc gdu.1.md -s -t man > dist/gdu.1
}
package() {
cd "$_gitname"
install -Dm755 dist/$_gitname "${pkgdir}"/usr/bin/gdu
install -Dm644 dist/gdu.1 "${pkgdir}"/usr/share/man/man1/gdu.1
install -D -m644 LICENSE.md "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}
|