summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorDictator Mei2018-08-10 00:00:17 +0900
committerDictator Mei2018-08-10 00:00:17 +0900
commitde1d82b62ebca530ab701f28f8e736baf002c468 (patch)
treea730c95aab220057129b8e8a6ca8c9b831566147
downloadaur-de1d82b62ebca530ab701f28f8e736baf002c468.tar.gz
Initial commit
-rw-r--r--.SRCINFO17
-rw-r--r--PKGBUILD33
2 files changed, 50 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..db833b911dd9
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,17 @@
+pkgbase = filebrowser-git
+ pkgver = 1.9.0
+ pkgrel = 1
+ url = https://github.com/filebrowser/filebrowser
+ arch = x86_64
+ license = Apache
+ makedepends = dep
+ makedepends = git
+ makedepends = go
+ makedepends = yarn
+ provides = filebrowser
+ conflicts = filebrowser
+ source = git+https://github.com/filebrowser/filebrowser.git
+ md5sums = SKIP
+
+pkgname = filebrowser-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..4dd695d1be30
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,33 @@
+# Maintainer: Dictator Mei <dctxmei@gmail.com>
+_pkgname=filebrowser
+pkgname=filebrowser-git
+pkgver=1.9.0
+pkgrel=1
+arch=('x86_64')
+url="https://github.com/filebrowser/filebrowser"
+license=('Apache')
+makedepends=("dep" "git" "go" "yarn")
+provides=('filebrowser')
+conflicts=('filebrowser')
+source=("git+${url}.git")
+md5sums=('SKIP')
+
+pkgver() {
+ git -C $_pkgname describe --tags | sed -e 's/^v//' -e 's/-/./g'
+}
+
+build() {
+ export GOPATH="$(pwd)/go"
+ export PATH="$PATH:$GOPATH/bin"
+ mkdir -p $GOPATH/src/github.com/$_pkgname
+ mv $_pkgname $GOPATH/src/github.com/$_pkgname
+ cd $GOPATH/src/github.com/$_pkgname/$_pkgname
+ git submodule init
+ git submodule update
+ sed "s/(untracked)/$(git describe --tags | sed -e 's/^v//' -e 's/-/./g')/" -i filebrowser.go
+ sh build/build_all.sh
+}
+
+package() {
+ install -Dm755 "$GOPATH"/src/github.com/$_pkgname/$_pkgname/$_pkgname "$pkgdir"/usr/bin/$_pkgname
+}