summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 265c6b8cfba9eba0a8853aab3ff9d7ff17c71c5e (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
# Maintainer: Arnab Bose <hirak99+arch@gmail.com>
pkgname=dupefi
pkgver=1.01
pkgrel=1
pkgdesc="A command-line duplicate file finder for linux."
arch=('any')
url="https://github.com/hirak99/dupefi"
license=('Apache')
depends=()
makedepends=('go>=1.18')
provides=('dupefi')
source=("$url/archive/refs/tags/v$pkgver.tar.gz")
md5sums=('22ca1a83882a1ae0a3ef6e4fc9ade056')

check() {
  cd "$pkgname"-$pkgver
  scripts/run_tests.sh
}

build() {
  cd "$pkgname-$pkgver"
  export CGO_CPPFLAGS="${CPPFLAGS}"
  export CGO_CFLAGS="${CFLAGS}"
  export CGO_CXXFLAGS="${CXXFLAGS}"
  export CGO_LDFLAGS="${LDFLAGS}"
  export GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external -mod=readonly -modcacherw"
  scripts/build.sh
}

package() {
  install -Dm755 "$pkgname"-$pkgver/build/dupefi "$pkgdir"/usr/bin/dupefi
}