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

%define version		8.0.12
%define vers		8012
%define prefix		/DBA/apache/JTC/%{version}

Name:           	dba-tomcat-%{vers}-core
Summary:        	Apache Tomcat V%{version}
License:        	The Apache Software License
Group:          	Productivity/Networking/Web/Servers
Version:        	%{version}
Release:        	1
Source0:        	http://apache.mirror.iphh.net/tomcat/tomcat-7/v%{version}/bin/apache-tomcat-%{version}.tar.gz
Source1:        	fixserverproperties.sh
Source2:        	http://mirror.softaculous.com/apache/tomcat/tomcat-7/v%{version}/bin/extras/catalina-jmx-remote.jar
Source3:                set_tomcat_8.0.latest.sh
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 dba-openssl-098x dba-openssl-101c dba-openssl-101e

%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:  -post-build-checks
%if 0%{?sles_version} == 11
BuildRequires:  java-1_6_0-ibm-devel
#!BuildIgnore:  java-1_4_2-sun-alsa java-1_4_2-ibm java-1_5_0-ibm-devel java-1_5_0-ibm-alsa
%else
%if 0%{?suse_version} >= 1200
BuildRequires:  java-devel
%else
BuildRequires:  java-1_6_0-openjdk-devel update-alternatives
%endif #suse12
%endif #sles11
%endif #suse11

%else

%if 0%{?fedora_version} >= 19
BuildRequires:  java-1.7.0-openjdk-devel
%else

%if 0%{?fedora_version} || 0%{?centos_version} >= 501 || 0%{?rhel_version} >= 501
BuildRequires:  java-1.6.0-openjdk-devel
%else
BuildRequires:  java-1.4.2-gcj-compat-devel
%endif

%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}

# 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}
for D in bin conf lib logs temp webapps work
do
  # install -m 644 -D $D %{buildroot}%{_sysconfdir}/xinetd.d/apgd
  cp -a $D %{buildroot}%{prefix}
done
chmod 644 %{buildroot}%{prefix}/conf/*
install -m 644 %{S:2} %{buildroot}%{prefix}/lib/
%{__install} -m 0755 %{S:3} %{buildroot}%{prefix}/bin/set_tomcat_8.0.latest.sh

find %{buildroot}%{prefix} -type f -name "safeToDelete.tmp" -exec rm -vf {} \;


%post
cd %{prefix}/..
%{prefix}/bin/set_tomcat_8.0.latest.sh


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


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


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