# Copyright (c) 2000-2006, JPackage Project # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the # distribution. # 3. Neither the name of the JPackage Project nor the names of its # contributors may be used to endorse or promote products derived # from this software without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # %define gcj_support %{?_with_gcj_support:1}%{!?_with_gcj_support:%{?_without_gcj_support:0}%{!?_without_gcj_support:%{?_gcj_support:%{_gcj_support}}%{!?_gcj_support:0}}} %define section free Name: tanukiwrapper Version: 3.5.6 Release: 1%{?dist} Summary: Java Service Wrapper Epoch: 0 License: GPLv2 URL: http://wrapper.tanukisoftware.org/ Source0: http://download.sourceforge.net/wrapper/wrapper_3.5.6_src.tar.gz Patch1: %{name}-build.patch Patch2: %{name}-crosslink.patch #Add Makefiles so package builds for all FC architectures. Patch4: %{name}-Makefile-s390-s390x-ppc.patch # The following patch is only needed for GCJ. Patch5: %{name}-nosun-jvm-64.patch Patch6: %{name}-compilewithfpic.patch Group: Development/Tools BuildRequires: jpackage-utils >= 0:1.6 BuildRequires: glibc-devel BuildRequires: ant >= 0:1.6.1 BuildRequires: ant-nodeps >= 0:1.6.1 BuildRequires: ant-junit BuildRequires: xerces-j2 BuildRequires: xml-commons-apis BuildRequires: %{__perl} BuildRequires: java-javadoc Requires: jpackage-utils >= 0:1.6 Obsoletes: %{name}-demo < 0:3.1.2-2jpp Provides: %{name}-demo = 0:3.1.2-2jpp BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) %if %{gcj_support} BuildRequires: java-gcj-compat-devel Requires(post): java-gcj-compat Requires(postun): java-gcj-compat %endif %description The Java Service Wrapper is an application which has evolved out of a desire to solve a number of problems common to many Java applications: - Run as a Windows Service or Unix Daemon - Application Reliability - Standard, Out of the Box Scripting - On Demand Restarts - Flexible Configuration - Ease Application installations - Logging %package manual Summary: Documents for %{name} Group: Documentation %description manual %{summary}. %prep %setup -q -n wrapper_%{version}_src %patch1 %patch2 %patch4 # The following patch is only needed for GCJ. %if %{gcj_support} %patch5 %endif %patch6 find . -name "*.jar" -exec %__rm -f {} \; %__perl -p -i -e 's/\r//' doc/AUTHORS %__perl -p -i -e 's|-O3|%optflags|' src/c/Makefile* %__perl -p -e \ 's|=\.\./lib/wrapper\.jar$|=%{_javadir}/%{name}.jar| ; s|=\.\./lib$|=%{_libdir}|' \ src/conf/wrapper.conf.in > wrapper.conf.sample %__perl -p -e \ 's|"\./wrapper"|"%{_sbindir}/%{name}"| ; s|"\.\./conf/wrapper\.conf"|"/path/to/wrapper.conf"|' \ src/bin/sh.script.in > script.sh.sample %build export CLASSPATH=$(build-classpath ant junit xerces-j2 xml-commons-apis) %ifarch x86_64 ia64 ppc64 sparc64 s390x bits=64 %else bits=32 %endif %ant -Dbuild.sysclasspath=first -Djdk.api=%{_javadocdir}/java -Dbits=$bits \ main %install %__rm -rf %{buildroot} # jar %__mkdir_p %{buildroot}%{_javadir} %__install -p -m 0644 lib/wrapper.jar %{buildroot}%{_javadir}/%{name}-%{version}.jar (cd %{buildroot}%{_javadir} && for jar in *-%{version}*; do %{__ln_s}f ${jar} `echo $jar| sed "s|-%{version}||g"`; done) # jni %__install -d -m 755 %{buildroot}%{_libdir} %__install -p -m 755 lib/libwrapper.so %{buildroot}%{_libdir}/libwrapper.so.%{version} ln -s libwrapper.so.%{version} %{buildroot}%{_libdir}/libwrapper.so.3 ln -s libwrapper.so.%{version} %{buildroot}%{_libdir}/libwrapper.so # commands %__install -d -m 755 %{buildroot}%{_sbindir} %__install -p -m 755 bin/wrapper %{buildroot}%{_sbindir}/%{name} %if %{gcj_support} %{_bindir}/aot-compile-rpm %endif %clean %__rm -rf %{buildroot} %post /sbin/ldconfig %if %{gcj_support} if [ -x %{_bindir}/rebuild-gcj-db ] then %{_bindir}/rebuild-gcj-db fi %endif %postun /sbin/ldconfig %if %{gcj_support} if [ -x %{_bindir}/rebuild-gcj-db ] then %{_bindir}/rebuild-gcj-db fi %endif %files %defattr(-,root,root,-) %doc doc/* %{_sbindir}/%{name} %{_libdir}/libwrapper.so* %{_javadir}/%{name}*.jar %if %{gcj_support} %attr(-,root,root) %{_libdir}/gcj/%{name}/tanukiwrapper-%{version}.jar.* %endif %files manual %defattr(0644,root,root,0755) %doc doc/* %changelog * Fri Nov 11 2010 Miroslav Suchý 0:3.5.6-1 - rebase to 3.5.6 version * Fri Jul 31 2009 Deepak Bhole - 0:3.2.3-4.4 - Fix bug #480189 Compile files with -fPIC * Sun Jul 26 2009 Fedora Release Engineering - 0:3.2.3-4.3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild * Wed Feb 25 2009 Fedora Release Engineering - 0:3.2.3-3.3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild * Wed Sep 24 2008 Deepak Bhole 3.2.3-2.3 - Update nosun-jvm-64.patch to remove fuzz * Thu Jul 10 2008 Tom "spot" Callaway - 0:3.2.3-2.2 - drop repotag * Tue Feb 19 2008 Fedora Release Engineering - 0:3.2.3-2jpp.1 - Autorebuild for GCC 4.3 * Sat Aug 11 2007 Vivek Lakshmanan - 0:3.2.3-1jpp.1 - Update to latest from JPackage - Fedora-ize the spec file * Tue Oct 17 2006 Ville Skyttä - 0:3.2.3-1jpp - 3.2.3. - Drop unneeded xml-commons-apis and xerces-j2 dependencies. - Fix gcj lib name. * Fri Oct 13 2006 Ville Skyttä - 0:3.2.2-1jpp - 3.2.2. * Fri Aug 04 2006 Vivek Lakshmanan - 0:3.2.1-2jpp - Add conditional AOT compilation with GCJ. - Add Requires(X) where appropriate. - Add patch to add -lm in x86-32 Makefile. - Conditionally apply patch to avoid use of obscure property not supported on GCJ. - Add missing makefiles for architectures pertinent to FC. * Tue Jul 11 2006 Ville Skyttä - 0:3.2.1-1jpp - 3.2.1. * Mon May 29 2006 Ralph Apel - 0:3.2.0-2jpp - Bring to JPP-1.7 * Tue May 9 2006 Ville Skyttä - 0:3.2.0-1jpp - 3.2.0. * Fri Apr 28 2006 Fernando Nasser - 0:3.1.2-5jpp - First JPP 1.7 build * Mon Jul 18 2005 Ville Skyttä - 0:3.1.2-4jpp - BuildRequires ant-junit and java-javadoc. - Fix description. * Mon Jul 4 2005 Ville Skyttä - 0:3.1.2-3jpp - Fix bogus versioned jpackage-utils build dependency. * Tue Jun 28 2005 Ville Skyttä - 0:3.1.2-2jpp - Fix install locations and build dependencies. - Drop -demo subpackage and test jars, include samples in main package's docs. - Fix build with newer Java/Ant and ant-nodeps not built with Sun's JDK. - Crosslink with local JDK javadocs. * Wed Apr 14 2005 David Walluck 0:3.1.2-1jpp - 3.1.2 - fix ant dependencies - change %%section to free - macros * Tue Mar 29 2005 David Walluck 0:3.1.1-5jpp - remove BuildArch * Sat Nov 27 2004 Ville Skyttä - 0:3.1.1-4jpp - Fix libwrapper.so permissions. * Sat Nov 27 2004 Ville Skyttä - 0:3.1.1-3jpp - Fix build when no $JAVA_HOME is set. - Honor $RPM_OPT_FLAGS. * Fri Sep 03 2004 Fernando Nasser 0:3.1.1-2jpp - Rebuilt with Ant 1.6.2 * Fri Jul 30 2004 Ralph Apel 0:3.1.1-1jpp - First JPackage release