v2.23.0; inital submit

This commit is contained in:
2019-06-08 18:39:13 +02:00
commit 9d29ab0e48
5 changed files with 90 additions and 0 deletions

22
.SRCINFO Normal file
View File

@@ -0,0 +1,22 @@
pkgbase = cryptpad
pkgdesc = Realtime collaborative visual editor with zero knowlege server
pkgver = 2.23.0
pkgrel = 1
url = https://github.com/xwiki-labs/cryptpad
arch = any
license = AGPL3
makedepends = npm
makedepends = bower
makedepends = git
depends = nodejs
source = https://github.com/xwiki-labs/cryptpad/archive/2.23.0.tar.gz
source = cryptpad.service
source = cryptpad.sysusers
source = cryptpad.tmpfiles
sha256sums = 5a13821092441db8b699e2196443c231a8096275c6305e750c39d1c6148f3099
sha256sums = 522851fbe4e0e41fd6ece8b2b0ed17bbae0233a58328b7994a5207aa341a635b
sha256sums = 999a271d64b75c7c447fdb21486b27463c04679677e57ea9551a3b0429c618f6
sha256sums = fa710a977248c1cd2482d4624325d3f8ac8479c9d748dd636077f55f48906d44
pkgname = cryptpad

52
PKGBUILD Normal file
View File

@@ -0,0 +1,52 @@
# Maintainer: Giovanni Harting <539@idlegandalf.com>
pkgname=cryptpad
pkgver=2.23.0
pkgrel=1
pkgdesc="Realtime collaborative visual editor with zero knowlege server"
arch=('any')
url="https://github.com/xwiki-labs/cryptpad"
license=('AGPL3')
depends=('nodejs')
makedepends=('npm' 'bower' 'git')
source=("https://github.com/xwiki-labs/cryptpad/archive/$pkgver.tar.gz"
"cryptpad.service"
"cryptpad.sysusers"
"cryptpad.tmpfiles")
sha256sums=('5a13821092441db8b699e2196443c231a8096275c6305e750c39d1c6148f3099'
'522851fbe4e0e41fd6ece8b2b0ed17bbae0233a58328b7994a5207aa341a635b'
'999a271d64b75c7c447fdb21486b27463c04679677e57ea9551a3b0429c618f6'
'fa710a977248c1cd2482d4624325d3f8ac8479c9d748dd636077f55f48906d44')
package() {
cd "${srcdir}/$pkgname-$pkgver"
npm install -g --user root --prefix "${pkgdir}"/usr --cache "${srcdir}/npm-cache"
bower install --allow-root
rm -rv "${pkgdir}"/usr
# make sure directory permissions are acceptable
find . -type d -exec chmod 755 {} +
# Documentation
install -v -t "${pkgdir}"/usr/share/doc/$pkgname -Dm 644 docs/ARCHITECTURE.md -Dm 644 docs/example.nginx.conf -Dm 644 CHANGELOG.md
# Cryptpad
install -vd "${pkgdir}"/usr/share/$pkgname
cp -rv {customize.dist,historyKeeper.js,import,lib,node_modules,rpc.js,scripts,server.js,storage,www,package.json} "${pkgdir}"/usr/share/$pkgname
# Config
sed -e "s|\(Path: '\)\./|\1/var/lib/cryptpad/|" \
-e "s|'/var/lib/cryptpad/data/logs'|false|" \
-e "s|logToStdout: false|logToStdout: true|" \
-i config/config.example.js
install -vDm 644 config/config.example.js "${pkgdir}/etc/webapps/$pkgname/config.example.js"
ln -vs "/etc/webapps/$pkgname" "${pkgdir}"/usr/share/$pkgname/config
# systemd
install -Dm 644 "${srcdir}"/cryptpad.sysusers "${pkgdir}"/usr/lib/sysusers.d/cryptpad.conf
install -Dm 644 "${srcdir}"/cryptpad.service "${pkgdir}"/usr/lib/systemd/system/cryptpad.service
install -Dm 644 "${srcdir}"/cryptpad.tmpfiles "${pkgdir}"/usr/lib/tmpfiles.d/cryptpad.conf
}

11
cryptpad.service Normal file
View File

@@ -0,0 +1,11 @@
[Unit]
Description=CryptPad service
[Service]
ExecStart=/usr/bin/node /usr/share/cryptpad/server.js
WorkingDirectory=/usr/share/cryptpad
User=cryptpad
[Install]
WantedBy=multi-user.target

2
cryptpad.sysusers Normal file
View File

@@ -0,0 +1,2 @@
u cryptpad - "CryptPad" /var/lib/cryptpad

3
cryptpad.tmpfiles Normal file
View File

@@ -0,0 +1,3 @@
d /var/lib/cryptpad 0755 cryptpad cryptpad -
Z /var/lib/cryptpad - cryptpad cryptpad -