diff options
author | Rhys Perry | 2020-06-10 10:28:15 +0100 |
---|---|---|
committer | Rhys Perry | 2020-06-10 10:28:15 +0100 |
commit | e0d149a4420e47effab48f5bf31c07c3182264e9 (patch) | |
tree | 949d5e1da9e77ffdc1dd80ba82139234f8af8f54 /PKGBUILD | |
parent | 40ef1412204cb67a4fd647226db088e6a5b8427b (diff) | |
download | aur-e0d149a4420e47effab48f5bf31c07c3182264e9.tar.gz |
Fix everything
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 42 |
1 files changed, 22 insertions, 20 deletions
@@ -1,40 +1,42 @@ pkgname="fathom-git" -pkgrel=1 -pkgver="v1.2.1.r43.gb278944" -pkgdesc="Fathom - simple website analytics (Community Edition)" +pkgrel=2 +pkgver=1.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=("git" "go-pie" "npm") - +makedepends=("go" "npm") source=("git+https://github.com/usefathom/fathom.git") md5sums=("SKIP") _gitname="fathom" -blddir="$(pwd)"/"build" pkgver() { - cd "$_gitname" + cd "$srcdir"/"$_gitname" git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g' } + build(){ - cp -r "$srcdir" "$blddir" - cd "$blddir" - - mkdir -p gopath/src/github.com/usefathom - ln -rTsf "$_gitname" gopath/src/github.com/usefathom/fathom + cd "$srcdir" - export GOPATH="$blddir"/gopath - cd "$_gitname" - make build + 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 "$blddir"/"$_gitname" - install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/"$pkgname"/LICENSE + cd "$srcdir"/gopath/src/github.com/usefathom/fathom + install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/fathom/LICENSE install -Dm755 fathom "$pkgdir"/usr/bin/fathom - rm -rf "$blddir" -}
\ No newline at end of file +} |