File httpd24.spec of Package httpd24

#
# spec file for package httpd24
#
# Copyright (c) 2017 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/
#

%if 0%{?suse_version} < 1130
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%endif

Name:           httpd24
Version:        2.4.63
Release:        0
Summary:        The Apache HTTP daemon
License:        Apache-2.0
Group:          Productivity/Networking/Web/Servers
Url:            http://httpd.apache.org/
Source0:        httpd-%{version}.tar.bz2
Source1:        httpd.init
Source997:      httpd-%{version}.tar.bz2.asc
Source998:      %{name}.keyring
Source999:      %{name}-rpmlintrc
%if 0%{?suse_version} < 1550
BuildRequires:  libapr-util1
BuildRequires:  libapr-util1-devel
BuildRequires:  libapr1
BuildRequires:  libapr1-devel >= 1.4.0
%else
BuildRequires:  libapr-util1-0
BuildRequires:  apr-util-devel
BuildRequires:  libapr1-0
BuildRequires:  apr-devel >= 1.4.0
%endif
BuildRequires:  openssl-devel
BuildRequires:  pcre-devel
BuildRequires:  zlib-devel
Requires(pre):  %insserv_prereq

Patch1:         adjust-layout-to-follow-FHS.patch
Patch2:         adjust-default-config.patch

%description
The Apache HTTP Server Project is an effort to develop and maintain an
open-source HTTP server for modern operating systems including UNIX and
Windows NT. The goal of this project is to provide a secure, efficient
and extensible server that provides HTTP services in sync with the
current HTTP standards.

Apache has been the most popular web server on the Internet since
April 1996.

The Apache HTTP Server is a project of the Apache Software Foundation.


%prep
%setup -q -n httpd-%{version}
%patch -P 1 -p1
%patch -P 2 -p1


%build
%configure --enable-layout=FHS --with-mpm=prefork --enable-pie \
  --sysconfdir=%{_sysconfdir}/httpd --includedir=%{_includedir}/httpd \
  --libexecdir=%{_libdir}/httpd/modules \
  --enable-mods-shared='ssl info expires headers deflate'
make %{?_smp_mflags} V=0


%install
make DESTDIR=%{buildroot} install %{?_smp_mflags}
rm -f %{buildroot}/%{_sbindir}/checkgid
rm -f %{buildroot}/%{_libdir}/httpd/cgi-bin/*.orig-*
rm -f %{buildroot}/%{_libdir}/httpd/modules/*.exp
install -d -m 755 %{buildroot}%{_sysconfdir}/init.d
install -m 755 %{SOURCE1} %{buildroot}%{_initddir}/httpd
ln -s %{_initddir}/httpd %{buildroot}/%{_sbindir}/rchttpd


%files
%defattr(-,root,root)
%{_bindir}/*
%{_sbindir}/*
%exclude %{_bindir}/apxs
%{_mandir}/man1/*
%{_mandir}/man8/*
%exclude %{_mandir}/man1/apxs.1.gz
%{_datadir}/httpd
%exclude %{_datadir}/httpd/manual
%exclude %{_datadir}/httpd/build
%{_libdir}/httpd/modules
%dir %{_libdir}/httpd
%dir %{_libdir}/httpd/cgi-bin
%config(noreplace) %{_sysconfdir}/httpd
%exclude %{_sysconfdir}/httpd/extra/httpd-manual.conf
%exclude %{_sysconfdir}/httpd/original/extra/httpd-manual.conf
%{_localstatedir}/log/httpd
%dir /srv/http
%{_initddir}/httpd


%preun
%stop_on_removal %{_initddir}/httpd


%postun
%restart_on_update %{_initddir}/httpd
%insserv_cleanup


# ---------------------------------------------------------------------------

%package manual
Summary:        HTML manual for the Apache HTTP daemon
Group:          Productivity/Networking/Web/Servers
Requires:       %{name} = %{version}
%if 0%{?suse_version} > 1110
BuildArch:      noarch
%endif

%description manual
Complete manual for the Apache HTTP daemon in HTML format.


%files manual
%defattr(-,root,root)
%{_datadir}/httpd/manual
%config(noreplace) %{_sysconfdir}/httpd/extra/httpd-manual.conf
%config(noreplace) %{_sysconfdir}/httpd/original/extra/httpd-manual.conf


# ---------------------------------------------------------------------------

%package demo
Summary:        Minimal set of pages for the Apache HTTP daemon
Group:          Productivity/Networking/Web/Servers
Requires:       %{name} = %{version}

%description demo
A minimal set of web pages for the Apache HTTP daemon.


%files demo
%defattr(-,root,root)
/srv/http
%attr(0755,root,root) %{_libdir}/httpd/cgi-bin/*


# ---------------------------------------------------------------------------

%package devel
Summary:        Development tools for the Apache HTTP daemon
Group:          Development/Libraries/C and C++
Requires:       %{name} = %{version}
%if 0%{?suse_version} > 1110
BuildArch:      noarch
%endif

%description devel
Tools for modules development for the Apache HTTP daemon.


%files devel
%defattr(-,root,root)
%{_includedir}/httpd
%{_bindir}/apxs
%{_mandir}/man1/apxs.1.gz
%{_datadir}/httpd/build

openSUSE Build Service is sponsored by