summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 04ffcb8093dfedd3bb46d3d3f826b469fa63bfd4 (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
# Maintainer: Ben Morgan <neembi@gmail.com>
pkgname=mywire-connect
pkgver=0.10
pkgrel=3
epoch=
pkgdesc="Automatically complete the login process to a mywire internet connection"
arch=('i686' 'x86_64')
url="https://github.com/cassava/mywire-connect"
license=('MIT')
options=('!strip')
makedepends=('git' 'go')
optdepends=('dbus: support for desktop notifications')
source=("git+https://github.com/cassava/mywire-connect.git#tag=v$pkgver")
md5sums=('SKIP')
_magic=src/github.com/cassava/mywire-connect

prepare() {
    export GOPATH="$srcdir"
    cd "$srcdir"
    mkdir -p $(dirname $_magic)
    mv "$pkgname" "$_magic"
    # github.com/goulash/notify is a dependency of mywire-connect
    go get "github.com/goulash/notify"
}

build() {
    export GOPATH="$srcdir"
    cd "$srcdir/$_magic"
    go build -o "$pkgname"
}

package() {
    cd "$srcdir/$_magic"
    install -m755 -D "$pkgname" "$pkgdir/usr/bin/$pkgname"
    install -m644 -D "LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}