summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: e7e2eeee76b157e60c8f307914c704cd3aeede28 (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
57
58
59
60
# Maintainer: jbreams@gmail.com
pkgname=gonepass-git
pkgver=r37.22ea069
pkgrel=1
pkgdesc="GTK+ 1Password reader"
arch=('x86_64')
url="https://github.com/jbreams/gonepass"
license=('Apache2')
groups=()
depends=(
  'openssl'
  'gtkmm3'
)
makedepends=(
  'git'
  'cmake'
)
install=
source=('git+https://github.com/jbreams/gonepass')
md5sums=('SKIP')

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

prepare() {
	cd "$srcdir/${pkgname%-git}"
    mkdir build
}

build() {
	cd "$srcdir/${pkgname%-git}/build"
    cmake -DCMAKE_INSTALL_PREFIX=/usr -DGSETTINGS_COMPILE=OFF ..
    make
}

package() {
	cd "$srcdir/${pkgname%-git}/build"
	make DESTDIR=$pkgdir/ install
}

post_install() {
    glib-compile-schemas /usr/share/glib-2.0/schemas
    update-desktop-database -q
}

pre_upgrade() {
    if [ -f /usr/share/glib-2.0/schemas/gonepass.gschema.xml ]; then
        gconfpkg --uninstall gonepass
    fi
}

post_upgrade() {
    post_install $1
}

post_remove() {
    post_install $1
}