Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:ecsos:server
etherpad-lite
etherpad-lite.spec
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File etherpad-lite.spec of Package etherpad-lite
# # spec file for package etherpad-lite # # Copyright (c) 2024 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via https://bugs.opensuse.org/ # %define install_dir /srv/www/etherpad-lite %define log_dir %{_var}/log/%{name} %define home_dir %{_var}/lib/%{name} %bcond_with systemd Name: etherpad-lite Version: 1.9.7 Release: 0 Summary: An Etherpad based on node.js License: Apache-2.0 Group: Productivity/Networking/Web/Utilities Url: https://github.com/ether/etherpad-lite Source: etherpad-lite-%{version}.tar.gz # # zypper install nodejs npm # cd etherpad-lite-%%{version} # ./src/bin/installDeps.sh # tar -cvJf ../vendor.tar.xz src/node_modules/ # Source1: vendor.tar.xz Source9: %{name}-rpmlintrc Source10: %{name}.service Source11: etherpad-lite.logrotate Source13: etherpad-lite-README.openSUSE Patch0: etherpad-lite_default_config.patch Patch1: etherpad-lite_move_autogenerated_key_files_to_var.patch Patch2: etherpad-lite_avoid_getGitCommit_call.patch # Patch3: etherpad-lite_abiword_missing_AbiCommand.patch Requires: nodejs >= 12.17.0 Requires: curl BuildArch: noarch BuildRoot: %{_tmppath}/%{name}-%{version}-build Requires: logrotate Recommends: abiword BuildRequires: systemd %{?systemd_requires} BuildRequires: nodejs >= 12.17.0 BuildRequires: npm >= 12.17.0 BuildRequires: postgresql-devel BuildRequires: gcc-c++ BuildRequires: python BuildRequires: rsync BuildRequires: sysuser-tools %sysusers_requires %description An Etherpad based on node.js - Our goal is to make collaborative editing the standard on the web. %prep %autosetup -n %{name}-%{version} -a 1 -p 1 install -m644 %{SOURCE13} README.openSUSE echo "fixing shebang lines in quiet mode" set +x SAVEIFS=$IFS IFS=$(echo -en "\n\b") for file in $(find . -type f) ; do sed -i "s|/usr/bin/env node|/usr/bin/node|g" "$file" sed -i "s|/usr/bin/env sh|/usr/bin/sh|g" "$file" sed -i "s|/usr/bin/env bash|/bin/bash|g" "$file" sed -i "s|/usr/bin/env python|/usr/bin/python|g" "$file" done IFS=$SAVEIFS set -x chmod -R a-x doc/api/* find . -type f -name *.md.bak -delete # find arch dependent and unused file test -f src/node_modules/selenium-webdriver/bin/linux/selenium-manager && rm src/node_modules/selenium-webdriver/bin/linux/selenium-manager tee > %{name}.sysuser <<EOF u %{name} - "etherpad-lite daemon user" %{home_dir} - EOF %build find -name .gitignore -print -delete rm -rf bin/deb-src # echo done > src/.ep_initialized #for f in "index" "pad" "timeslider" #do # if [ ! -f "src/static/custom/$f.js" ]; then # cp "src/static/custom/js.template" "src/static/custom/$f.js" || exit 1 # fi # # if [ ! -f "src/static/custom/$f.css" ]; then # cp "src/static/custom/css.template" "src/static/custom/$f.css" || exit 1 # fi #done cat <<EOF > bin/justrunit #!/bin/bash cd %{install_dir} exec /usr/bin/node %{install_dir}/node_modules/ep_etherpad-lite/node/server.js --settings /etc/etherpad-lite/settings.json EOF chmod a+rx bin/justrunit find -name \*.node -delete npm rebuild find -name obj.target -print0 | xargs -r0 rm -rv %sysusers_generate_pre %{name}.sysuser %{name} %install install -d %{buildroot}%{install_dir} \ %{buildroot}%{home_dir} \ %{buildroot}%{log_dir} \ %{buildroot}%{_sbindir} install -d %{buildroot}%{install_dir}/var install -d %{buildroot}%{install_dir}/plugin_packages rsync -a bin src node_modules %{buildroot}%{install_dir} # if [ -L %{buildroot}%{install_dir}/bin ]; then rm %{buildroot}%{install_dir}/bin cp -a %{buildroot}%{install_dir}/src/bin %{buildroot}%{install_dir}/ || exit 1; fi touch %{buildroot}%{home_dir}/{APIKEY.txt,SESSIONKEY.txt} # install settings.json to sysconfdir install -Dm640 settings.json.template %{buildroot}%{_sysconfdir}/%{name}/settings.json chmod -R u=rwX,g=rX,o= %{buildroot}%{_sysconfdir} %{buildroot}%{install_dir} chmod -R u=rwX,go= %{buildroot}%{home_dir} %{buildroot}%{log_dir} install -D -m 0644 %{S:10} %{buildroot}%{_unitdir}/%{name}.service perl -p -i -e "s|__FULL_PATH_TO__|%{install_dir}|g" %{buildroot}%{_unitdir}/%{name}.service ln -s -f %{_sbindir}/service %{buildroot}%{_sbindir}/rc%{name} # fix python-bytecode-inconsistent-mtime pushd %{buildroot}%{install_dir}/src/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/ %py_compile . popd # logrotate snipplet install -Dm644 %{S:11} %{buildroot}%{_sysconfdir}/logrotate.d/%{name} # Ownership of standard log file touch %{buildroot}%{log_dir}/%{name}.log install -Dm644 %{name}.sysuser %{buildroot}%{_sysusersdir}/%{name}.conf %pre -f %{name}.pre # START BIG SYSTEMD %if 0%{?suse_version} %service_add_pre %{name}.service %endif %preun %if 0%{?suse_version} %service_del_preun %{name}.service %else %systemd_preun %{name}.service %endif %post for i in APIKEY.txt SESSIONKEY.txt ; do if [ -e %{install_dir}/$i ] ; then mv %{install_dir}/$i %{home_dir}/$i ||: chown %{name}:%{name} %{home_dir}/$i ||: chmod u=rw,go= %{home_dir}/$i ||: fi done %if 0%{?suse_version} %service_add_post %{name}.service %else %systemd_post %{name}.service %endif %postun %if 0%{?suse_version} %service_del_postun %{name}.service %else %systemd_postun_with_restart %{name}.service %endif %files %defattr(-,root,root) %doc CHANGELOG.md CONTRIBUTING.md LICENSE README.md settings.json.template README.openSUSE %doc doc/ %config(noreplace) /etc/logrotate.d/etherpad-lite %{_sbindir}/rc%{name} %{_unitdir}/%{name}.service %defattr(-,root,%{name}) %config(noreplace) %{_sysconfdir}/%{name}/ %dir %{install_dir} %{install_dir}/bin/ %{install_dir}/src/ %{install_dir}/node_modules/ %{install_dir}/var %{install_dir}/plugin_packages %config(noreplace) %ghost %attr(0600,%{name},%{name}) %{home_dir}/APIKEY.txt %ghost %config(noreplace) %ghost %attr(0600,%{name},%{name}) %{home_dir}/SESSIONKEY.txt %dir %attr(0700,%{name},%{name}) %{log_dir} %ghost %attr(0600,%{name},%{name}) %{log_dir}/%{name}.log %dir %attr(0700,%{name},%{name}) %{home_dir} %{_sysusersdir}/%{name}.conf %changelog
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor