summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: d7cff0bb7135e8f6efb4e588ac89f328f2d2b6d1 (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
55
56
pkgname=antiduplx-git
_pkgver=1.0.1
pkgver=1.0.1.r28.895a50c
pkgrel=1
pkgdesc="Command line tool to find and remove similar pictures"
arch=('x86_64')
url="https://github.com/ermig1979/AntiDuplX"
license=(MIT)
depends=(
  libjpeg-turbo
)
makedepends=(
  cmake
  git
  nasm
  ninja
)
source=(
  "$pkgname::git+$url.git"
  "git+https://github.com/ermig1979/Cpl.git"
  "git+https://github.com/ermig1979/Simd.git"
)
sha256sums=('SKIP'
            'SKIP'
            'SKIP')

pkgver() {
  cd "$pkgname"
  printf "%s.r%s.%s" "$_pkgver" "$(git rev-list --count HEAD)" "$(git rev-parse --short=7 HEAD)"
}

prepare() {
  cd "$pkgname"
  git submodule init
  git config submodule.3rd/Cpl.url "$srcdir/Cpl"
  git config submodule.3rd/Simd.url "$srcdir/Simd"
  git -c protocol.file.allow=always submodule update -- "3rd/Cpl" "3rd/Simd"
}

build() {
  cd "$pkgname"

  cmake -B build -G Ninja -S ./prj/cmake \
        -DCMAKE_INSTALL_PREFIX=/usr \
        -DADX_USE_SYSTEM_TURBOJPEG=ON

  cmake --build build
}

package() {
  cd "$pkgname"

  install -Dm755 "build/AntiDuplX"  "$pkgdir/usr/bin/AntiDuplX"
}

# vim:set ts=2 sw=2 et: