summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 81c4118f15326325f2f55d07b69eb654cf1e0cb8 (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
# Maintainer: Mark Wagie <mark dot wagie at proton dot me>
pkgname=webapp-manager-git
pkgver=1.2.8.r4.g4895615
pkgrel=1
pkgdesc="Run websites as if they were apps."
arch=('any')
url="https://github.com/linuxmint/webapp-manager"
license=('GPL-3.0-or-later')
depends=(
  'dconf'
  'python-beautifulsoup4'
  'python-configobj'
  'python-gobject'
  'python-pillow'
  'python-setproctitle'
  'python-tldextract'
  'xapp'
)
makedepends=('git')
provides=("${pkgname%-git}")
conflicts=("${pkgname%-git}")
source=('git+https://github.com/linuxmint/webapp-manager.git')
sha256sums=('SKIP')

pkgver() {
  cd "$srcdir/${pkgname%-git}"
  git describe --long --tags --exclude master* | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}

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

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

  # Set version in About dialog
  sed -i "s/__DEB_VERSION__/${pkgver%.r*}/g" \
    "usr/lib/${pkgname%-git}/${pkgname%-git}.py"
}

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

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