summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 6d30a1b378b0766d4a1fe006ea597ec58ca8c655 (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
pkgbase=https-everywhere
pkgname=${pkgbase}-chrome-git
pkgver=21701.c8d9b3a
pkgrel=1
pkgdesc="Chrome/Chromium extension to use HTTPS whenever possible - git/dev"
arch=('any')
url='https://www.eff.org/https-everywhere'
license=('GPL')
makedepends=(git perl python2-lxml libxml2 vim zip)
source=("git+https://github.com/EFForg/${pkgbase}.git")
md5sums=('SKIP')

pkgver() {
	cd "${srcdir}/${pkgbase}"
	local ver="$(git rev-list --count HEAD).$(git rev-parse --short HEAD)"
	printf "%s" "${ver//-/.}"
}

prepare() {
	cd "${srcdir}/${pkgbase}"
	sed -i 's/python\([^2]\)/python2\1/' makecrx.sh
	sed -i 's_/usr/bin/\(\|env \)python\([^2]\|$\)_/usr/bin/\1python2\2_' utils/*.py
}

build() {
	cd "${srcdir}/${pkgbase}"
	./makecrx.sh
}

package() {
	 mkdir -p "${pkgdir}/usr/share/${pkgname}"
	 shopt -s dotglob
	 cp -dr --no-preserve=ownership "${srcdir}/${pkgbase}/pkg/crx"/* "${pkgdir}/usr/share/${pkgname}"
}