summarylogtreecommitdiffstats
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
parentbe961d285e02f4d9d26ecdd6c5fb8699ceaf47d7 (diff)
downloadaur-1edffd270e3bc172db598eb7a517180d6ef71106.tar.gz
remake PKGBUILD
-rw-r--r--.SRCINFO9
-rw-r--r--PKGBUILD54
2 files changed, 41 insertions, 22 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 2663532d4105..5bfbf2e7402e 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = photon-rss-git
pkgdesc = Fast RSS reader as light as a photon
- pkgver = 0.1.0.11
+ pkgver = r132.066f732
pkgrel = 1
url = https://git.sr.ht/~ghost08/photon
arch = i686
@@ -11,12 +11,15 @@ pkgbase = photon-rss-git
arch = armv7h
arch = aarch64
license = GPL3
- makedepends = go>=1.16
makedepends = git
+ makedepends = go
+ depends = glibc
optdepends = youtube-dl: A command-line program to download videos from YouTube.com and a few more sites
optdepends = mpv: a free, open source, and cross-platform media player
optdepends = imv: Image viewer for Wayland and X11
- source = photon::git+https://git.sr.ht/~ghost08/photon
+ provides = photon-rss
+ conflicts = photon-rss
+ source = photon-rss-git::git+https://git.sr.ht/~ghost08/photon
sha256sums = SKIP
pkgname = photon-rss-git
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/"
}