PKGBUILDs/aur/shinobi-git/PKGBUILD

63 lines
2.7 KiB
Bash
Raw Normal View History

2023-10-21 11:59:55 +00:00
# Maintainer: graysky <therealgraysky AT protonmail DOT com>
2021-09-28 21:28:20 +00:00
# Contributor: AlphaJack <alphajack at tuta dot io>
2021-12-06 08:36:48 +00:00
pkgname=shinobi-git
pkgver=r2106.a2faa40
2022-08-27 10:47:26 +00:00
pkgrel=2
2021-09-28 21:28:20 +00:00
pkgdesc="The Open Source CCTV and NVR Solution"
url="https://shinobi.video/"
license=(custom) # not free for commercial use
arch=(any)
provides=(shinobi)
2021-12-06 08:36:48 +00:00
depends=(ffmpeg mariadb nodejs)
2021-09-28 21:28:20 +00:00
makedepends=(npm git)
2021-12-06 08:36:48 +00:00
source=(git+https://gitlab.com/Shinobi-Systems/Shinobi.git#branch=dev
shinobi-camera.service
shinobi-cron.service
shinobi.target
shinobi.sysusers
shinobi.tmpfiles
conf.json
super.json)
2021-09-28 21:28:20 +00:00
sha256sums=('SKIP'
2021-12-06 08:36:48 +00:00
'da346d9858dafb1a42dd43153d26763de05bc7cdabb5563b979ca62d2cc51ce3'
'adacf7a3ec970e6d5c5d8c339f56bdce3720b952ab7278f31d70a294fd0b5bdd'
'676111c7502ed43671ac5a4451ee0f89913de1c4b4f1e2120cd5c4b89e842757'
2021-09-28 21:28:20 +00:00
'e7c849bfcf8619a093ec75467cf5e44b34cd3621fa0d639bfacf4c88e0bad258'
'a0213eb276dfd468ed835cccceece75da92141716afa4c2426e20a06f64b5625'
'45c64bdaf8e7c99f14a8467fc3c996fefdaab8c100c9f28f03054c248f62a7d3'
'b6f2093025736770ed18141eee36b2cd2507142310bb258bf6365c4740c9aae6')
backup=(etc/shinobi/conf.json etc/shinobi/super.json)
install=shinobi.install
options=(!strip)
pkgver(){
2021-12-06 08:36:48 +00:00
cd Shinobi
2021-09-28 21:28:20 +00:00
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
package(){
# no /usr/bin, just systemd files
2021-12-06 08:36:48 +00:00
cd Shinobi
2021-09-28 21:28:20 +00:00
# program files
npm install --user root
install -d "$pkgdir/usr/share/shinobi"
cp -r * "$pkgdir/usr/share/shinobi"
# configuration files
install -d -m 750 "$pkgdir/etc/shinobi/"
install -D -m 660 "$srcdir/conf.json" "$pkgdir/etc/shinobi/conf.json"
install -D -m 660 "$srcdir/super.json" "$pkgdir/etc/shinobi/super.json"
ln -s "/etc/shinobi/conf.json" "$pkgdir/usr/share/shinobi"
ln -s "/etc/shinobi/super.json" "$pkgdir/usr/share/shinobi"
# systemd files
install -D -m 644 "$srcdir/shinobi-camera.service" "$pkgdir/usr/lib/systemd/system/shinobi-camera.service"
install -D -m 644 "$srcdir/shinobi-cron.service" "$pkgdir/usr/lib/systemd/system/shinobi-cron.service"
install -D -m 644 "$srcdir/shinobi.target" "$pkgdir/usr/lib/systemd/system/shinobi.target"
install -D -m 644 "$srcdir/shinobi.sysusers" "$pkgdir/usr/lib/sysusers.d/shinobi.conf"
install -D -m 644 "$srcdir/shinobi.tmpfiles" "$pkgdir/usr/lib/tmpfiles.d/shinobi.conf"
# custom license
2021-12-06 08:36:48 +00:00
install -D -m 644 LICENSE.md "$pkgdir/usr/share/licenses/shinobi/LICENSE"
2021-09-28 21:28:20 +00:00
# version.json is used by the web server
echo '{"Product" : "Shinobi Professional (Pro)" , "Branch" : "master" , "Version" : "'"$(git rev-parse HEAD)"'" , "Date" : "'"$(date)"'" , "Repository" : "https://gitlab.com/Shinobi-Systems/Shinobi"}' > "$pkgdir/usr/share/shinobi/version.json"
}