Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:lrupp
limesurvey
limesurvey.spec
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File limesurvey.spec of Package limesurvey
# # spec file for package limesurvey # # Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. # # 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 http://bugs.opensuse.org/ # Name: limesurvey Version: 4.4.0 Release: 0 %define realname LimeSurvey %define realversion %{version}-210129 License: GPL-2.0+ Summary: Free Open Source Software survey tool on the web Url: https://www.limesurvey.org/ Group: Productivity/Networking/Web/Utilities Source0: %{realname}-%{realversion}.tar.gz Source1: %{name}-rpmlintrc Source2: %{name}-apache2.conf Source3: %{name}-php-fpm.conf Source4: %{name}-nginx.conf BuildRequires: apache2-devel BuildRequires: fdupes Requires: php-APCu Requires: php-ctype Requires: php-gd Requires: php-json Requires: php-ldap Requires: php-mbstring Requires: php-mysql Requires: php-openssl Requires: php-pdo Requires: php-pear Requires: php-pecl Requires: php-sodium Requires: php-zip Requires: php-zlib BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildArch: noarch %define apache_user wwwrun %define apache_group www %define nginx_user nginx %define nginx_group nginx %define apache_serverroot %(/usr/sbin/apxs2 -q DATADIR) %define apache_sysconfdir %(/usr/sbin/apxs2 -q SYSCONFDIR) %define wwwpath %{_datadir}/php/%{name} %define confpath %{_sysconfdir}/%{name} %define php_version 7 %description To cut a very long story short: LimeSurvey has a lot of features and contains everything you need for doing nearly every survey with grace. Basically you can use Limesurvey for any type of data collection. %package install Summary: Files needed just during the initial installation of %{name} Group: Productivity/Networking/Web/Utilities Requires: %{name} = %{version} %description install The files in this package are needed only during the initial installation of %{name}. Please remove the package once you setup your %{name} installation to enhance the security of your running %{name}. %package config-apache Summary: Files and dependencies needed to run %name with apache Group: Productivity/Networking/Web/Utilities Requires: %{name} = %{version} Requires(pre): apache2 Requires: mod_php_any >= 5.4 Conflicts: %{name}-config-nginx Supplements: packageand(apache2:%{name}) %description config-apache To cut a very long story short: LimeSurvey has a lot of features and contains everything you need for doing nearly every survey with grace. Basically you can use Limesurvey for any type of data collection. This package contains files and dependencies needed to run LimeSurvey under Apache. %package config-nginx Summary: Files and dependencies needed to run %name with nginx Group: Productivity/Networking/Web/Utilities Requires: %{name} = %{version} Requires(pre): nginx Requires: php-fpm Supplements: packageand(nginx:%{name}) Conflicts: %{name}-config-apache %description config-nginx To cut a very long story short: LimeSurvey has a lot of features and contains everything you need for doing nearly every survey with grace. Basically you can use Limesurvey for any type of data collection. This package contains files and dependencies needed to run LimeSurvey under Nginx. %prep %setup -q -n %{realname}-%{realversion} find . -type f -exec chmod -x {} \; for file in \ .babelrc \ .bowerrc \ .editorconfig \ .eslint.json \ .eslintrc \ .eslintrc.json \ .eslintignore \ .env-cmdrc \ .force_assets \ .gitattributes \ .gitkeep \ .gitignore \ git-gitkeep \ hg-hgkeep \ .htaccess \ .jshintrc \ .jsbeautifyrc \ .scrutinizer.yml \ .stylelintrc \ .travis.yml ; do find . -name $file -delete done %build # %install mkdir -p %{buildroot}%{wwwpath} %{buildroot}%{confpath} %{buildroot}%{_var}/cache/%{name} cp -a * %{buildroot}%{wwwpath} for file in $(ls %{buildroot}%{wwwpath}/application/config/*); do mv $file %{buildroot}%{confpath}/ ln -s %{confpath}/$(basename $file) %{buildroot}%{wwwpath}/application/config/$(basename $file) done %fdupes %{buildroot}%{wwwpath} # apache config mkdir -p %{buildroot}%{apache_sysconfdir}/conf.d sed -e 's|__LIMEDIR__|%{wwwpath}|g' \ -e 's|__LIMECONFDIR__|%{confpath}|g' %{SOURCE2} > %{buildroot}%{apache_sysconfdir}/conf.d/%{name}.conf # nginx config mkdir -p %{buildroot}%{_sysconfdir}/nginx/vhosts.d/ sed -e 's|__LIMEDIR__|%{wwwpath}|g' %{SOURCE4} > %{buildroot}%{_sysconfdir}/nginx/vhosts.d/%{name}.conf # php-fpm config mkdir -p %{buildroot}%{_sysconfdir}/php%{php_version}/fpm/php-fpm.d/ sed -e 's|__LIMEDIR__|%{wwwpath}|g' \ -e 's|__LIMECONFDIR__|%{confpath}|g' %{SOURCE3} > %{buildroot}%{_sysconfdir}/php%{php_version}/fpm/php-fpm.d/%{name}.conf cat >> %{buildroot}%{_sysconfdir}/php%{php_version}/fpm/php-fpm.conf << EOF [global] log_level = warn include=/etc/php7/fpm/php-fpm.d/*.conf EOF %post config-apache # Update ? if [ ${1:-0} -eq 1 ]; then if [ -x %{_sbindir}/a2enflag ]; then # enable LIMESURVEY flag in apache configuration %{_sbindir}/a2enflag LIMESURVEY >/dev/null fi %if %{with systemd} %{_bindir}/systemctl try-restart apache2 %else %restart_on_update apache2 %endif fi %clean rm -rf %{buildroot} %files %defattr(-,root,root) %doc README.md docs/*.txt %dir %{_datadir}/php %dir %{wwwpath} %{wwwpath} %exclude %{wwwpath}/tmp %exclude %{wwwpath}/upload %exclude %{wwwpath}/installer %exclude %{wwwpath}/application/views/layouts/installer.php %config(noreplace) %{confpath} %files install %defattr(-,root,root) %{wwwpath}/installer %{wwwpath}/application/views/layouts/installer.php %files config-apache %defattr(-,root,root) %config(noreplace) %{apache_sysconfdir}/conf.d/%{name}.conf %defattr(-,%apache_user,%apache_group) %dir %{_var}/cache/%{name} %{wwwpath}/tmp %{wwwpath}/upload %files config-nginx %defattr(-,root,root) %config(noreplace) %{_sysconfdir}/php%{php_version}/fpm/php-fpm.d/%{name}.conf %config(noreplace) %{_sysconfdir}/php%{php_version}/fpm/php-fpm.conf %config(noreplace) %{_sysconfdir}/nginx/vhosts.d/%{name}.conf %defattr(-,%nginx_user,%nginx_group) %dir %{_sysconfdir}/php%{php_version} %dir %{_sysconfdir}/php%{php_version}/fpm %dir %{_sysconfdir}/php%{php_version}/fpm/php-fpm.d %dir %{_var}/cache/%{name} %{wwwpath}/tmp %{wwwpath}/upload %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