summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authoryhfudev2015-06-09 12:37:35 -0400
committeryhfudev2015-06-09 12:37:35 -0400
commitf071fc5812e8c5f838ef95ca9e774262d3db46c3 (patch)
tree6aaa199ed5385e80acdb64f4474dfd224f8ea489
downloadaur-thebear-git.tar.gz
Initial import
-rw-r--r--.AURINFO16
-rw-r--r--.SRCINFO19
-rw-r--r--PKGBUILD60
-rw-r--r--apache.example.conf12
-rw-r--r--nginx.example.conf7
-rw-r--r--thebear-git.install7
6 files changed, 121 insertions, 0 deletions
diff --git a/.AURINFO b/.AURINFO
new file mode 100644
index 000000000000..29d2aff8c388
--- /dev/null
+++ b/.AURINFO
@@ -0,0 +1,16 @@
+pkgbase = thebear-git
+ pkgdesc = a web front end to aria2.
+ pkgver = 20140225
+ pkgrel = 1
+ url = http://sourceforge.net/p/thebear/home/Home
+ install = thebear-git.install
+ arch = any
+ license = GPL
+ depends = git
+ provides = thebear
+ source = thebear-git.install
+ source = apache.example.conf
+ source = nginx.example.conf
+
+pkgname = thebear-git
+
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..93120e67bf43
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,19 @@
+pkgbase = thebear-git
+ pkgdesc = a web front end to aria2.
+ pkgver = 20140225
+ pkgrel = 1
+ url = http://sourceforge.net/p/thebear/home/Home
+ install = thebear-git.install
+ arch = any
+ license = GPL
+ depends = git
+ provides = thebear
+ source = thebear-git.install
+ source = apache.example.conf
+ source = nginx.example.conf
+ md5sums = 362bb72f9885b09a69073435c7cb203e
+ md5sums = f5995bc1348f4cec255ab67dea91d4f2
+ md5sums = a36775c61151c9732d8f3c3c20d0033d
+
+pkgname = thebear-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..e0b4e9313f57
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,60 @@
+# Maintainer: Yunhui Fu
+# Constributor: Guten Ye
+
+pkgname="thebear-git"
+pkgver=20140225
+pkgrel=1
+pkgdesc="a web front end to aria2."
+arch=(any)
+url="http://sourceforge.net/p/thebear/home/Home"
+license=(GPL)
+depends=("git")
+provides=("thebear")
+install=$pkgname.install
+source=( "$install" "apache.example.conf" "nginx.example.conf" )
+
+_gitroot="git://git.code.sf.net/p/thebear/code"
+_gitname="thebear"
+
+pkgver() {
+ #echo pwd=$(pwd) > /dev/stderr
+ cd "${_gitdir}/"
+ git describe --always | sed -e 's|-|.|g' -e 's|release.||'
+}
+
+build() {
+ cd "$srcdir"
+ msg "Connecting to GIT server...."
+
+ if [[ -d "$_gitname" ]]; then
+ cd "$_gitname" && git pull origin
+ msg "The local files are updated."
+ else
+ git clone "$_gitroot" "$_gitname"
+ fi
+
+ msg "GIT checkout done or server timeout"
+ msg "Starting build..."
+
+ rm -rf "$srcdir/$_gitname-build"
+ git clone "$srcdir/$_gitname" "$srcdir/$_gitname-build"
+ cd "$srcdir/$_gitname-build"
+
+ chmod 777 assets protected
+}
+
+package() {
+ cd "$srcdir/$_gitname-build"
+
+ mkdir -p "$pkgdir/usr/share/webapps/thebear"
+ mkdir -p "$pkgdir/etc/webapps/thebear"
+
+ cp -r * "$pkgdir/usr/share/webapps/thebear"
+ cp ../apache.example.conf "$pkgdir/etc/webapps/thebear"
+ cp ../nginx.example.conf "$pkgdir/etc/webapps/thebear"
+}
+
+# vim:set ts=2 sw=2 et:
+md5sums=('362bb72f9885b09a69073435c7cb203e'
+ 'f5995bc1348f4cec255ab67dea91d4f2'
+ 'a36775c61151c9732d8f3c3c20d0033d')
diff --git a/apache.example.conf b/apache.example.conf
new file mode 100644
index 000000000000..cbeabb41d6bc
--- /dev/null
+++ b/apache.example.conf
@@ -0,0 +1,12 @@
+<IfModule alias_module>
+ Alias /thebear /usr/share/webapps/thebear
+ <Directory "/usr/share/webapps/thebear">
+ AllowOverride None
+ Options None
+ Order allow,deny
+# Allow from all
+ Allow from 127.0.0.1
+ </Directory>
+</IfModule>
+
+# vim:ft=apache
diff --git a/nginx.example.conf b/nginx.example.conf
new file mode 100644
index 000000000000..e3e21b61a7e7
--- /dev/null
+++ b/nginx.example.conf
@@ -0,0 +1,7 @@
+location /thebear/ {
+ allow 127.0.0.1;
+ deny all;
+
+ #auth_basic "Restricted";
+ #auth_basic_user_file htpasswd;
+}
diff --git a/thebear-git.install b/thebear-git.install
new file mode 100644
index 000000000000..57254488ffdd
--- /dev/null
+++ b/thebear-git.install
@@ -0,0 +1,7 @@
+post_install() {
+ ln -s /usr/share/webapps/thebear /srv/http/
+}
+
+post_remove() {
+ rm -f /srv/http/thebear
+}