blob: ea630bb7aa55fb88f5e0715e2c82e9175cd2a692 (
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: Chris Snell <chris.snell@gmail.com>
pkgname=captive-browser-git
_pkgname=captive-browser
pkgver=r19.0293a07
pkgrel=1
pkgdesc="A dedicated Chrome instance to log into captive portals without messing with DNS settings"
arch=('x86_64' 'i686' 'arm')
url="https://blog.filippo.io/captive-browser"
conflicts=('captive-browser')
provides=('captive-browser')
optdepends=('chromium: used to log into captive portal'
'google-chrome: used to log into captive portal')
options=('!strip')
license=('MIT')
makedepends=('go' 'git')
source=('git+https://github.com/FiloSottile/captive-browser.git')
sha512sums=('SKIP')
install=captive-browser-git.install
pkgver() {
cd "$srcdir/$_pkgname"
( set -o pipefail
git describe --long --tags 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' ||
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
)
}
build() {
cd "$srcdir/$_pkgname"
# Remove the vendored modules
rm -rf vendor/
# Use go mod to handle deps
go mod init captive-browser
go mod tidy
go build
}
package() {
cd "$srcdir/$_pkgname"
install -Dm755 "$_pkgname" "$pkgdir/usr/bin/$_pkgname"
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$_pkgname/LICENSE"
install -Dm644 captive-browser-ubuntu-chrome.toml "$pkgdir/usr/share/$_pkgname/example/captive-browser.toml"
}
|