Projects
Kolab:3.4:Updates
kolab-freebusy
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 4
View file
kolab-freebusy.spec
Changed
@@ -1,3 +1,19 @@ +%{!?php_inidir: %global php_inidir %{_sysconfdir}/php.d} + +%if 0%{?suse_version} < 1 && 0%{?fedora} < 1 && 0%{?rhel} < 7 +%global with_systemd 0 +%else +%global with_systemd 1 +%endif + +%if 0%{?suse_version} +%global httpd_name apache2 +%else +%global httpd_name httpd +%endif + +%global _ap_sysconfdir %{_sysconfdir}/%{httpd_name} + Name: kolab-freebusy Version: 1.0.2 Release: 2%{?dist} @@ -12,6 +28,7 @@ BuildArch: noarch +Requires: %{httpd_name} Requires: php Requires: php-ldap @@ -28,12 +45,12 @@ %install mkdir -p \ - %{buildroot}/%{_sysconfdir}/httpd/conf.d/ \ + %{buildroot}/%{_ap_sysconfdir}/conf.d/ \ %{buildroot}/%{_sysconfdir}/%{name}/ \ %{buildroot}/%{_datadir}/%{name}/ \ %{buildroot}/%{_localstatedir}/log/%{name}/ -cat > %{buildroot}/%{_sysconfdir}/httpd/conf.d/%{name}.conf <<EOF +cat > %{buildroot}/%{_ap_sysconfdir}/conf.d/%{name}.conf <<EOF ScriptAlias /freebusy /usr/share/kolab-freebusy/public_html/index.php EOF @@ -48,9 +65,24 @@ ln -s ../../..%{_localstatedir}/log/%{name} log popd +%post +if [ -f "%{php_inidir}/apc.ini" ]; then + if [ ! -z "`grep ^apc.enabled=1 %{php_inidir}/apc.ini`" ]; then +%if 0%{?with_systemd} + /sbin/systemctl condrestart %{httpd_name}.service +%else + /sbin/service %{httpd_name} condrestart +%endif + fi +fi + %files %doc README.md -%config(noreplace) %{_sysconfdir}/httpd/conf.d/%{name}.conf +%if 0%{?suse_version} +%dir %{_ap_sysconfdir} +%dir %{_ap_sysconfdir}/conf.d +%endif +%config(noreplace) %{_ap_sysconfdir}/conf.d/%{name}.conf %attr(0750,root,apache) %dir %{_sysconfdir}/%{name}/ %attr(0640,root,apache) %config(noreplace) %{_sysconfdir}/%{name}/config.ini %{_datadir}/%{name}/
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.