# Copyright (c) 2000-2005, 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 name xml-security %define version 1.4.1 %define release 1%{?dist} Name: xml-security Version: 1.4.1 Release: 1%{?dist} Epoch: 0 Summary: Implementation of W3C security standards for XML License: ASL 2.0 Url: http://xml.apache.org/security Group: Text Processing/Markup/XML Source0: http://xml.apache.org/security/dist/java-library/xml-security-src-1_4_1.zip Patch0: %{name}-%{version}-build_xml.patch Patch1: %{name}-%{version}-nosun.patch Patch2: %{name}-%{version}-disable-highstrength-tests.patch #According to the mailing list, zip file is missing the #src_unitTests/org/apache/xml/security/c14n directory, comment out test for now: #http://article.gmane.org/gmane.text.xml.security.devel/5777 Patch3: %{name}-%{version}-c14ntest.patch Patch4: %{name}-%{version}-signature-algorithm-test.patch BuildRequires: ant BuildRequires: ant-junit BuildRequires: ant-trax BuildRequires: java-devel >= 0:1.4 #BuildRequires: bouncycastle BuildRequires: jakarta-commons-logging BuildRequires: log4j BuildRequires: xalan-j2 >= 0:2.7 BuildRequires: xml-commons-apis >= 0:1.3 BuildRequires: xerces-j2 >= 0:2.7 #Requires: bouncycastle Requires: jakarta-commons-logging Requires: log4j Requires: xalan-j2 >= 0:2.7 Requires: xml-commons-apis >= 0:1.3 Requires: xerces-j2 >= 0:2.7 BuildArch: noarch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) %description The XML Security project is aimed at providing implementation of security standards for XML. Currently the focus is on the W3C standards : - XML-Signature Syntax and Processing; and - XML Encryption Syntax and Processing. Once these are implemented, XML Key Management is likely to be the next focus for the project. Two libraries are currently available. A Java library, which includes a mature Digital Signature implementation. Encryption is currently under development. A C++ library is also now available. Functionality is currently more basic than that provided by the Java library. %package javadoc Summary: Javadoc for %{name} Group: Development/Documentation %description javadoc Javadoc for %{name}. %package demo Summary: Samples for %{name} Group: Development/Documentation %description demo Samples for %{name}. %prep %setup -q -n %{name}-1_4_1 # remove all binary libs for f in $(find . -name "*.jar"); do rm $f done %patch0 -b .sav %patch1 -b .sav %patch2 -b .sav %patch3 -b .sav %patch4 -b .sav %build mkdir -p libs/endorsed build-jar-repository -p -s libs \ commons-logging \ commons-logging-api \ log4j \ xalan-j2 \ xalan-j2-serializer \ xml-commons-apis \ xerces-j2 \ junit ant -Djava.endorsed.dirs=libs \ -Dlib.jce=`build-classpath . gcj-endorsed/gnu-crypto-jce-jdk1.4` \ build.src build.jar build.docs #FIXME: unit tests failing, to be investigated #build.src build.jar build.docs test %install rm -rf $RPM_BUILD_ROOT install -d -m 755 $RPM_BUILD_ROOT%{_javadir} install -m 644 build/xmlsec-%{version}.jar \ $RPM_BUILD_ROOT%{_javadir} ln -s xmlsec-%{version}.jar \ $RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}.jar # create unversioned symlinks (cd $RPM_BUILD_ROOT%{_javadir} for jar in *-%{version}*; do ln -sf ${jar} ${jar/-%{version}/}; done ) install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version} cp -pr build/docs/html/javadoc/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version} ln -s %{name}-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{name} install -d -m 755 $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} cp -p LICENSE $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} install -d -m 755 $RPM_BUILD_ROOT%{_datadir}/%{name}-%{version} cp -pr src_samples/* $RPM_BUILD_ROOT%{_datadir}/%{name}-%{version} %clean rm -rf $RPM_BUILD_ROOT %files %defattr(0644,root,root,0755) %doc %{_docdir}/%{name}-%{version} %{_javadir}/*.jar %files javadoc %defattr(0644,root,root,0755) %{_javadocdir}/%{name}-%{version} %doc %{_javadocdir}/%{name} %files demo %defattr(0644,root,root,0755) %{_datadir}/%{name}-%{version} %changelog * Thu Nov 13 2008 Permaine Cheung 0:1.4.1-1 - Upgrade to 1.4.1 * Thu Aug 02 2007 Fernando nasser 0:1.3.0-1jpp.ep1.3.2 - Rebuild * Fri Jul 27 2007 Fernando nasser 0:1.3.0-1jpp.ep1.3.1 - Rebuild with JDK 1.4 * Fri Jul 06 2007 Deepak Bhole 0:1.3.0-1jpp.ep1.3 - Disable tests requiring high strength encryption * Tue Mar 13 2007 Vivek Lakshmanan 0:1.3.0-1jpp.ep1.2 - Fix repolib location * Tue Mar 13 2007 Fernando nasser 0:1.3.0-1jpp.ep1.1 - Remove duplicate macros * Tue Feb 20 2007 Vivek Lakshmanan 0:1.3.0-1jpp.el4ep1.2 - Install jar with name as used upstream - Add -brew suffix * Sun Feb 18 2007 Vivek Lakshmanan 0:1.3.0-1jpp.el4ep1.1 - Add repolib support - Add missing BR on ant-junit * Tue Aug 01 2006 Fernando nasser 0:1.3.0-1jpp_1rh - Merge with upstream * Tue Jan 17 2006 Deepak Bhole 0:1.3.0-1jpp - Upgrade to version 1.3.0. - Removed com.sun dependencies. - Removed bouncycastle dependency. * Thu Oct 20 2005 Fernando nasser 0:1.2.1-1jpp_1rh - First Red Hat build - Remove bouncycastle - Lower Xalan-j2 requires to 2.6.0 * Mon Oct 10 2005 Ralph Apel 0:1.2.97-1jpp - Upgrade to build/run with JAXP-1.3 * Mon Apr 04 2005 Ralph Apel 0:1.2.1-1jpp - First JPackage release