initial commit (version 1.0.5)

This commit is contained in:
Carlos Galindo 2022-04-13 20:26:34 +02:00
commit 97127ce6d6
5 changed files with 83 additions and 0 deletions

21
.SRCINFO Normal file
View file

@ -0,0 +1,21 @@
pkgbase = meshcentral
pkgdesc = Web based remote computer management server
pkgver = 1.0.5
pkgrel = 1
url = https://meshcentral.com
arch = any
license = Apache
depends = nodejs>10
depends = npm
optdepends = mongodb: for larger deployments
noextract = meshcentral-1.0.5.tgz
source = meshcentral-1.0.5.tgz::https://registry.npmjs.org/meshcentral/-/meshcentral-1.0.5.tgz
source = meshcentral.service
source = meshcentral.tmpfiles
source = meshcentral.sysusers
sha256sums = dd1d132f07c486e9a53595cea05047a91f08ecbde487acc729a301fea3e79b24
sha256sums = 339ee5927101ca2cf945c2e26a4c3d1a7af452119e67fd57c089b5fa88cbdc4e
sha256sums = 30608aab6b9b268e492506a5c230a49cc28cb47dd09b7c28c586580132ee7f7a
sha256sums = 259209675649cd7630167a3ac0af3f33836f683c031c8b47e5ccc3a1bb97aa15
pkgname = meshcentral

43
PKGBUILD Normal file
View file

@ -0,0 +1,43 @@
# Maintainer: Carlos Galindo <arch -a-t- cgj .d.o.t. es>
pkgname=meshcentral
pkgver=1.0.5
pkgrel=1
pkgdesc="Web based remote computer management server"
arch=("any")
url="https://meshcentral.com"
license=('Apache')
depends=("nodejs>10" "npm")
optdepends=("mongodb: for larger deployments")
source=("$pkgname-$pkgver.tgz::https://registry.npmjs.org/$pkgname/-/$pkgname-$pkgver.tgz"
"$pkgname.service"
"$pkgname.tmpfiles"
"$pkgname.sysusers")
sha256sums=('dd1d132f07c486e9a53595cea05047a91f08ecbde487acc729a301fea3e79b24'
'339ee5927101ca2cf945c2e26a4c3d1a7af452119e67fd57c089b5fa88cbdc4e'
'30608aab6b9b268e492506a5c230a49cc28cb47dd09b7c28c586580132ee7f7a'
'259209675649cd7630167a3ac0af3f33836f683c031c8b47e5ccc3a1bb97aa15')
noextract=("$pkgname-$pkgver.tgz")
package() {
cd "$srcdir"
# Install systemD files
install -Dm644 "$pkgname.service" "$pkgdir/usr/lib/systemd/system/$pkgname.service"
install -Dm644 "$pkgname.tmpfiles" "$pkgdir/usr/lib/tmpfiles.d/$pkgname.conf"
install -Dm644 "$pkgname.sysusers" "$pkgdir/usr/lib/sysusers.d/$pkgname.conf"
# Install npm package and extra dependencies that meshcentral tries to install
# on first boot
npm install --global --prefix "$pkgdir/usr/lib/$pkgname" \
"$srcdir/$pkgname-$pkgver.tgz" \
archiver@4.0.2 otplib@10.2.3
# npm gives ownership of ALL FILES to build user
# https://bugs.archlinux.org/task/63396
chown -R root:root "$pkgdir/usr/lib/$pkgname"
# Data directories
install -dm755 "$pkgdir/var/lib/$pkgname"
install -dm750 "$pkgdir/var/lib/$pkgname/"{data,files,backup}
ln -s "../../../../var/lib/$pkgname/data" "$pkgdir/usr/lib/$pkgname/lib/$pkgname-data"
ln -s "../../../../var/lib/$pkgname/files" "$pkgdir/usr/lib/$pkgname/lib/$pkgname-files"
ln -s "../../../../var/lib/$pkgname/backup" "$pkgdir/usr/lib/$pkgname/lib/$pkgname-backup"
}

17
meshcentral.service Normal file
View file

@ -0,0 +1,17 @@
[Unit]
Description=Web based remote computer management and file server
[Service]
Type=simple
LimitNOFILE=1000000
ExecStart=/usr/bin/node /usr/lib/meshcentral/lib/node_modules/meshcentral
WorkingDirectory=/var/lib/meshcentral
Environment=NODE_ENV=production
User=meshcentral
Group=meshcentral
RestartSec=10
# Uncomment if you need to bind to ports <1024
#AmbientCapabilities=cap_net_bind_service
[Install]
WantedBy=multi-user.target

1
meshcentral.sysusers Normal file
View file

@ -0,0 +1 @@
u meshcentral - "MeshCentral" /opt/meshcentral

1
meshcentral.tmpfiles Normal file
View file

@ -0,0 +1 @@
Z /var/lib/meshcentral - meshcentral meshcentral - -