OBS-URL: https://build.opensuse.org/package/show/Java:packages/tanukiwrapper?expand=0&rev=10
166 lines
4.7 KiB
RPMSpec
166 lines
4.7 KiB
RPMSpec
#
|
|
# spec file for package tanukiwrapper
|
|
#
|
|
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
|
# Copyright (c) 2000-2006, JPackage Project
|
|
# All rights reserved.
|
|
#
|
|
# All modifications and additions to the file contributed by third parties
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
# upon. The license for this file, and modifications and additions to the
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
# license for the pristine package is not an Open Source License, in which
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
# published by the Open Source Initiative.
|
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
#
|
|
|
|
|
|
%define section free
|
|
|
|
Name: tanukiwrapper
|
|
Version: 3.2.3
|
|
Release: 0
|
|
Summary: Java Service Wrapper
|
|
License: MIT
|
|
Group: Development/Libraries/Java
|
|
Url: http://wrapper.tanukisoftware.org/
|
|
#Source0: http://download.sourceforge.net/wrapper/wrapper_3.2.3_src.tar.bz2
|
|
Source0: wrapper_%{version}_src.tar.bz2
|
|
Patch1: %{name}-build.patch
|
|
Patch2: %{name}-crosslink.patch
|
|
Patch3: %{name}-makefile-linux-x86-32.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}-Makefile-aarch64.patch
|
|
BuildRequires: ant >= 1.6.1
|
|
BuildRequires: ant-junit
|
|
BuildRequires: ant-nodeps >= 1.6.1
|
|
BuildRequires: glibc-devel
|
|
BuildRequires: java-devel
|
|
BuildRequires: javapackages-tools
|
|
BuildRequires: perl
|
|
BuildRequires: unzip
|
|
BuildRequires: xerces-j2
|
|
BuildRequires: xml-commons-apis
|
|
Requires: javapackages-tools
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
|
%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 javadoc
|
|
Summary: Javadoc for %{name}
|
|
Group: Development/Documentation
|
|
|
|
%description javadoc
|
|
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: Development/Documentation
|
|
|
|
%description manual
|
|
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
|
|
%patch1
|
|
%patch2
|
|
%patch3
|
|
%patch4
|
|
%patch6 -p1
|
|
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 aarch64
|
|
bits=64
|
|
%else
|
|
bits=32
|
|
%endif
|
|
%ant -Dbuild.sysclasspath=first -Djdk.api=%{_javadocdir}/java -Dbits=$bits \
|
|
main jdoc
|
|
|
|
%install
|
|
%__rm -rf %{buildroot}
|
|
|
|
# jar
|
|
%__mkdir_p %{buildroot}%{_javadir}
|
|
%__install -p -m 0644 lib/wrapper.jar %{buildroot}%{_javadir}/%{name}.jar
|
|
|
|
# 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}
|
|
|
|
# javadoc
|
|
%__install -d -m 755 %{buildroot}%{_javadocdir}/%{name}
|
|
%__cp -a jdoc/* %{buildroot}%{_javadocdir}/%{name}
|
|
|
|
%clean
|
|
%__rm -rf %{buildroot}
|
|
|
|
%files
|
|
%defattr(-,root,root,-)
|
|
%doc doc/license.txt
|
|
%{_sbindir}/%{name}
|
|
%{_libdir}/libwrapper.so
|
|
%{_javadir}/%{name}.jar
|
|
|
|
%files javadoc
|
|
%defattr(0644,root,root,0755)
|
|
%doc doc/license.txt
|
|
%{_javadocdir}/%{name}
|
|
|
|
%files manual
|
|
%defattr(0644,root,root,0755)
|
|
%doc doc/license.txt *.sample
|
|
%doc doc/*
|
|
|
|
%changelog
|