summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 06d481621f69fbc3f8c911503c543c4f9a7d169b (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
#Maintainer: m4sk1n <m4sk1n@vivaldi.net>
#Contributor: Christian Hesse <mail@eworm.de>

pkgname=otter-browser-git
pkgver=0.9.12.r411.g2d874a47
pkgrel=3
pkgdesc='Otter Browser, project aiming to recreate classic Opera (12.x) UI using Qt5 - git checkout'
arch=('x86_64' 'i686')
url='http://otter-browser.org/'
license=('GPL3')
provides=('otter-browser')
conflicts=('otter-browser')
sha256sums=('SKIP')

pkgver() {
	cd otter-browser/

	if GITTAG="$(git describe --abbrev=0 --tags 2>/dev/null)"; then
		echo "$(sed -e "s/^${pkgname%%-git}//" -e 's/^[-_/a-zA-Z]\+//' -e 's/[-_+]/./g' <<< ${GITTAG}).r$(git rev-list --count ${GITTAG}..).g$(git log -1 --format="%h")"
	else
		echo "0.r$(git rev-list --count master).g$(git log -1 --format="%h")"
	fi
}

build() {
	mkdir -p otter-browser/build/
	cd otter-browser/build/

	cmake -DCMAKE_INSTALL_PREFIX="/usr" ../
	make
}

package() {
	cd otter-browser/

	install -D -m0644 COPYING ${pkgdir}/usr/share/licenses/otter-browser/COPYING

	cd build/

	make DESTDIR=${pkgdir} install

}