summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 6fce93281a8c0b64b11a7bfb7dc4ebba82b7edbc (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
51
52
53
54
55
# Maintainer: Philipp Hochkamp <philipp.hochkamp@udo.edu>
pkgname=srandr
_pkgname=srandr
_pkgprefix=gitlab.com/ragon000/
pkgver=0.0.1
pkgrel=3
pkgdesc="srandr - A tool for managing your sway outputs"
arch=('i686' 'x86_64')
license=('GPL')
depends=(
  'sway'
)
makedepends=(
	'gcc-go'
        'dep'
	'git'
)

source=(
	"$_pkgname::git+https://gitlab.com/ragon000/srandr.git#tag=${pkgver}"
)

md5sums=(
	'SKIP'
)

prepare() {
        echo ":: Preparing go path stuff"
	cd "$srcdir/$_pkgname"

	rm -rf "$srcdir/go/src"

	mkdir -p "$srcdir/go/src/$_pkgprefix"

	export GOPATH="$srcdir/go"

	mv "$srcdir/$_pkgname" "$srcdir/go/src/$_pkgprefix"

	cd "$srcdir/go/src/$_pkgprefix$_pkgname/"
	ln -sf "$srcdir/go/src/$_pkgprefix$_pkgname/" "$srcdir/$_pkgname"
}

build() {
	cd "$srcdir/go/src/$_pkgprefix$_pkgname/"
	export GOPATH="$srcdir/go"

	echo ":: Building binary"
        make
}

package() {
	cd "$srcdir/go/src/$_pkgprefix$_pkgname/"
        mkdir -p $pkgdir/usr/bin
        install srandr $pkgdir/usr/bin/
}