LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File dba-apache-2227-osssl.spec of Package dba-apache-2227-osssl (Project home:csbuild:DBA)

%define version		2.2.27
%define vers		2227
%define prefix		/DBA/apache/WWW/%{version}

Name:           	dba-apache-%{vers}-osssl
Summary:        	The Apache Web Server Version 2.2.27 with openssl from os
License:        	The Apache Software License
Group:          	Productivity/Networking/Web/Servers
Url:            	http://httpd.apache.org/
Version:        	%{version}
Release:        	1
Source0:        	http://httpd.apache.org/dev/dist/httpd-%{version}.tar.bz2
Source1:        	dba-apache-rpmlintrc
Source2:        	http://www.apache.org/apr/apr-1.5.1.tar.bz2
Source3:        	http://www.apache.org/apr/apr-util-1.5.3.tar.bz2
Source4:        	filter-provides-apr.sh
Source5:        	filter-requires-apr.sh
AutoReqProv:    	on
BuildRoot:      	%{_tmppath}/%{name}-%{version}-build

%define _use_internal_dependency_generator 0
%define __find_provides %{SOURCE4}
%define __find_requires %{SOURCE5}

# "Server:" header
%define VENDOR DBA
%define platform_string	Linux/%VENDOR

BuildRequires:  ed pcre-devel zlib-devel
BuildRequires:  openssl-devel

#!BuildIgnore:  dba-openssl-098o dba-openssl-098r dba-openssl-098x dba-openssl-101c dba-openssl-101e dba-openssl-101f

%if %{?suse_version:1}0
%define httpduser wwwrun
%define httpdgroup www
%else
%define httpduser apache
%define httpdgroup apache
BuildRequires:  expat-devel
%endif

%if %{?suse_version:1}0
PreReq:         permissions
BuildRequires:  db-devel openldap2 openldap2-devel
%else
BuildRequires:  db4-devel openldap openldap-devel
%endif

%if 0%{?suse_version} >= 1200
BuildRequires:  automake
%endif

%if 0%{?suse_version} >= 1100
BuildRequires:          -post-build-checks
%endif


%description
Apache 2, the successor to Apache 1.

Apache is the most used Web server software worldwide.

See /usr/share/doc/packages/apache2/, http://httpd.apache.org/, and
http://httpd.apache.org/docs-2.0/upgrading.html.

Authors:
--------
    Too many to list here -- see /usr/share/doc/packages/apache2/ABOUT_APACHE


%prep
#  
#  O/ ._ .__ ._
#  /O |_)|(/_|_)
#     |      |
#  
%setup -q -n httpd-%{version} -a 2 -a 3

%{__chmod} +x %{SOURCE4}
%{__chmod} +x %{SOURCE5}

# cat $RPM_SOURCE_DIR/SUSE-NOTICE >> NOTICE
#
# replace PLATFORM string that's seen in the "Server:" header
#
sed 's,(" PLATFORM "),(%platform_string),' server/core.c > tmp_file && mv tmp_file server/core.c
sed 's/public_html/%{userdir}/g' docs/conf/extra/httpd-userdir.conf.in > tmp_file && mv tmp_file docs/conf/extra/httpd-userdir.conf.in
#
# use option --with-included-apr
#
rm -rf srclib/apr*
mv apr-util* srclib/apr-util
mv apr-* srclib/apr
#
# now configure Apache 
#
%if 0%{?suse_version} > 910
aclocal
autoreconf --force --install
%else
rm -rf aclocal.m4 autom4te*.cache
autoheader
autoconf
%endif


%build
#
#  O/ |_    o| _|
#  /O |_)|_|||(_|
#
CFLAGS="$RPM_OPT_FLAGS -fPIC -Wall -fno-strict-aliasing -DLDAP_DEPRECATED" \
CPPFLAGS="-DSSL_EXPERIMENTAL_ENGINE -DMAX_SERVER_LIMIT=200000 -DLDAP_DEPRECATED -DMAXLINE=4096 -DHAVE_EXPAT_CONFIG_H" \
LDFLAGS=-ldl
export CFLAGS LDFLAGS CPPFLAGS

./configure \
		--prefix=%{prefix} \
		--with-mpm=prefork \
%if "$mpm" == "worker" || "$mpm" == "event"
%ifarch %ix86
%ifnarch i386
		--enable-nonportable-atomics=yes \
%endif
%endif
%endif
		\
		--enable-exception-hook \
		\
%if %{?suse_version:%suse_version}%{?!suse_version:9999} > 930
		--with-pcre \
		--enable-pie \
%endif
		--enable-mods-shared=all \
		--with-included-apr \
		--enable-ssl=shared \
		--enable-tlsext \
		\
		--disable-isapi \
		--enable-deflate \
		--enable-echo \
		--enable-filter \
		--enable-ext-filter \
		--enable-charset-lite \
		--enable-file-cache \
		--enable-logio \
		--enable-dumpio \
		--enable-bucketeer \
		--enable-case_filter \
		--enable-case_filter_in \
		\
		--with-ldap \
		--enable-ldap \
		--enable-authnz_ldap \
		\
		--enable-proxy \
		--enable-proxy-connect \
		--enable-proxy-ftp \
		--enable-proxy-http \
		--enable-cache \
		--enable-disk-cache \
		--enable-mem-cache \
		--enable-version \
		\
		--enable-dav-lock \
		--enable-authn-alias \
		--enable-optional-hook-export \
		--enable-optional-hook-import \
		--enable-optional-fn-import \
		--enable-optional-fn-export \
		\
		--enable-suexec \
		--with-suexec-bin=%{_sbindir}/suexec%{vers} \
		--with-suexec-caller=%httpduser \
		--with-suexec-docroot=%{datadir} \
		--with-suexec-logfile=%{logfiledir}/suexec.log \
		--with-suexec-userdir=%{userdir} \
		--with-suexec-uidmin=96 \
		--with-suexec-gidmin=96 \
		--with-suexec-safepath=%{suexec_safepath}


make CFLAGS="$RPM_OPT_FLAGS -fPIC \
		-fno-strict-aliasing \
		-Wall " \
		%{?jobs:-j%jobs} 
 
 
%install
#
#  O/ o._  __|_ _.||
#  /O || |_> |_(_|||
#  
#
# (most installation (to build root) has already been done in %%build)
#
# prevent rpath problem on suse
export NO_BRP_CHECK_RPATH=true

make DESTDIR=$RPM_BUILD_ROOT install

find %{buildroot}%{prefix} -name "*.a" -o -name "*.la" |xargs -i rm -f {}


%post
cd %{prefix}/..
%{__rm} -f 2.2.latest
%{__ln_s} -f %{version} 2.2.latest


%files
#       _
#  O/ _|_o| _  _
#  /O  | ||(/__>
#  
%defattr(-,root,root)
%dir %{prefix} 
%{prefix}/bin
%{prefix}/build
%{prefix}/conf
%{prefix}/cgi-bin
%{prefix}/error
%{prefix}/htdocs
%{prefix}/icons
%{prefix}/include
%{prefix}/lib
%{prefix}/man
%{prefix}/manual
%{prefix}/modules


%clean
[ "%{buildroot}" != "/" ] && rm -rf %{buildroot}


%changelog
* Mon Apr 28 2014 Holger Manthey <holger.manthey@bertelsmann.de>
- inital version