# 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. # Name: tanukiwrapper Version: 3.5.9 Release: 1%{?dist} Summary: Java Service Wrapper License: GPLv2 URL: http://wrapper.tanukisoftware.org/ Source0: http://download.sourceforge.net/wrapper/wrapper_3.5.9_src.tar.gz 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 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Requires: java >= 1.6.0 %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 %prep %setup -q -n wrapper_%{version}_src find . -name "*.jar" -exec %__rm -f {} \; %__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 > doc/wrapper.conf.sample %__perl -p -e \ 's|"\./wrapper"|"%{_sbindir}/%{name}"| ; s|"\.\./conf/wrapper\.conf"|"/path/to/wrapper.conf"|' \ src/bin/sh.script.in > doc/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} # commands %__install -d -m 755 %{buildroot}%{_sbindir} %__install -p -m 755 bin/wrapper %{buildroot}%{_sbindir}/%{name} %clean %__rm -rf %{buildroot} %files %defattr(-,root,root,-) %doc doc/* %{_sbindir}/%{name} %{_libdir}/libwrapper.so %{_javadir}/%{name}*.jar %changelog * Sat Oct 12 2013 Sam Kottler - Initial build of tanukiwrapper