From 385e7b8b1f0d18ada5718c07cb82d1fd048affea Mon Sep 17 00:00:00 2001 From: Mattias Ellert Date: Mon, 23 Apr 2012 19:31:39 +0200 Subject: [PATCH] The Java API is now a separate source tree from the rest of voms --- .gitignore | 1 + build.xml | 23 ++++ maven-build.properties | 22 ++++ maven-build.xml | 268 +++++++++++++++++++++++++++++++++++++++++ sources | 1 + voms-api-java.spec | 148 +++++++++++++++++++++++ 6 files changed, 463 insertions(+) create mode 100644 build.xml create mode 100644 maven-build.properties create mode 100644 maven-build.xml create mode 100644 voms-api-java.spec diff --git a/.gitignore b/.gitignore index e69de29..f6a3a77 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/*.tar.gz diff --git a/build.xml b/build.xml new file mode 100644 index 0000000..5361c8f --- /dev/null +++ b/build.xml @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/maven-build.properties b/maven-build.properties new file mode 100644 index 0000000..744662c --- /dev/null +++ b/maven-build.properties @@ -0,0 +1,22 @@ +#Generated by Maven Ant Plugin - DO NOT EDIT THIS FILE! +#Thu Mar 22 00:41:13 CET 2012 +maven.settings.offline=true +maven.build.finalName=voms-api-java-2.0.7 +maven.build.resourceDir.0=src/main/resources +maven.build.testOutputDir=${maven.build.dir}/test-classes +maven.build.testResourceDir.0=src/test/resources +maven.reporting.outputDirectory=${maven.build.dir}/site +project.build.sourceEncoding=UTF-8 +maven.build.srcDir.0=src/main/java +project.build.directory=${maven.build.dir} +maven.test.reports=${maven.build.dir}/test-reports +maven.build.dir=target +project.build.outputDirectory=${maven.build.outputDir} +assembly.javadoc.dir=/usr/share/javadoc/voms-api-java +assembly.doc.dir=/usr/share/doc/voms-api-java-2.0.7 +project.reporting.outputEncoding=UTF-8 +maven.build.testDir.0=src/test/java +maven.settings.interactiveMode=true +assembly.java.dir=/usr/share/java +maven.repo.local=/home/ellert/Packaging/vomsjapi/voms-api-java-2.0.7/.m2 +maven.build.outputDir=${maven.build.dir}/classes diff --git a/maven-build.xml b/maven-build.xml new file mode 100644 index 0000000..39deccb --- /dev/null +++ b/maven-build.xml @@ -0,0 +1,268 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + =================================== WARNING =================================== + JUnit is not present in your $ANT_HOME/lib directory. Tests not executed. + =============================================================================== + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sources b/sources index e69de29..4cb1b01 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +953241b6f0162bf031de5bc833977d93 voms-api-java-2.0.7.tar.gz diff --git a/voms-api-java.spec b/voms-api-java.spec new file mode 100644 index 0000000..92a1616 --- /dev/null +++ b/voms-api-java.spec @@ -0,0 +1,148 @@ +# Use maven if it is available - otherwise fall back to ant +%if %{?fedora}%{!?fedora:0} >= 15 || %{?rhel}%{!?rhel:0} >= 7 +%global maven 1 +%else +%global maven 0 +%endif + +Name: voms-api-java +Version: 2.0.7 +Release: 1%{?dist} +Summary: Virtual Organization Membership Service Java API + +Group: Development/Libraries +License: ASL 2.0 +URL: http://glite.web.cern.ch/glite/ +# This source tarball is created from a git checkout: +# git clone git://github.com/italiangrid/voms-api-java.git +# cd voms-api-java +# git archive --format tar --prefix voms-api-java-2.0.7/ 2_0_7 \ +# | gzip - > ../voms-api-java-2.0.7.tar.gz +Source0: %{name}-%{version}.tar.gz +# These are build instructions for ant generated from the maven +# build instrutions using the maven ant plugin. +# These are used for building on EPEL since there is no maven +# available there. +Source1: build.xml +Source2: maven-build.xml +Source3: maven-build.properties +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +BuildArch: noarch + +# There is no bouncycastle in EPEL 5 ppc and EPEL 6 ppc64 +%if %{?rhel}%{!?rhel:0} == 5 +ExcludeArch: ppc +%endif +%if %{?rhel}%{!?rhel:0} == 6 +ExcludeArch: ppc64 +%endif + +Requires: java +Requires: jpackage-utils +Requires: bouncycastle >= 1.39 +Requires: jakarta-commons-cli +Requires: jakarta-commons-lang +Requires: log4j + +Provides: vomsjapi = %{version}-%{release} +Obsoletes: vomsjapi < 2.0.7 + +BuildRequires: java-devel >= 1:1.6.0 +BuildRequires: jpackage-utils + +%if %maven +BuildRequires: maven +BuildRequires: maven-compiler-plugin +BuildRequires: maven-install-plugin +BuildRequires: maven-jar-plugin +BuildRequires: maven-javadoc-plugin +BuildRequires: maven-release-plugin +BuildRequires: maven-resources-plugin +BuildRequires: maven-surefire-plugin +BuildRequires: junit4 +%else +BuildRequires: ant +BuildRequires: ant-junit +%endif + +BuildRequires: bouncycastle >= 1.39 +BuildRequires: jakarta-commons-cli +BuildRequires: jakarta-commons-lang +BuildRequires: log4j + +%description +The Virtual Organization Membership Service (VOMS) is an attribute authority +which serves as central repository for VO user authorization information, +providing support for sorting users into group hierarchies, keeping track of +their roles and other attributes in order to issue trusted attribute +certificates and SAML assertions used in the Grid environment for +authorization purposes. + +This package provides a java client API for VOMS. + +%package javadoc +Summary: Virtual Organization Membership Service Java API Documentation +Group: Documentation +Requires: jpackage-utils +Requires: %{name} = %{version}-%{release} +Provides: vomsjapi-javadoc = %{version}-%{release} +Obsoletes: vomsjapi-javadoc < 2.0.7 + +%description javadoc +Virtual Organization Membership Service (VOMS) Java API Documentation. + +%prep +%setup -q +install -m 644 %SOURCE1 . +install -m 644 %SOURCE2 . +install -m 644 %SOURCE3 . + +sed s/bcprov-ext-jdk15/bcprov-jdk16/ -i pom.xml + +%build +%if %{maven} +mvn-rpmbuild install javadoc:aggregate +%else +CLASSPATH=$(build-classpath bcprov log4j jakarta-commons-cli \ + jakarta-commons-lang) ant package javadoc +%endif + +%install +mkdir -p $RPM_BUILD_ROOT%{_javadir} +install -m 644 target/%{name}-%{version}.jar \ + $RPM_BUILD_ROOT%{_javadir}/%{name}.jar +ln -s %{name}.jar $RPM_BUILD_ROOT%{_javadir}/vomsjapi.jar + +mkdir -p $RPM_BUILD_ROOT%{_javadocdir}/%{name} +%if %{maven} +cp -pr target/site/javadoc/apidocs $RPM_BUILD_ROOT%{_javadocdir}/%{name} +%else +cp -pr target/site/apidocs $RPM_BUILD_ROOT%{_javadocdir}/%{name} +%endif + +%if %{maven} +mkdir -p $RPM_BUILD_ROOT%{_mavenpomdir} +install -m 644 pom.xml $RPM_BUILD_ROOT%{_mavenpomdir}/JPP-%{name}.pom +%add_maven_depmap JPP-%{name}.pom %{name}.jar -a vomsjapi:%{name} +%endif + +%clean +rm -rf $RPM_BUILD_ROOT + +%files +%defattr(-,root,root,-) +%{_javadir}/%{name}.jar +%{_javadir}/vomsjapi.jar +%if %{maven} +%{_mavenpomdir}/JPP-%{name}.pom +%{_mavendepmapfragdir}/%{name} +%endif +%doc AUTHORS LICENSE + +%files javadoc +%defattr(-,root,root,-) +%doc %{_javadocdir}/%{name} + +%changelog +* Tue Mar 20 2012 Mattias Ellert - 2.0.7-1 +- The Java API is now a separate source tree from the rest of voms