summarylogtreecommitdiffstats
diff options
context:
space:
mode:
author0x9fff002019-10-13 15:04:51 +0200
committer0x9fff002019-10-13 15:04:51 +0200
commite739cee67a7cfde9f7564ed74f27d29aa79e3e3b (patch)
tree33f78a1bbc62723e591aba9703c35f913cc8fa28
downloadaur-e739cee67a7cfde9f7564ed74f27d29aa79e3e3b.tar.gz
Initial commit
-rw-r--r--.SRCINFO20
-rw-r--r--PKGBUILD51
2 files changed, 71 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..377ed2308ac
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,20 @@
+pkgbase = pullcord-git
+ pkgdesc = Discord archiver - git version
+ pkgver = r117.6526a7c
+ pkgrel = 1
+ url = https://github.com/tsudoko/pullcord
+ arch = x86_64
+ license = custom:Unlicense
+ makedepends = git
+ makedepends = go
+ makedepends = golang-github-gorilla-websocket
+ makedepends = golang-golang-x-crypto
+ provides = pullcord
+ conflicts = pullcord
+ source = git+https://github.com/tsudoko/pullcord.git
+ source = git+https://github.com/bwmarrin/discordgo.git
+ sha256sums = SKIP
+ sha256sums = SKIP
+
+pkgname = pullcord-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..71fac488a23
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,51 @@
+# Maintainer: 0x9fff00 <0x9fff00+git@protonmail.ch>
+
+_pkgname=pullcord
+pkgname=$_pkgname-git
+pkgver=r117.6526a7c
+pkgrel=1
+pkgdesc="Discord archiver - git version"
+arch=('x86_64')
+url="https://github.com/tsudoko/$_pkgname"
+license=('custom:Unlicense')
+makedepends=('git' 'go' 'golang-github-gorilla-websocket' 'golang-golang-x-crypto')
+provides=('pullcord')
+conflicts=('pullcord')
+source=("git+$url.git"
+ 'git+https://github.com/bwmarrin/discordgo.git')
+sha256sums=('SKIP'
+ 'SKIP')
+
+pkgver() {
+ cd "$_pkgname"
+
+ printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+}
+
+prepare() {
+ cd "$_pkgname"
+ git submodule deinit -f --all
+ git submodule init
+ git config submodule.vendor/github.com/bwmarrin/discordgo.url "$srcdir/discordgo"
+ git submodule update
+ cd ..
+
+ mkdir -p gopath/src/
+ mv "$_pkgname"/vendor/* gopath/src/
+ mkdir -p gopath/src/github.com/tsudoko
+ ln -rTsf "$_pkgname" gopath/src/github.com/tsudoko/pullcord
+}
+
+build() {
+ export GOPATH="$srcdir/gopath:/usr/share/gocode"
+ cd gopath/src/github.com/tsudoko/pullcord
+ go build -v \
+ -trimpath \
+ -ldflags "-extldflags $LDFLAGS" ./cmd/pullcord
+}
+
+package() {
+ cd "$_pkgname"
+ install -Dm755 pullcord "$pkgdir/usr/bin/pullcord"
+ install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+}