summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorsorz2018-03-04 14:56:26 +0800
committersorz2018-03-04 14:56:26 +0800
commitfa6e42b194600d089e9b8b48fa62862b6702af84 (patch)
tree7519bbb303e7ecadd5fa0366bb1472875380113f /PKGBUILD
downloadaur-fa6e42b194600d089e9b8b48fa62862b6702af84.tar.gz
Initial upload: receptor-git r120.a730ef1-1
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD37
1 files changed, 37 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..1bee678d994b
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,37 @@
+pkgname=receptor-git
+_pkgname=receptor
+pkgver=r120.a730ef1
+provides=('synapse')
+conflicts=('synapse')
+pkgrel=1
+pkgdesc='Web frontend for the synapse bittorrent client'
+arch=('any')
+url='https://github.com/SirCmpwn/receptor'
+license=('BSD')
+makedepends=('git' 'npm')
+source=(git+https://github.com/SirCmpwn/receptor)
+sha256sums=('SKIP')
+
+pkgver() {
+ cd "$_pkgname"
+ printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+}
+
+prepare() {
+ cd "$_pkgname"
+ git submodule update --init --recursive
+}
+
+build() {
+ cd "$_pkgname"
+ npm install --cache "${srcdir}/npm-cache"
+ npm run build:production
+}
+
+package() {
+ cd "$srcdir"/"$_pkgname"
+ _instdir="$pkgdir"/usr/share/webapps/"$_pkgname"
+ mkdir -p "$_instdir" "$_instdir"/dist
+ install -Dm 644 index.html "$_instdir"
+ install -Dm 644 dist/* "$_instdir"/dist
+}