82 lines
3.2 KiB
Text
82 lines
3.2 KiB
Text
|
# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
|
||
|
# Contributor: Antoine Martin (ayakael) <dev@ayakael.net>
|
||
|
pkgname=peertube
|
||
|
pkgver=6.0.2
|
||
|
pkgrel=0
|
||
|
pkgdesc="ActivityPub-federated video streaming platform using P2P directly in your web browser"
|
||
|
arch="x86_64"
|
||
|
url="https://joinpeertube.org/"
|
||
|
license="AGPL"
|
||
|
depends="
|
||
|
nodejs
|
||
|
ffmpeg
|
||
|
postgresql
|
||
|
openssl
|
||
|
redis
|
||
|
npm
|
||
|
procps-ng
|
||
|
"
|
||
|
makedepends="
|
||
|
yarn
|
||
|
"
|
||
|
source="
|
||
|
$pkgname-$pkgver.tar.gz::https://github.com/Chocobozzz/PeerTube/archive/refs/tags/v$pkgver.tar.gz
|
||
|
peertube-manage.sh
|
||
|
peertube.conf
|
||
|
peertube.openrc
|
||
|
"
|
||
|
builddir="$srcdir"/PeerTube-$pkgver
|
||
|
install="$pkgname.post-install $pkgname.pre-install $pkgname.post-upgrade"
|
||
|
subpackages="$pkgname-doc $pkgname-openrc"
|
||
|
|
||
|
build() {
|
||
|
# need to fetch devel depencencies to build
|
||
|
yarn install --pure-lockfile
|
||
|
npm run build
|
||
|
rm -Rf "$builddir"/node_modules
|
||
|
yarn install --production --pure-lockfile
|
||
|
}
|
||
|
|
||
|
package() {
|
||
|
install -dm 755 \
|
||
|
"$pkgdir"/usr/share/webapps \
|
||
|
"$pkgdir"/usr/share/doc \
|
||
|
"$pkgdir"/usr/share/licenses/peertube \
|
||
|
"$pkgdir"/etc/init.d \
|
||
|
"$pkgdir"/etc/conf.d
|
||
|
|
||
|
# install
|
||
|
cp -a "$builddir" "$pkgdir/usr/share/webapps/peertube"
|
||
|
|
||
|
# wrapper script
|
||
|
install -Dm755 "$srcdir"/peertube-manage.sh "$pkgdir"/usr/bin/peertube-manage
|
||
|
|
||
|
# openrc
|
||
|
install -Dm755 "$srcdir"/peertube.openrc "$pkgdir"/etc/init.d/peertube
|
||
|
install -Dm644 "$srcdir"/peertube.conf "$pkgdir"/etc/conf.d/peertube
|
||
|
|
||
|
# config file setup
|
||
|
rm -R "$pkgdir"/usr/share/webapps/peertube/config
|
||
|
install -Dm644 "$builddir"/config/production.yaml.example "$pkgdir"/etc/peertube/production.yaml
|
||
|
install -Dm644 "$builddir"/config/default.yaml "$pkgdir"/etc/peertube/default.yaml
|
||
|
sed -i "s|/var/www/peertube/storage|/var/lib/peertube|g" "$pkgdir"/etc/peertube/production.yaml "$pkgdir"/etc/peertube/default.yaml
|
||
|
sed -i "s| tmp:.*| tmp: '/tmp/peertube/'|" "$pkgdir"/etc/peertube/production.yaml "$pkgdir"/etc/peertube/default.yaml
|
||
|
sed -i "s|tmp_persistent:.*|tmp_persistent: '/var/tmp/peertube/'|" "$pkgdir"/etc/peertube/production.yaml "$pkgdir"/etc/peertube/default.yaml
|
||
|
sed -i "s|logs:.*|logs: '/var/log/peertube/'|" "$pkgdir"/etc/peertube/production.yaml "$pkgdir"/etc/peertube/default.yaml
|
||
|
sed -i "s| peertube: ''| peertube: '@@SECRET_KEY@@'|" "$pkgdir"/etc/peertube/production.yaml
|
||
|
|
||
|
# docs and licenses
|
||
|
mv "$pkgdir"/usr/share/webapps/peertube/support/doc "$pkgdir"/usr/share/doc/$pkgname
|
||
|
mv "$pkgdir"/usr/share/webapps/peertube/*.md "$pkgdir"/usr/share/doc/peertube/.
|
||
|
mv "$pkgdir"/usr/share/webapps/peertube/LICENSE "$pkgdir"/usr/share/licenses/peertube/.
|
||
|
|
||
|
# delete arm64 prebuild
|
||
|
rm "$pkgdir"/usr/share/webapps/$pkgname/node_modules/fs-native-extensions/prebuilds/linux-arm64/node.napi.node
|
||
|
}
|
||
|
sha512sums="
|
||
|
91bcec34902f171ffe9ab3f27ab4422319f91430cab22965a5cf9887c5293152f7f85c6fc0f355820000daea0a49327aa66f20bb4cff3850e5e3d192f347c926 peertube-6.0.2.tar.gz
|
||
|
92de1155410848937eeff3bef480c4a074875b4236ce0b6bf4cd7213d00173e7766d130408419c85c4432a8445a03f5d4525e4283384d906d781510cc4fd8fc0 peertube-manage.sh
|
||
|
494bb4daf98fcd62b354eb6fae18ccff19bef1243de083a93e438680deef1d9039e30eff8870b6955c3c7b10638e6df6cbeb4fbdb7539979466f502bcc72c843 peertube.conf
|
||
|
5b4d3f47d0dc2ce991971ff61c604a1566811612cff91f7e6ed19b65d0830695649ddef9afff474d916a5e6764d74bb4fa6b5c12eb5e753d8fc381cdd38ab179 peertube.openrc
|
||
|
"
|