mef e045e0
%global jar_version 1.4
mef e045e0
%global lh_version 1.1
mef e045e0
%global id_version 1.1
mef e045e0
mef e045e0
Name:		apache-resource-bundles
mef e045e0
Version:	2
Dennis Gilmore 1abee1
Release:	6%{?dist}
mef e045e0
Summary:	Apache Resource Bundles
mef e045e0
mef e045e0
Group:		Development/Libraries
mef e045e0
License:	ASL 2.0
mef e045e0
URL:		http://repo1.maven.org/maven2/org/apache/apache-resource-bundles/
mef e045e0
Source0:	http://repo1.maven.org/maven2/org/apache/%{name}/%{version}/%{name}-%{version}.pom
mef e045e0
Source1:	http://repo1.maven.org/maven2/org/apache/apache-jar-resource-bundle/%{jar_version}/apache-jar-resource-bundle-%{jar_version}-sources.jar
mef e045e0
Source2:	http://repo1.maven.org/maven2/org/apache/apache-jar-resource-bundle/%{jar_version}/apache-jar-resource-bundle-%{jar_version}.pom
mef e045e0
Source3:	http://repo1.maven.org/maven2/org/apache/apache-license-header-resource-bundle/%{lh_version}/apache-license-header-resource-bundle-%{lh_version}-sources.jar
mef e045e0
Source4:	http://repo1.maven.org/maven2/org/apache/apache-license-header-resource-bundle/%{lh_version}/apache-license-header-resource-bundle-%{lh_version}.pom
mef e045e0
Source5:	http://repo1.maven.org/maven2/org/apache/apache-incubator-disclaimer-resource-bundle/%{id_version}/apache-incubator-disclaimer-resource-bundle-%{id_version}-sources.jar
mef e045e0
Source6:	http://repo1.maven.org/maven2/org/apache/apache-incubator-disclaimer-resource-bundle/%{id_version}/apache-incubator-disclaimer-resource-bundle-%{id_version}.pom
mef e045e0
mef e045e0
# Remove maven-release plugin (not yet available on Fedora)
mef e045e0
Patch0:		apache-resource-bundles-cleanup-poms.patch
mef e045e0
mef e045e0
BuildRoot:	%(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
mef e045e0
mef e045e0
BuildRequires:	maven2
Alexander Kurtakov 713934
BuildRequires:	maven-compiler-plugin
Alexander Kurtakov 713934
BuildRequires:	maven-install-plugin
Alexander Kurtakov 713934
BuildRequires:	maven-jar-plugin
Alexander Kurtakov 713934
BuildRequires:	maven-remote-resources-plugin
Alexander Kurtakov 713934
BuildRequires:	maven-resources-plugin
Alexander Kurtakov 713934
BuildRequires:	maven-surefire-plugin
Alexander Kurtakov 713934
BuildRequires:  maven-site-plugin
mef e045e0
mef e045e0
# Requirements from the POMs
Alexander Kurtakov 713934
Requires:	maven-remote-resources-plugin
mef e045e0
mef e045e0
Requires(post):	jpackage-utils
mef e045e0
Requires(postun): jpackage-utils
mef e045e0
mef e045e0
BuildArch:	noarch
mef e045e0
mef e045e0
%description
mef e045e0
An archive which contains templates for generating the necessary license files
mef e045e0
and notices for all Apache releases.
mef e045e0
mef e045e0
%prep
mef e045e0
%setup -c -T
mef e045e0
cp %SOURCE0 ./pom.xml
mef e045e0
%patch0 -p1
mef e045e0
mef e045e0
# jar
mef e045e0
mkdir -p apache-jar-resource-bundle
mef e045e0
pushd apache-jar-resource-bundle
mef e045e0
jar xvf %SOURCE1
mef e045e0
cp %SOURCE2 ./pom.xml
mef e045e0
mkdir -p src/main/resources
mef e045e0
mv META-INF src/main/resources
mef e045e0
popd
mef e045e0
mef e045e0
# license-header
mef e045e0
mkdir -p apache-license-header-resource-bundle
mef e045e0
pushd apache-license-header-resource-bundle
mef e045e0
jar xvf %SOURCE3
mef e045e0
cp %SOURCE4 ./pom.xml
mef e045e0
mkdir -p src/main/resources
mef e045e0
mv META-INF src/main/resources
mef e045e0
popd
mef e045e0
mef e045e0
# incubator-disclaimer
mef e045e0
mkdir -p apache-incubator-disclaimer-resource-bundle
mef e045e0
pushd apache-incubator-disclaimer-resource-bundle
mef e045e0
jar xvf %SOURCE5
mef e045e0
cp %SOURCE6 ./pom.xml
mef e045e0
mkdir -p src/main/resources
mef e045e0
mv META-INF src/main/resources
mef e045e0
popd
mef e045e0
mef e045e0
mef e045e0
%build
mef e045e0
export MAVEN_REPO_LOCAL=$(pwd)/.m2/repository
mef e045e0
mkdir -p $MAVEN_REPO_LOCAL
mef e045e0
mef e045e0
mvn-jpp \
mef e045e0
	-Dmaven.repo.local=$MAVEN_REPO_LOCAL \
mef e045e0
	install
mef e045e0
mef e045e0
%install
mef e045e0
rm -rf $RPM_BUILD_ROOT
mef e045e0
mef e045e0
install -d -m 755 $RPM_BUILD_ROOT%{_javadir}/%{name}
mef e045e0
install -d -m 755 $RPM_BUILD_ROOT%{_mavenpomdir}
mef e045e0
mef e045e0
# jar
mef e045e0
# 
mef e045e0
pushd apache-jar-resource-bundle
mef e045e0
install -m 644 \
mef e045e0
	target/apache-jar-resource-bundle-%{jar_version}.jar \
mef e045e0
	$RPM_BUILD_ROOT%{_javadir}/%{name}/jar-%{jar_version}.jar
Stanislav Ochotnicky 361146
cp pom.xml $RPM_BUILD_ROOT%{_mavenpomdir}/JPP.%{name}-jar.pom
Stanislav Ochotnicky 361146
%add_to_maven_depmap org.apache apache-jar-resource-bundle %{jar_version} JPP/%{name} jar
mef e045e0
popd
mef e045e0
mef e045e0
# license-header
mef e045e0
pushd apache-license-header-resource-bundle
mef e045e0
install -m 644 \
mef e045e0
	target/apache-license-header-resource-bundle-%{lh_version}.jar \
mef e045e0
	$RPM_BUILD_ROOT%{_javadir}/%{name}/license-header-%{lh_version}.jar
Stanislav Ochotnicky 361146
cp pom.xml $RPM_BUILD_ROOT%{_mavenpomdir}/JPP.%{name}-license-header.pom
Stanislav Ochotnicky 361146
%add_to_maven_depmap org.apache apache-license-header-resource-bundle %{lh_version} JPP/%{name} license-header
mef e045e0
popd
mef e045e0
mef e045e0
# incubator-disclaimer
mef e045e0
pushd apache-incubator-disclaimer-resource-bundle
mef e045e0
install -m 644 \
mef e045e0
	target/apache-incubator-disclaimer-resource-bundle-%{id_version}.jar \
mef e045e0
	$RPM_BUILD_ROOT%{_javadir}/%{name}/incubator-disclaimer-%{id_version}.jar
Stanislav Ochotnicky 361146
cp pom.xml $RPM_BUILD_ROOT%{_mavenpomdir}/JPP.%{name}-incubator-disclaimer.pom
Stanislav Ochotnicky 361146
%add_to_maven_depmap org.apache apache-incubator-disclaimer-resource-bundle %{id_version} JPP/%{name} incubator-disclaimer
mef e045e0
popd
mef e045e0
mef e045e0
# Unversioned jars
mef e045e0
pushd $RPM_BUILD_ROOT%{_javadir}/%{name}
mef e045e0
ln -sf jar-%{jar_version}.jar jar.jar
mef e045e0
ln -sf license-header-%{lh_version}.jar license-header.jar
mef e045e0
ln -sf incubator-disclaimer-%{id_version}.jar incubator-disclaimer.jar
mef e045e0
popd
mef e045e0
mef e045e0
# Add parent to depmap too
mef e045e0
cp pom.xml $RPM_BUILD_ROOT%{_mavenpomdir}/JPP-%{name}.pom
mef e045e0
%add_to_maven_depmap org.apache %{name} %{version} JPP %{name}
mef e045e0
mef e045e0
%clean
mef e045e0
rm -rf $RPM_BUILD_ROOT
mef e045e0
mef e045e0
%post
mef e045e0
%update_maven_depmap
mef e045e0
mef e045e0
%postun
mef e045e0
%update_maven_depmap
mef e045e0
mef e045e0
%files
mef e045e0
%defattr(-,root,root,-)
mef e045e0
%{_javadir}/%{name}
mef e045e0
%config(noreplace) %{_mavendepmapfragdir}/*
mef e045e0
%{_mavenpomdir}/*.pom
mef e045e0
mef e045e0
mef e045e0
mef e045e0
%changelog
Dennis Gilmore 1abee1
* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2-6
Dennis Gilmore 1abee1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
Dennis Gilmore 1abee1
Stanislav Ochotnicky 361146
* Thu Nov 25 2010 Stanislav Ochotnicky <sochotnicky@redhat.com> - 2-5
Stanislav Ochotnicky 361146
- Fix pom file names and add_to_maven_depmap calls (Resolves rhbz#655790)
Stanislav Ochotnicky 361146
Alexander Kurtakov 713934
* Wed Sep 8 2010 Alexander Kurtakov <akurtako@redhat.com> 2-4
Alexander Kurtakov 713934
- Add maven-site-plugin BR.
Alexander Kurtakov 713934
- Use newer names of maven plugins.
Alexander Kurtakov 713934
mef e045e0
* Mon Feb  1 2010 Mary Ellen Foster <mefoster at="" gmail.com=""> 2-3
mef e045e0
- Fix license 
mef e045e0
mef e045e0
* Tue Jan 19 2010 Mary Ellen Foster <mefoster at="" gmail.com=""> 2-2
mef e045e0
- Add plugin dependencies from POMs
mef e045e0
- Fix description
mef e045e0
- Remove maven-release plugin (not on Fedora yet)
mef e045e0
mef e045e0
* Mon Jan 18 2010 Mary Ellen Foster <mefoster at="" gmail.com=""> 2-1
mef e045e0
- Initial package