blob: bc3b5bfdf7a5f318fd1aeffbe704b46ab348eca6 (
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
|
# Maintainer: Rhys Perry <rhysperry111 AT gmail.com>
pkgname="fathom-git"
pkgrel=1
pkgver=v1.2.1.r55.g69baac5
pkgdesc="Fathom Lite. Simple, privacy-focused website analytics."
url="https://github.com/usefathom/fathom"
license=("MIT")
arch=("any")
provides=("fathom")
conflicts=("fathom")
makedepends=("go" "npm" "git")
source=("git+https://github.com/usefathom/fathom.git")
md5sums=("SKIP")
_gitname="fathom"
pkgver() {
cd "$srcdir"/"$_gitname"
git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}
build(){
cd "$srcdir"
rm -rf gopath
mkdir -p "gopath/src/github.com/usefathom"
mv "$_gitname" "gopath/src/github.com/usefathom/"
cd "gopath/src/github.com/usefathom/fathom"
export GOPATH="$srcdir"/gopath/
export CGO_CPPFLAGS="${CPPFLAGS}"
export CGO_CFLAGS="${CFLAGS}"
export CGO_CXXFLAGS="${CXXFLAGS}"
export CGO_LDFLAGS="${LDFLAGS}"
pwd
make GOFLAGS="-buildmode=pie" build
}
package(){
cd "$srcdir"/gopath/src/github.com/usefathom/fathom
install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/fathom/LICENSE
install -Dm755 fathom "$pkgdir"/usr/bin/fathom
}
|