Packaging fixes
- Remove unneeded depmap - Remove versioned jars and javadocs - Use maven 3 to build
This commit is contained in:
parent
a16a60f12e
commit
77fab564e3
@ -4,7 +4,7 @@
|
||||
|
||||
Name: apache-%{short_name}
|
||||
Version: 1.8.3
|
||||
Release: 4%{?dist}
|
||||
Release: 5%{?dist}
|
||||
Summary: Java utility methods for accessing and modifying the properties of arbitrary JavaBeans
|
||||
License: ASL 2.0
|
||||
Group: Development/Libraries
|
||||
@ -12,33 +12,30 @@ URL: http://commons.apache.org/%{base_name}
|
||||
BuildArch: noarch
|
||||
Source0: http://archive.apache.org/dist/commons/%{base_name}/source/%{short_name}-%{version}-src.tar.gz
|
||||
# this will not be needed after commons-collections have proper pom
|
||||
Source1: %{short_name}.depmap
|
||||
|
||||
BuildRequires: apache-commons-logging >= 0:1.0
|
||||
BuildRequires: java >= 1:1.6.0
|
||||
BuildRequires: jpackage-utils > 0:1.7.2
|
||||
BuildRequires: maven
|
||||
BuildRequires: maven-plugin-bundle
|
||||
BuildRequires: maven-surefire-maven-plugin
|
||||
BuildRequires: maven-surefire-provider-junit
|
||||
BuildRequires: maven2-plugin-antrun
|
||||
BuildRequires: maven2-plugin-assembly
|
||||
BuildRequires: maven2-plugin-compiler
|
||||
BuildRequires: maven2-plugin-idea
|
||||
BuildRequires: maven2-plugin-install
|
||||
BuildRequires: maven2-plugin-jar
|
||||
BuildRequires: maven2-plugin-javadoc
|
||||
BuildRequires: maven2-plugin-resources
|
||||
BuildRequires: maven2-plugin-site
|
||||
BuildRequires: maven-antrun-plugin
|
||||
BuildRequires: maven-assembly-plugin
|
||||
BuildRequires: maven-compiler-plugin
|
||||
BuildRequires: maven-idea-plugin
|
||||
BuildRequires: maven-install-plugin
|
||||
BuildRequires: maven-jar-plugin
|
||||
BuildRequires: maven-javadoc-plugin
|
||||
BuildRequires: maven-resources-plugin
|
||||
BuildRequires: maven-site-plugin
|
||||
#change to apache-commons-collections once transition is done
|
||||
BuildRequires: jakarta-commons-collections-testframework >= 0:2.0
|
||||
BuildRequires: jakarta-commons-collections >= 0:2.0
|
||||
Requires: jakarta-commons-collections >= 0:2.0
|
||||
BuildRequires: apache-commons-collections-testframework >= 0:2.0
|
||||
BuildRequires: apache-commons-collections >= 0:2.0
|
||||
Requires: apache-commons-collections >= 0:2.0
|
||||
Requires: apache-commons-logging >= 0:1.0
|
||||
Requires(post): jpackage-utils
|
||||
Requires(postun): jpackage-utils
|
||||
Requires: java >= 1:1.6.0
|
||||
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
|
||||
# This should go away with F-17
|
||||
Provides: jakarta-%{short_name} = 0:%{version}-%{release}
|
||||
@ -71,73 +68,65 @@ sed -i 's/\r//' *.txt
|
||||
export MAVEN_REPO_LOCAL=$(pwd)/.m2/repository
|
||||
mkdir -p $MAVEN_REPO_LOCAL
|
||||
# test failures ignored because they are caused by mock
|
||||
mvn-jpp -Dmaven2.jpp.depmap.file="%{SOURCE1}" \
|
||||
-Dmaven.test.failure.ignore=true \
|
||||
-Dmaven.repo.local=$MAVEN_REPO_LOCAL \
|
||||
install javadoc:javadoc
|
||||
mvn-rpmbuild -Dmaven.test.failure.ignore=true \
|
||||
install javadoc:javadoc
|
||||
|
||||
|
||||
%install
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
# jars
|
||||
install -d -m 755 $RPM_BUILD_ROOT%{_javadir}
|
||||
install -m 644 target/%{short_name}-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}.jar
|
||||
install -m 644 target/%{short_name}-bean-collections-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}-bean-collections-%{version}.jar
|
||||
install -m 644 target/%{short_name}-core-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}-core-%{version}.jar
|
||||
install -m 644 target/%{short_name}-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}.jar
|
||||
|
||||
# main jar created from these, we install them just for safe measure
|
||||
install -m 644 target/%{short_name}-bean-collections-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}-bean-collections.jar
|
||||
install -m 644 target/%{short_name}-core-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}-core.jar
|
||||
|
||||
pushd $RPM_BUILD_ROOT%{_javadir}
|
||||
for jar in *-%{version}*; do
|
||||
for jar in *.jar; do
|
||||
ln -sf ${jar} `echo $jar| sed "s|apache-||g"`
|
||||
ln -sf ${jar} `echo $jar| sed "s|-%{version}||g"`
|
||||
ln -sf ${jar} `echo $jar| sed "s|apache-\(.*\)-%{version}|\1|g"`
|
||||
done
|
||||
popd # come back from javadir
|
||||
|
||||
install -d -m 755 $RPM_BUILD_ROOT%{_mavenpomdir}
|
||||
install -pm 644 pom.xml $RPM_BUILD_ROOT%{_mavenpomdir}/JPP-%{short_name}.pom
|
||||
install -pm 644 pom.xml $RPM_BUILD_ROOT%{_mavenpomdir}/JPP-%{name}.pom
|
||||
|
||||
%add_to_maven_depmap org.apache.commons %{short_name} %{version} JPP %{short_name}
|
||||
%add_to_maven_depmap org.apache.commons %{short_name}-core %{version} JPP %{short_name}
|
||||
%add_to_maven_depmap org.apache.commons %{short_name}-bean-collections %{version} JPP %{short_name}
|
||||
%add_maven_depmap JPP-%{name}.pom %{name}.jar -a "%{short_name}:%{short_name}-core,%{short_name}:%{short_name}-bean-collections"
|
||||
%add_maven_depmap JPP-%{name}.pom %{name}.jar -a "org.apache.commons:%{short_name},org.apache.commons:%{short_name}-core,org.apache.commons:%{short_name}-bean-collections"
|
||||
|
||||
# following lines are only for backwards compatibility. New packages
|
||||
# should use proper groupid org.apache.commons and also artifactid
|
||||
%add_to_maven_depmap %{short_name} %{short_name} %{version} JPP %{short_name}
|
||||
%add_to_maven_depmap %{short_name} %{short_name}-core %{version} JPP %{short_name}
|
||||
%add_to_maven_depmap %{short_name} %{short_name}-bean-collections %{version} JPP %{short_name}
|
||||
|
||||
# javadoc
|
||||
install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
|
||||
cp -pr target/site/apidocs/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
|
||||
%{__ln_s} %{name}-%{version} %{buildroot}%{_javadocdir}/%{name}
|
||||
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-20
|
||||
[ $1 -gt 1 ] && [ -L %{_javadocdir}/%{name} ] && \
|
||||
rm -rf $(readlink -f %{_javadocdir}/%{name}) %{_javadocdir}/%{name} || :
|
||||
|
||||
|
||||
%clean
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
%post
|
||||
%update_maven_depmap
|
||||
|
||||
%postun
|
||||
%update_maven_depmap
|
||||
|
||||
%files
|
||||
%defattr(-,root,root,-)
|
||||
%doc *.txt
|
||||
%{_javadir}/*.jar
|
||||
%{_mavenpomdir}/*.pom
|
||||
%{_mavendepmapfragdir}/*
|
||||
%{_javadir}/%{short_name}.jar
|
||||
%{_javadir}/%{short_name}-core.jar
|
||||
%{_javadir}/%{short_name}-bean-collections.jar
|
||||
%{_javadir}/%{name}.jar
|
||||
%{_javadir}/%{name}-core.jar
|
||||
%{_javadir}/%{name}-bean-collections.jar
|
||||
%{_mavenpomdir}/JPP-%{name}.pom
|
||||
%{_mavendepmapfragdir}/%{name}
|
||||
|
||||
%files javadoc
|
||||
%defattr(-,root,root,-)
|
||||
%doc LICENSE.txt NOTICE.txt RELEASE-NOTES.txt
|
||||
%{_javadocdir}/%{name}-%{version}
|
||||
%{_javadocdir}/%{name}
|
||||
|
||||
|
||||
%changelog
|
||||
* Tue Nov 22 2011 Stanislav Ochotnicky <sochotnicky@redhat.com> - 1.8.3-5
|
||||
- Packaging fixes
|
||||
- Remove unneeded depmap
|
||||
- Remove versioned jars and javadocs
|
||||
- Use maven 3 to build
|
||||
|
||||
* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.8.3-4
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
|
||||
|
||||
@ -283,7 +272,7 @@ rm -rf $RPM_BUILD_ROOT
|
||||
- use sed instead of bash 2.x extension in link area to make spec compatible
|
||||
with distro using bash 1.1x
|
||||
|
||||
* Fri Jun 07 2002 Henri Gomez <hgomez@users.sourceforge.net> 1.3-1jpp
|
||||
* Fri Jun 07 2002 Henri Gomez <hgomez@users.sourceforge.net> 1.3-1jpp
|
||||
- 1.3
|
||||
- added short names in %%{_javadir}, as does jakarta developpers
|
||||
- first jPackage release
|
||||
|
Loading…
Reference in New Issue
Block a user