summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 1847f3b946690de2a9f78c0a1825aa84469ed04f (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
# Maintainer: Mark Wagie <mark dot wagie at tutanota dot com>
pkgname=webapp-manager-git
pkgver=1.0.3.r33.6124beb
pkgrel=2
pkgdesc="Run websites as if they were apps."
arch=('x86_64')
url="https://github.com/linuxmint/webapp-manager"
license=('GPL')
depends=('python-gobject' 'python-configobj' 'python-setproctitle'
         'python-tldextract' 'python-beautifulsoup4' 'xapps' 'dconf')
makedepends=('git')
optdepends=('brave' 'chromium' 'google-chrome' 'ephiphany' 'vivaldi')
provides=("${pkgname%-git}")
conflicts=("${pkgname%-git}")
source=('git+https://github.com/linuxmint/webapp-manager.git')
sha256sums=('SKIP')

pkgver() {
	cd "$srcdir/${pkgname%-git}"
	printf "%s.r%s.%s" "$(head -n 1 debian/changelog | cut -d'(' -f 2 | cut -d')' -f 1 | \
		sed 's/-/./')" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

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

	# Fix binary shebang
	sed -i 's/#\/bin\/sh/#!\/bin\/sh/g' "usr/bin/${pkgname%-git}"

	# Fix browser names
	sed -i 's/brave-browser/brave/g' \
		"usr/lib/${pkgname%-git}/${pkgname%-git}.py"
	sed -i 's/epiphany-browser/epiphany/g' \
		"usr/lib/${pkgname%-git}/${pkgname%-git}.py"

	# Fix license path
	sed -i 's/common-licenses/licenses\/common/g' \
		"usr/lib/${pkgname%-git}/${pkgname%-git}.py"
}

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

package() {
	cd "$srcdir/${pkgname%-git}"
	cp -r usr "$pkgdir"
}