diff options
author | Catty Steve | 2022-08-26 23:42:31 +0800 |
---|---|---|
committer | Catty Steve | 2022-08-26 23:42:31 +0800 |
commit | a2440ff9a87c704e70b7d4d313a0f05aaa5ce3a2 (patch) | |
tree | 2b54d6f0e536466d9c9a815f115008822748e36d | |
download | aur-a2440ff9a87c704e70b7d4d313a0f05aaa5ce3a2.tar.gz |
New package
-rw-r--r-- | .SRCINFO | 31 | ||||
-rw-r--r-- | .gitignore | 5 | ||||
-rw-r--r-- | PKGBUILD | 56 | ||||
-rw-r--r-- | collabora-online-server-git.install | 18 | ||||
-rw-r--r-- | coolwsd.patch | 10 | ||||
-rw-r--r-- | service.patch | 12 |
6 files changed, 132 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..abcec5ade812 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,31 @@ +pkgbase = collabora-online-server-git + pkgdesc = A collaborative online office suite based on LibreOffice technology + pkgver = 22.05.5.3 + pkgrel = 1 + url = https://collaboraonline.github.io + install = collabora-online-server-git.install + arch = x86_64 + license = MPL + makedepends = chromium + depends = libcap + depends = libcap-ng + depends = lib32-libcap + depends = libpng + depends = poco + depends = cppunit + depends = nodejs + depends = npm + depends = python-lxml + depends = python-polib + depends = cpio + backup = etc/coolwsd/coolwsd.xml + source = git+https://github.com/CollaboraOnline/online.git + source = https://github.com/CollaboraOnline/online/releases/download/for-code-assets/core-co-22.05-assets.tar.gz + source = coolwsd.patch + source = service.patch + sha512sums = SKIP + sha512sums = a72d3f50a225775c0fede5d99bf5e4be5ac53625b0970d9cc82c0ab710a12962e804f663c41bbbffc43d4ba3bee2bdda2ec73f9943c46a958c96f8d74d2e5204 + sha512sums = 227a317874775398081275d9ee4aadb8b75deb1cbdae404646957439057645525f42e2fe6ae3cd79d11d3132529facca5cb680690f28e3c6846c57395d7f71a6 + sha512sums = 4845fc0f23e56b4fbec129b5d90db02aab02aeb55ab028f7c6fa2b42911026f6f4c02dff61debd298b7f7448c843884aa0b813f52ee34f53e0925ee4a58a1026 + +pkgname = collabora-online-server-git diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..79630f95b6c5 --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +pkg +online +src +collabora-online-server-git-22.05.5.3-1-x86_64.pkg.tar.zst +core-co-22.05-assets.tar.gz diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..56bdc9c1b326 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,56 @@ +# Maintainer: Pig2014 <cattysteve89265@163.com> + +pkgname=collabora-online-server-git +pkgver=22.05.5.3 +pkgrel=1 +pkgdesc="A collaborative online office suite based on LibreOffice technology" +url="https://collaboraonline.github.io" +arch=(x86_64) +license=("MPL") +depends=("libcap" "libcap-ng" "lib32-libcap" "libpng" "poco" "cppunit" "nodejs" "npm" "python-lxml" "python-polib" "cpio") +makedepends=("chromium") +backup=("etc/coolwsd/coolwsd.xml") +source=("git+https://github.com/CollaboraOnline/online.git" + "https://github.com/CollaboraOnline/online/releases/download/for-code-assets/core-co-22.05-assets.tar.gz" + "coolwsd.patch" + "service.patch") + +sha512sums=('SKIP' + 'a72d3f50a225775c0fede5d99bf5e4be5ac53625b0970d9cc82c0ab710a12962e804f663c41bbbffc43d4ba3bee2bdda2ec73f9943c46a958c96f8d74d2e5204' + '227a317874775398081275d9ee4aadb8b75deb1cbdae404646957439057645525f42e2fe6ae3cd79d11d3132529facca5cb680690f28e3c6846c57395d7f71a6' + '4845fc0f23e56b4fbec129b5d90db02aab02aeb55ab028f7c6fa2b42911026f6f4c02dff61debd298b7f7448c843884aa0b813f52ee34f53e0925ee4a58a1026') +install="collabora-online-server-git.install" + +prepare() { + patch online/coolwsd.xml.in coolwsd.patch + patch online/coolwsd.service service.patch +} + +build() { + cd online + ./autogen.sh + ./configure --enable-silent-rules --with-lokit-path="${srcdir}"/include --with-lo-path=/usr/share/coolwsd/libreoffice --disable-werror --disable-setcap + cd "${srcdir}"/online + make +} + +package() { + cd "${srcdir}"/online + make install DESTDIR="${pkgdir}" + cd "${pkgdir}"/usr/local/ + mv etc ../../ + mv bin ../ + mv share ../ + cd .. + rm local -r + cd "${pkgdir}"/etc + mkdir -p httpd/conf/extra + mv apache2/conf-available/coolwsd.conf httpd/conf/extra/ + rm -r apache2 + cd "${pkgdir}" + mkdir -p var/lib/coolwsd/systemplate + cp -r "${srcdir}"/instdir "${pkgdir}"/usr/share/coolwsd/libreoffice + mkdir -p usr/lib/systemd/system + cp "${srcdir}"/online/coolwsd.service usr/lib/systemd/system +} + diff --git a/collabora-online-server-git.install b/collabora-online-server-git.install new file mode 100644 index 000000000000..778c702858d5 --- /dev/null +++ b/collabora-online-server-git.install @@ -0,0 +1,18 @@ +post_install() { + getent passwd cool >/dev/null || useradd -M -d /var/lib/coolwsd -s /usr/bin/nologin cool + chown -R cool:cool /var/lib/coolwsd + chown -R cool:cool /usr/share/coolwsd + chown -R cool:cool /etc/coolwsd + setcap cap_fowner,cap_chown,cap_mknod,cap_sys_chroot=ep /usr/bin/coolforkit + setcap cap_sys_admin=ep /usr/bin/coolmount + sudo -u cool coolwsd-systemplate-setup /var/lib/coolwsd/systemplate /usr/share/coolwsd/instdir 1>/dev/null + sudo -u cool coolwsd-generate-proof-key /etc/coolwsd 1>/dev/null +} +post_upgrade() { + chown -R cool:cool /var/lib/coolwsd + chown -R cool:cool /usr/share/coolwsd + chown -R cool:cool /etc/coolwsd + setcap cap_fowner,cap_chown,cap_mknod,cap_sys_chroot=ep /usr/bin/coolforkit + setcap cap_sys_admin=ep /usr/bin/coolmount + sudo -u cool coolwsd-systemplate-setup /var/lib/coolwsd/systemplate /usr/share/coolwsd/instdir 1>/dev/null +} diff --git a/coolwsd.patch b/coolwsd.patch new file mode 100644 index 000000000000..cab21a9da165 --- /dev/null +++ b/coolwsd.patch @@ -0,0 +1,10 @@ +30,31c30,31 +< <sys_template_path desc="Path to a template tree with shared libraries etc to be used as source for chroot jails for child processes." type="path" relative="true" default="systemplate"></sys_template_path> +< <child_root_path desc="Path to the directory under which the chroot jails for the child processes will be created. Should be on the same file system as systemplate and lotemplate. Must be an empty directory." type="path" relative="true" default="jails"></child_root_path> +--- +> <sys_template_path desc="Path to a template tree with shared libraries etc to be used as source for chroot jails for child processes." type="path" relative="true" default="/var/lib/coolwsd/systemplate"></sys_template_path> +> <child_root_path desc="Path to the directory under which the chroot jails for the child processes will be created. Should be on the same file system as systemplate and lotemplate. Must be an empty directory." type="path" relative="true" default="/var/lib/coolwsd/jails"></child_root_path> +35c35 +< <file_server_root_path desc="Path to the directory that should be considered root for the file server. This should be the directory containing cool." type="path" relative="true" default="browser/../"></file_server_root_path> +--- +> <file_server_root_path desc="Path to the directory that should be considered root for the file server. This should be the directory containing cool." type="path" relative="true" default="/usr/share/coolwsd"></file_server_root_path> diff --git a/service.patch b/service.patch new file mode 100644 index 000000000000..aad8e76f500a --- /dev/null +++ b/service.patch @@ -0,0 +1,12 @@ +6,7c6,7 +< EnvironmentFile=-/etc/sysconfig/coolwsd +< ExecStart=/usr/bin/coolwsd --version --o:sys_template_path=/opt/cool/systemplate --o:child_root_path=/opt/cool/child-roots --o:file_server_root_path=/usr/share/coolwsd +--- +> User=cool +> ExecStart=/usr/bin/coolwsd --config-file=/etc/coolwsd/coolwsd.xml +10d9 +< User=cool +16c15 +< ReadWritePaths=/opt/cool /var/log +--- +> ReadWritePaths=/var/log /var/lib/coolwsd /usr/share/coolwsd |