summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 8dc4121f901cdb13062f71fb9824419c16ae0b80 (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
50
51
52
53
54
# Maintainer: James An <james@jamesan.ca>

pkgname=dupd-git
_pkgname=${pkgname%-git}
pkgver=1.3.r83.ged1888f
pkgrel=1
pkgdesc="CLI utility to find duplicate files"
arch=('i686' 'x86_64' 'any')
url="http://www.virkki.com/$_pkgname"
license=('GPL3')
makedepends=('git')
provides=("$_pkgname=$pkgver")
conflicts=("$_pkgname")
source=("$_pkgname"::"git+https://github.com/jvirkki/$_pkgname.git"
        "libbloom"::"git+https://github.com/jvirkki/libbloom.git"
        test.patch)
md5sums=('SKIP'
         'SKIP'
         '5228e790f359376d51a9348cb72092eb')

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)"
  )
}

prepare() {
  cd "$_pkgname"

  patch -p1 -i ../test.patch
}

build() {
  cd libbloom && make && cd ..
  cd "$_pkgname"

  make
}

check() {
  cd "$_pkgname"
  mv tests/{,~}test.72

  make test
}

package() {
    cd "$_pkgname"

    install -Dm755 "$_pkgname" "$pkgdir/usr/bin/$_pkgname"
}