summaryrefslogtreecommitdiff
path: root/qwt5-qt5/PKGBUILD
blob: ef0bf23bcbea4e6ae8d14f79100638b1e1905f21 (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
# Maintainer: Erich Eckner <arch at eckner dot net>
# Contributor: Mirko Scholz
pkgname=qwt5-qt5
pkgver=5.2.3.52.a2b11e3
_commit="${pkgver##*.}"
pkgrel=1
pkgdesc='Qwt library (version 5.2.3) updated to work with Qt5.'
arch=('i686' 'pentium4' 'x86_64')
license=('custom')
depends=('qt5-base' 'qt5-svg')
url='https://github.com/gbm19/qwt5-qt5'
source=(
"git+https://github.com/gbm19/qwt5-qt5#commit=${_commit}"
"qwtconfig-archlinux.pri"
)
sha512sums=('SKIP'
            'a7dd5c600b41ff817464a1db3613790b51b62e46f9db861be1be0d3c30c1d3af93f636df520e9ee6d8c47ddc32a9e2b8e1091a0c1f1c0ea76e6fd4587165086c')

pkgver() {
	printf '5.2.3.%s.%s\n' \
	  "$(
	    git -C "${pkgname}" rev-list --count "${_commit}"
	  )" \
	  "$(
	    git -C "${pkgname}" rev-parse --short "${_commit}"
	  )"
}

prepare() {
	install -Dm644 "qwtconfig-archlinux.pri" "${srcdir}/qwt5-qt5-${_commit}/qwtconfig.pri"
}

build() {
	cd "${srcdir}/qwt5-qt5"
	qmake-qt5 qwt.pro
	make
}

package() {
	cd "${srcdir}/qwt5-qt5"
	make INSTALL_ROOT="${pkgdir}" install

	# remove docs
	rm -r "${pkgdir}/usr/share/doc/"
	rm -r "${pkgdir}/usr/share/man/"

	install -Dm644 "COPYING" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}