summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean Lucas2018-07-24 15:29:30 -0400
committerJean Lucas2018-07-24 15:35:53 -0400
commit464025256a5686e72d1ebc93715c7bdd9be16dcf (patch)
treeabe1b174b8bd81fba5a9352fd20a80e3fedee4ed
downloadaur-464025256a5686e72d1ebc93715c7bdd9be16dcf.tar.gz
Initial commit
-rw-r--r--.SRCINFO29
-rw-r--r--PKGBUILD45
-rw-r--r--peertube.install14
3 files changed, 88 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..c2abb762cfa1
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,29 @@
+# Generated by mksrcinfo v8
+# Tue Jul 24 19:35:48 UTC 2018
+pkgbase = peertube-git
+ pkgdesc = Federated (ActivityPub) video-streaming platform using P2P (BitTorrent) directly in the web browser with WebTorrent and Angular
+ pkgver = 1.0.0+beta.9+125+ga8bf1d82
+ pkgrel = 1
+ url = https://joinpeertube.org
+ install = peertube.install
+ arch = i686
+ arch = x86_64
+ license = AGPL3
+ makedepends = git
+ makedepends = yarn
+ makedepends = python2
+ depends = nodejs-lts-carbon
+ depends = npm
+ depends = ffmpeg
+ depends = postgresql
+ depends = openssl
+ depends = redis
+ optdepends = nginx
+ backup = etc/peertube/production.yaml
+ source = git+https://github.com/Chocobozzz/peertube
+ source = peertube.install
+ sha512sums = SKIP
+ sha512sums = a2fc6e4d8821479bc641647ac50e4304cba9379c8398494138be8fcd328ad8aea513d033a7b572ed0e5e9c0a66b5b0eb3c31378dd2a512a71931417bc6af0bf9
+
+pkgname = peertube-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..aba7af2c8d2e
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,45 @@
+# Maintainer: Jean Lucas <jean@4ray.co>
+
+pkgname=peertube-git
+pkgver=1.0.0+beta.9+125+ga8bf1d82
+pkgrel=1
+pkgdesc='Federated (ActivityPub) video-streaming platform using P2P (BitTorrent) directly in the web browser with WebTorrent and Angular'
+arch=(i686 x86_64)
+depends=(nodejs-lts-carbon npm ffmpeg postgresql openssl redis)
+makedepends=(git yarn python2)
+optdepends=(nginx)
+url=https://joinpeertube.org
+license=(AGPL3)
+backup=(etc/peertube/production.yaml)
+install=peertube.install
+source=(git+https://github.com/Chocobozzz/peertube
+ peertube.install)
+sha512sums=(SKIP
+ a2fc6e4d8821479bc641647ac50e4304cba9379c8398494138be8fcd328ad8aea513d033a7b572ed0e5e9c0a66b5b0eb3c31378dd2a512a71931417bc6af0bf9)
+
+pkgver() {
+ cd peertube
+ git describe --tags | sed 's/v//;s/-/+/g'
+}
+
+build() {
+ cd peertube
+ yarn install --production --pure-lockfile
+}
+
+package() {
+ install -d $pkgdir/usr/share/{webapps,doc/peertube}
+ cp -a peertube $pkgdir/usr/share/webapps
+ cd peertube
+ install -Dm 644 config/production.yaml.example $pkgdir/etc/peertube/production.yaml
+ sed -i s@/var/www/peertube@/var/lib/peertube@g $pkgdir/etc/peertube/production.yaml
+ install -Dm 644 support/systemd/peertube.service $pkgdir/usr/lib/systemd/system/peertube.service
+ sed -i 's@/var/www/peertube/config@/etc/peertube@;s@/var/www/peertube/peertube-latest@/usr/share/webapps/peertube@' $pkgdir/usr/lib/systemd/system/peertube.service
+ cp -r support/doc/* $pkgdir/usr/share/doc/peertube
+ cp support/nginx/peertube $pkgdir/usr/share/doc/peertube/example-nginx-config
+ sed -i 's@/var/www/peertube/peertube-latest@/usr/share/webapps/peertube@;s@/var/www/peertube@/var/lib/peertube@' $pkgdir/usr/share/doc/peertube/example-nginx-config
+ install -Dm 644 README.md $pkgdir/usr/share/doc/peertube/README.md
+ install -Dm 644 FAQ.md $pkgdir/usr/share/doc/peertube/FAQ.md
+ install -Dm 644 CREDITS.md $pkgdir/usr/share/doc/peertube/CREDITS.md
+ install -Dm 644 LICENSE $pkgdir/usr/share/licenses/peertube/LICENSE
+}
diff --git a/peertube.install b/peertube.install
new file mode 100644
index 000000000000..651f4369a1be
--- /dev/null
+++ b/peertube.install
@@ -0,0 +1,14 @@
+post_install() {
+ getent passwd peertube > /dev/null ||
+ useradd -rmd /var/lib/peertube peertube
+ chown -R peertube:peertube /var/lib/peertube
+ chown -R peertube:peertube /etc/peertube
+}
+
+post_upgrade() {
+ post_install
+}
+
+post_remove() {
+ echo 'You may want to to remove the PeerTube user.'
+}