summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 690bd582404fdf5fa27e165b7327de813db7b171 (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: dracorp aka Piotr Rogoza <piotr.r.public at gmail.com>

pkgname=kimageannotator-git
pkgver=r397.8d21122
pkgrel=1
pkgdesc='Tool for annotating images'
arch=('i686' 'x86_64')
url='https://github.com/DamirPorobic/kImageAnnotator'
license=('GPL')
depends=(
  qt5-base
)
makedepends=(
  git
  cmake
  extra-cmake-modules
  qt5-tools
  kcolorpicker-git
)
provides=(
  kimageannotator
)
conflicts=(
  kimageannotator
)
source=('git+https://github.com/DamirPorobic/kImageAnnotator.git')
_gitname='kImageAnnotator'
md5sums=(SKIP)

prepare(){
  cd "$srcdir/$_gitname"
#   git submodule update --init --recursive
  test -d build || mkdir build
  sed 's@^add_subdirectory.*kColorPicker@#&@' -i CMakeLists.txt
}
pkgver(){
  if [ -d "$srcdir"/$_gitname ]; then
    cd "$srcdir"/$_gitname
    ( 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)" )
  fi
}
build(){
  cd "$srcdir/$_gitname/build"
  cmake -DCMAKE_INSTALL_PREFIX=/usr -DBUILD_SHARED_LIBS=ON ..
  make
}
package(){
  cd "$srcdir"/$_gitname/build
  make DESTDIR="$pkgdir" install
  cd "$pkgdir"/usr
}