SHA256
1
0
forked from pool/apache2

Accepting request 156289 from home:mlin7442:branches:Apache

Install apache2.service accordingly (/usr/lib/systemd for 12.3 and up or /lib/systemd for older versions)

OBS-URL: https://build.opensuse.org/request/show/156289
OBS-URL: https://build.opensuse.org/package/show/Apache/apache2?expand=0&rev=378
This commit is contained in:
Cristian Rodríguez 2013-02-25 18:49:36 +00:00 committed by Git OBS Bridge
parent 163ede5f9d
commit 86ea9c10f2
2 changed files with 14 additions and 3 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Mon Feb 25 08:19:41 UTC 2013 - mlin@suse.com
- Install apache2.service accordingly (/usr/lib/systemd for 12.3
and up or /lib/systemd for older versions).
-------------------------------------------------------------------
Sat Jan 26 05:06:07 UTC 2013 - crrodriguez@opensuse.org

View File

@ -72,6 +72,11 @@ BuildRequires: expat-devel
%define installbuilddir %{_prefix}/share/%{pname}/build
%define userdir public_html
%define suexec_safepath /usr/local/bin:/usr/bin:/bin
%if %suse_version > 1220
%define _unitdir /usr/lib/systemd
%else
%define _unitdir /lib/systemd
%endif
# "Server:" header
%define VENDOR SUSE
%define platform_string Linux/%VENDOR
@ -625,9 +630,9 @@ mkdir -p $RPM_BUILD_ROOT/etc/init.d
install -m 744 $RPM_SOURCE_DIR/rc.%{pname} $RPM_BUILD_ROOT/etc/init.d/%{pname}
install -m 744 $RPM_SOURCE_DIR/start_apache2 $RPM_BUILD_ROOT/usr/sbin/start_apache2
%if 0%{?suse_version} >= 1210
mkdir -p $RPM_BUILD_ROOT/lib/systemd/system/
mkdir -p $RPM_BUILD_ROOT%{_unitdir}/system/
install -m 744 $RPM_SOURCE_DIR/apache2-systemd-ask-pass $RPM_BUILD_ROOT/usr/sbin/apache2-systemd-ask-pass
install -m 644 $RPM_SOURCE_DIR/apache2.service $RPM_BUILD_ROOT/lib/systemd/system/apache2.service
install -m 644 $RPM_SOURCE_DIR/apache2.service $RPM_BUILD_ROOT%{_unitdir}/system/apache2.service
%endif
ln -sf ../../etc/init.d/%{pname} $RPM_BUILD_ROOT/%{_sbindir}/rc%{pname}
install -m 755 $RPM_SOURCE_DIR/load_configuration $RPM_BUILD_ROOT/%{_prefix}/share/%{pname}/
@ -893,7 +898,7 @@ mv $RPM_BUILD_ROOT/%{sysconfdir}/original .
%endif
%config /etc/init.d/%{pname}
%if 0%{?suse_version} >= 1210
/lib/systemd/system/%{pname}.service
%{_unitdir}/system/%{pname}.service
%endif
#
%{_sbindir}/rc%{pname}