summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: e26cc8ec186fa23150f265c10beea3b012044dd8 (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
pkgname=kimageannotator-git
pkgver=r987.6ebffb1
pkgrel=1
pkgdesc='Tool for annotating images'
arch=('i686' 'x86_64')
url='https://github.com/DamirPorobic/kimageannotator'
license=('GPL')
depends=(
  qt5-base
  qt5-svg
)
makedepends=(
  git
  cmake
  extra-cmake-modules
  qt5-tools
  kcolorpicker-git
)
conflicts=(${pkgname%-git})
provides=(${pkgname%-git})
source=("git+$url.git")
sha256sums=('SKIP')

prepare(){
  cd ${pkgname%-git}
  test -d build || mkdir build
  sed 's@^add_subdirectory.*kColorPicker@#&@' -i CMakeLists.txt
}
pkgver(){
  cd ${pkgname%-git}
  set -o pipefail
  git describe --long 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' ||
    printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
build(){
  cd ${pkgname%-git}/build
  cmake -DCMAKE_INSTALL_PREFIX=/usr -DBUILD_SHARED_LIBS=ON ..
  make
}
package(){
  cd ${pkgname%-git}/build
  make DESTDIR="$pkgdir" install
  cd "$pkgdir"/usr
  install -dm755 bin
  install -Dm544 "$srcdir/kImageAnnotator/build/example/kImageAnnotator-example" bin/kImageAnnotator-example
}