summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichal Wojdyla2021-06-27 21:20:53 +0200
committerMichal Wojdyla2021-06-27 21:20:53 +0200
commit47743473a2ebdc66213484c52122ac1fe53f5db6 (patch)
treeebdc56f15760b9fabce6d70cc3ed1c9a949a17b4
parent3460737a768ef5c53a8e8ad3e171d86cf9dbcd77 (diff)
downloadaur-47743473a2ebdc66213484c52122ac1fe53f5db6.tar.gz
modernize
-rw-r--r--.SRCINFO11
-rw-r--r--PKGBUILD60
2 files changed, 34 insertions, 37 deletions
diff --git a/.SRCINFO b/.SRCINFO
index ad8571b8928d..be3690bbbcbc 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,18 +1,15 @@
pkgbase = annie-git
pkgdesc = A fast, simple and clean video downloader written in Go
- pkgver = 0.9.3
+ pkgver = 0.10.3.r19.gabc3c9d
pkgrel = 1
url = https://github.com/iawia002/annie
arch = x86_64
license = MIT
- makedepends = dep
- depends = go-pie
+ makedepends = go
depends = ffmpeg
+ provides = annie
conflicts = annie
- options = !strip
- options = !emptydirs
- source = annie-git::git+https://github.com/iawia002/annie#branch=master
+ source = git+https://github.com/iawia002/annie.git
sha256sums = SKIP
pkgname = annie-git
-
diff --git a/PKGBUILD b/PKGBUILD
index 06c500ef1667..3d034d0714e8 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,45 +1,45 @@
-# Maintainer: Joaquin Garmendia <joaquingc123 at gmail dot com>
-# All my PKGBUILDs can be found in https://www.github.com/joaquingx/PKGBUILDs
-
-# Co-Maintainer: Aniket Pradhan <aniket17133@iiitd.ac.in>
-
-# Owner/Cofntributer: Xinzhao Xu <z2d@jifangcheng.com>
+# Contributor: Joaquin Garmendia <joaquingc123 at gmail dot com>
+# Contributor: Aniket Pradhan <aniket17133@iiitd.ac.in>
+# Contributor: Xinzhao Xu <z2d@jifangcheng.com>
pkgname=annie-git
-pkgver=0.9.3
+pkgver=0.10.3.r19.gabc3c9d
pkgrel=1
arch=('x86_64')
pkgdesc="A fast, simple and clean video downloader written in Go"
url="https://github.com/iawia002/annie"
-license=("MIT")
-makedepends=('dep')
-depends=('go-pie' 'ffmpeg')
-conflicts=("annie")
-options=('!strip' '!emptydirs')
-source=("${pkgname}::git+https://github.com/iawia002/annie#branch=master")
+license=('MIT')
+makedepends=('go')
+depends=('ffmpeg')
+conflicts=('annie')
+provides=('annie')
+source=("git+https://github.com/iawia002/annie.git")
sha256sums=('SKIP')
-prepare(){
- mkdir -p gopath/src/github.com
- ln -rTsf $pkgname $srcdir/gopath/src/github.com/$pkgname
- export GOPATH="$srcdir"/gopath
- cd $GOPATH/src/github.com/$pkgname
- #dep init
- dep ensure
+pkgver() {
+ cd annie
+ git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}
build(){
- export GOPATH=$srcdir/gopath
- cd gopath/src/github.com/$pkgname
- go install \
- -gcflags "all=-trimpath=$GOPATH" \
- -asmflags "all=-trimpath=$GOPATH" \
- -ldflags "-extldflags $LDFLAGS" \
- -v ./...
+ cd annie
+
+ export CGO_CPPFLAGS="${CPPFLAGS}"
+ export CGO_CFLAGS="${CFLAGS}"
+ export CGO_CXXFLAGS="${CXXFLAGS}"
+ export CGO_LDFLAGS="${LDFLAGS}"
+
+ go build \
+ -trimpath \
+ -buildmode=pie \
+ -mod=readonly \
+ -modcacherw \
+ -ldflags "-linkmode=external"
+
}
package() {
- install -Dm755 gopath/bin/annie-git "$pkgdir"/usr/bin/annie
- cd "${srcdir}/${pkgname}"
- install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+ cd annie
+ install -Dm755 annie -t "$pkgdir/usr/bin"
+ install -Dm644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname"
}