Add 'cryptpad/' from commit 'aabcafc23eb090c19c26c900e244a29b5aaefe56'

git-subtree-dir: cryptpad
git-subtree-mainline: eab9022812
git-subtree-split: aabcafc23e
This commit is contained in:
2019-09-06 12:51:41 +02:00
5 changed files with 90 additions and 0 deletions

22
cryptpad/.SRCINFO Normal file
View File

@@ -0,0 +1,22 @@
pkgbase = cryptpad
pkgdesc = Realtime collaborative visual editor with zero knowlege server
pkgver = 2.25.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.25.0.tar.gz
source = cryptpad.service
source = cryptpad.sysusers
source = cryptpad.tmpfiles
sha256sums = 8eb7791738f0623dfdd604814a64df9db0bad7d466896c413b388c8a82319197
sha256sums = 522851fbe4e0e41fd6ece8b2b0ed17bbae0233a58328b7994a5207aa341a635b
sha256sums = 999a271d64b75c7c447fdb21486b27463c04679677e57ea9551a3b0429c618f6
sha256sums = fa710a977248c1cd2482d4624325d3f8ac8479c9d748dd636077f55f48906d44
pkgname = cryptpad

52
cryptpad/PKGBUILD Normal file
View File

@@ -0,0 +1,52 @@
# Maintainer: Giovanni Harting <539@idlegandalf.com>
pkgname=cryptpad
pkgver=2.25.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=('8eb7791738f0623dfdd604814a64df9db0bad7d466896c413b388c8a82319197'
'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/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

View File

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

View File

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