summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: b0228eaa537ace71a7225e9b5289c8d96d2563b0 (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
# Maintainer: Danilo Bargen <aur at dbrgn dot ch>
pkgname=qt5-sqlcipher-git
_reponame=qt5-sqlcipher
pkgver=r15.34f83ad
pkgrel=1
pkgdesc="Qt SQL driver plugin for SQLCipher. Fork by blizzard4591."
arch=('x86_64' 'i686')
url="https://github.com/blizzard4591/qt5-sqlcipher"
license=('GPL')
depends=('qt5-base' 'sqlcipher')
makedepends=('git' 'cmake' 'pkg-config')
provides=('qt5-sqlcipher')
source=('git+https://github.com/blizzard4591/qt5-sqlcipher')
sha256sums=('SKIP')

prepare() {
  cd "$srcdir/$_reponame"
  git submodule init
  git submodule update
}

build() {
  # Temporary build dir
  rm -rf "$srcdir/$_reponame-build"
  git clone --recursive "$srcdir/$_reponame" "$srcdir/$_reponame-build"
  cd "$srcdir/$_reponame-build"

  # Compile
  cd "$srcdir/$_reponame-build"
  cmake \
    -DCMAKE_INSTALL_PREFIX="$pkgdir/usr" \
    .
  make
}

check() {
  cd "$srcdir/$_reponame-build"
  ./qsqlcipher-test
}

package() {
  cd "$srcdir/$_reponame-build"
  install -Dm644 "$srcdir/$_reponame-build/sqldrivers/libqsqlcipher.so" "$pkgdir/usr/lib/qt/plugins/sqldrivers/libsqlcipher.so"
}

pkgver() {
  cd "$srcdir/$_reponame"
  printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

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