summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorVladimír Magyar2021-08-24 08:07:56 +0200
committerVladimír Magyar2021-08-24 08:07:56 +0200
commit1edffd270e3bc172db598eb7a517180d6ef71106 (patch)
tree776c48b208ca633a355358ef5747fe9f22217ce0 /PKGBUILD
parentbe961d285e02f4d9d26ecdd6c5fb8699ceaf47d7 (diff)
downloadaur-1edffd270e3bc172db598eb7a517180d6ef71106.tar.gz
remake PKGBUILD
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD54
1 files changed, 35 insertions, 19 deletions
diff --git a/PKGBUILD b/PKGBUILD
index c7b0d623b87f..08953bfdef90 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,38 +1,54 @@
+# Maintainer: Vladimir Magyar <vladimi at mgyar dot me>
+
pkgname=photon-rss-git
-_pkgname=photon
-pkgver=0.1.0.11
+pkgver=r132.066f732
pkgrel=1
pkgdesc="Fast RSS reader as light as a photon"
arch=("i686" "pentium4" "x86_64" "arm" "armv6h" "armv7h" "aarch64")
url="https://git.sr.ht/~ghost08/photon"
license=("GPL3")
-makedepends=(
- "go>=1.16"
- "git"
-)
+depends=('glibc')
+makedepends=('git' 'go')
optdepends=(
"youtube-dl: A command-line program to download videos from YouTube.com and a few more sites"
"mpv: a free, open source, and cross-platform media player"
"imv: Image viewer for Wayland and X11"
)
-source=("${_pkgname}::git+https://git.sr.ht/~ghost08/photon")
-sha256sums=("SKIP")
+provides=("${pkgname%-git}")
+conflicts=("${pkgname%-git}")
+source=("$pkgname::git+$url")
+sha256sums=('SKIP')
-prepare(){
- cd "$_pkgname"
- mkdir -p build/
+pkgver() {
+ cd "$pkgname"
+ printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
build() {
- cd "$_pkgname"
- export CGO_CPPFLAGS="${CPPFLAGS}"
- export CGO_CFLAGS="${CFLAGS}"
- export CGO_CXXFLAGS="${CXXFLAGS}"
- export CGO_LDFLAGS="${LDFLAGS}"
- go build -tags nox11 .
+ export CGO_CPPFLAGS="${CPPFLAGS}"
+ export CGO_CFLAGS="${CFLAGS}"
+ export CGO_CXXFLAGS="${CXXFLAGS}"
+ export CGO_LDFLAGS="${LDFLAGS}"
+ export GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external -mod=readonly -modcacherw"
+
+ cd "$pkgname"
+ go build -tags nox11
+}
+
+check() {
+ export CGO_CPPFLAGS="${CPPFLAGS}"
+ export CGO_CFLAGS="${CFLAGS}"
+ export CGO_CXXFLAGS="${CXXFLAGS}"
+ export CGO_LDFLAGS="${LDFLAGS}"
+ export GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external -mod=readonly -modcacherw"
+
+ cd "$pkgname"
+ go test ./...
}
package() {
- cd "$_pkgname"
- install -Dm755 $_pkgname "$pkgdir"/usr/bin/photon
+ cd "$pkgname"
+ install -Dm 755 photon -t "$pkgdir/usr/bin/"
+ install -Dm 644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname/"
+ install -Dm 644 README.md -t "$pkgdir/usr/share/doc/$pkgname/"
}