summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 2e6f466e48afeb30d3c6ceea1187ccbce06da0df (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
# Maintainer: Adrian Kocis <adrian dot kocis at gmail>
# Maintainer: James An <james at jamesan dot ca>

pkgname=dupd-git
_pkgname=${pkgname%-git}
pkgver=1.7.r43.gf137a38
pkgrel=1
pkgdesc="CLI utility to find duplicate files"
arch=('i686' 'x86_64')
url="http://www.virkki.com/$_pkgname"
license=('GPL3')
depends=( 'openssl' 'sqlite')
makedepends=('git')
provides=("$_pkgname=$pkgver")
conflicts=("$_pkgname")
source=("$_pkgname"::"git+https://github.com/jvirkki/$_pkgname.git")
md5sums=('SKIP')

pkgver() {
  cd "$_pkgname"
  (
    set -o pipefail
    git describe --long --tag | sed -r 's/([^-]*-g)/r\1/;s/-/./g' ||
    printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
  )
}

build() {
  cd "$_pkgname"
  make
}

check() {
  cd "$_pkgname"
  make test
}

package() {
    cd "$_pkgname"
    install -Dm755 "$_pkgname" "$pkgdir/usr/bin/$_pkgname"
}