%global base_name daemon %global short_name commons-%{base_name} Name: apache-%{short_name} Version: 1.0.7 Release: 1%{?dist} Summary: Defines API to support an alternative invocation mechanism License: ASL 2.0 Group: Applications/System URL: http://commons.apache.org/%{base_name} Source0: http://archive.apache.org/dist/commons/%{base_name}/source/%{short_name}-%{version}-src.tar.gz Patch0: 0001-execve-path-warning.patch Patch1: 0002-ppc64-configure.patch Patch2: 0003-s390x-configure.patch BuildRequires: java-devel >= 1:1.6.0 BuildRequires: jpackage-utils BuildRequires: maven BuildRequires: apache-commons-parent BuildRequires: maven-surefire-provider-junit BuildRequires: xmlto Requires: java >= 1:1.6.0 Requires: jpackage-utils # This should go away with F-17 Provides: jakarta-%{short_name} = 1:%{version}-%{release} Obsoletes: jakarta-%{short_name} <= 1:1.0.1 %description The scope of this package is to define an API in line with the current Java Platform APIs to support an alternative invocation mechanism which could be used instead of the public static void main(String[]) method. This specification covers the behavior and life cycle of what we define as Java daemons, or, in other words, non interactive Java applications. %package jsvc Summary: Java daemon launcher Group: Applications/System Provides: jsvc = 1:%{version}-%{release} Provides: jakarta-%{short_name}-jsvc = 1:%{version}-%{release} Obsoletes: jakarta-%{short_name}-jsvc <= 1:1.0.1 %description jsvc %{summary}. %package javadoc Summary: API documentation for %{name} Group: Documentation Requires: jpackage-utils BuildArch: noarch Obsoletes: jakarta-%{short_name}-javadoc <= 1:1.0.1 %description javadoc %{summary}. %prep %setup -q -n %{short_name}-%{version}-src %patch0 -p1 -b .execve %patch1 -p1 -b .ppc %patch2 -p1 -b .s390 # remove java binaries from sources rm -rf src/samples/build/ chmod 644 src/samples/* cd src/native/unix xmlto man man/jsvc.1.xml %build # build native jsvc pushd src/native/unix %configure --with-java=%{java_home} # this is here because 1.0.2 archive contains old *.o make clean make %{?_smp_mflags} popd # build jars mvn-rpmbuild install javadoc:javadoc %install # install native jsvc install -Dpm 755 src/native/unix/jsvc $RPM_BUILD_ROOT%{_bindir}/jsvc install -Dpm 644 src/native/unix/jsvc.1 $RPM_BUILD_ROOT%{_mandir}/man1/jsvc.1 # jars install -Dpm 644 target/%{short_name}-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}.jar ln -sf %{name}.jar %{buildroot}%{_javadir}/%{short_name}.jar # pom install -Dpm 644 pom.xml $RPM_BUILD_ROOT%{_mavenpomdir}/JPP-%{name}.pom %add_maven_depmap JPP-%{name}.pom %{name}.jar -a "org.apache.commons:%{short_name}" # javadoc install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name} cp -pr target/site/apidocs/* $RPM_BUILD_ROOT%{_javadocdir}/%{name} %pre javadoc # workaround for rpm bug, can be removed in F-17 [ $1 -gt 1 ] && [ -L %{_javadocdir}/%{name} ] && \ rm -rf $(readlink -f %{_javadocdir}/%{name}) %{_javadocdir}/%{name} || : %files %doc LICENSE.txt PROPOSAL.html NOTICE.txt RELEASE-NOTES.txt src/samples %doc src/docs/* %{_javadir}/%{name}.jar %{_javadir}/%{short_name}.jar %{_mavenpomdir}/JPP-%{name}.pom %{_mavendepmapfragdir}/%{name} %files jsvc %doc LICENSE.txt %{_bindir}/jsvc %{_mandir}/man1/jsvc.1* %files javadoc %doc %{_javadocdir}/%{name} %doc LICENSE.txt %changelog * Mon Aug 15 2011 Stanislav Ochotnicky - 1.0.7-1 - Update to latest upstream (1.0.7) - Fix CVE-2011-2729 * Wed Jul 20 2011 Stanislav Ochotnicky - 1.0.6-1 - Update to latest upstream (1.0.6) - Cleanups according to new guidelines * Mon May 9 2011 Stanislav Ochotnicky - 1.0.5-5 - Use mvn-rpmbuild instead of mvn-local (changes in maven) * Wed May 4 2011 Dan HorĂ¡k - 1.0.5-4 - updated the s390x patch * Mon Feb 07 2011 Fedora Release Engineering - 1.0.5-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild * Tue Feb 1 2011 Stanislav Ochotnicky - 1.0.5-2 - Fix bug 669259 (execve warning segfault) * Tue Jan 18 2011 Stanislav Ochotnicky - 1.0.5-1 - Update to latest version - Use maven 3 to build - Versionless jars & javadocs - Use apache-commons-parent for BR * Tue Oct 26 2010 Chris Spike 1.0.4-2 - Added fix to remove java binaries from sources * Tue Oct 26 2010 Chris Spike 1.0.4-1 - Updated to 1.0.4 * Fri Oct 22 2010 Chris Spike 1.0.3-1 - Updated to 1.0.3 - Cleaned up BRs * Thu Jul 8 2010 Stanislav Ochotnicky - 1.0.2-4 - Add license to javadoc subpackage * Fri Jun 4 2010 Stanislav Ochotnicky - 1.0.2-3 - Make javadoc subpackage noarch * Tue Jun 1 2010 Stanislav Ochotnicky - 1.0.2-2 - Fix add_to_maven_depmap call - Added depmap for old groupId - Unified use of `install` * Wed May 12 2010 Stanislav Ochotnicky - 1.0.2-1 - Rename and rebase to apache-commons-daemon - Get rid of gcj, native conditional compilation - Build with maven - Update patches to cleanly apply on new version, remove unneeded - Clean up whole spec * Fri Jul 24 2009 Fedora Release Engineering - 1:1.0.1-8.8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild * Tue Mar 03 2009 Karsten Hopp 1.0.1-7.8 - ppc needs a similar patch * Tue Mar 03 2009 Karsten Hopp 1.0.1-7.7 - add configure patch for s390x * Wed Feb 25 2009 Fedora Release Engineering - 1:1.0.1-7.6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild * Wed Jul 9 2008 Tom "spot" Callaway - 1:1.0.1-6.6 - drop repotag * Fri Feb 08 2008 Permaine Cheung - 1:1.0.1-6jpp.5 - Add configure patch for ia64 from Doug Chapman * Mon Sep 24 2007 Permaine Cheung - 1:1.0.1-6jpp.4 - Add execve path warning patch from James Ralston