File dba-tomcat-5536-core.spec of Package dba-tomcat-5536-core

%define version		5.5.36
%define prefix		/DBA/apache/JTC/%{version}

Name:           	dba-tomcat-5536-core
Summary:        	Apache Tomcat V5.5.36
License:        	The Apache Software License
Group:          	Productivity/Networking/Web/Servers
Version:        	%{version}
Release:        	1
Source0:        	http://apache.mirror.iphh.net//tomcat/tomcat-5/v%{version}/bin/apache-tomcat-%{version}.tar.gz
Source1:        	fixserverproperties.sh
Source2:        	http://apache.mirror.iphh.net//tomcat/tomcat-5/v%{version}/bin/apache-tomcat-%{version}-admin.tar.gz
Url:            	http://tomcat.apache.org/
AutoReqProv:    	on
BuildArch:              noarch
BuildRoot:      	%{_tmppath}/%{name}-%{version}-build

# needed for brp-check-bytecode-version (jar, fastjar would do as well)  
BuildRequires:          unzip
%if 0%{?suse_version} >= 1100
BuildRequires:          -post-build-checks
%endif

#!BuildIgnore:  dba-openssl-098o dba-openssl-098r

%if 0%{?suse_version}

%if 0%{?sles_version} == 10
%ifarch i586
BuildRequires:  java-1_5_0-ibm-alsa
%endif
BuildRequires:  java-1_5_0-ibm-devel update-alternatives
%endif

%if 0%{?sles_version} == 9
BuildRequires:   java2
%else
%if 0%{?suse_version} <= 1030
BuildRequires:  java-devel
%endif
%endif

%if 0%{?suse_version} >= 1110
BuildRequires:  java-1_6_0-openjdk-devel update-alternatives
BuildRequires:  -post-build-checks
%endif

%else

%if 0%{?fedora_version} || 0%{?centos_version} || 0%{?rhel_version}
BuildRequires:  java-1.6.0-openjdk-devel
%endif

%endif


%description
Apache Tomcat is an open source software implementation of the Java Servlet and JavaServer Pages technologies. The Java Servlet and JavaServer Pages specifications are developed under the Java Community Process.

Apache Tomcat is developed in an open and participatory environment and released under the Apache License version 2. Apache Tomcat is intended to be a collaboration of the best-of-breed developers from around the world. We invite you to participate in this open development project. To learn more about getting involved, click here.

Apache Tomcat powers numerous large-scale, mission-critical web applications across a diverse range of industries and organizations. Some of these users and their stories are listed on the PoweredBy wiki page.

Apache Tomcat, Tomcat, Apache, the Apache feather, and the Apache Tomcat project logo are trademarks of the Apache Software Foundation.


%prep
#  
#  O/ ._ .__ ._
#  /O |_)|(/_|_)
#     |      |
#  
%setup -q -n apache-tomcat-%{version}
%{__tar} xpzf %{S:2} -C ../
# gzip -dc %{S:2} | tar -xf -

# security fixups
sh %{S:1}


%build
#
#  O/ |_    o| _|
#  /O |_)|_|||(_|
#
echo "no build process needed" 
 
%install
#
#  O/ o._  __|_ _.||
#  /O || |_> |_(_|||
#  
#
#

# suppress bytecode version error
%if 0%{?suse_version} >= 1100
export NO_BRP_CHECK_BYTECODE_VERSION=true
%endif

%{__mkdir_p} %{buildroot}%{prefix}
chmod 755 conf/Catalina conf/Catalina/localhost
for D in bin common conf lib logs temp server webapps work
do
  # install -m 644 -D $D %{buildroot}%{_sysconfdir}/xinetd.d/apgd
  cp -a $D %{buildroot}%{prefix}
done
chmod 644 %{buildroot}%{prefix}/conf/*.xml %{buildroot}%{prefix}/conf/*.properties %{buildroot}%{prefix}/conf/*.policy


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


%files
#       _
#  O/ _|_o| _  _
#  /O  | ||(/__>
#  
%defattr(-,root,root)
%doc LICENSE NOTICE RELEASE-NOTES RUNNING.txt
%dir %{prefix} 
%{prefix}/bin
%{prefix}/common
%{prefix}/conf
%{prefix}/lib
%{prefix}/logs
%{prefix}/temp
%{prefix}/server
%{prefix}/webapps
%{prefix}/work


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


%changelog
* Mon Oct 22 2012 Holger Manthey <holger.manthey@bertelsmann.de>
- inital version