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}
|
Name: apache-%{short_name}
|
||||||
Version: 1.8.3
|
Version: 1.8.3
|
||||||
Release: 4%{?dist}
|
Release: 5%{?dist}
|
||||||
Summary: Java utility methods for accessing and modifying the properties of arbitrary JavaBeans
|
Summary: Java utility methods for accessing and modifying the properties of arbitrary JavaBeans
|
||||||
License: ASL 2.0
|
License: ASL 2.0
|
||||||
Group: Development/Libraries
|
Group: Development/Libraries
|
||||||
@ -12,33 +12,30 @@ URL: http://commons.apache.org/%{base_name}
|
|||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
Source0: http://archive.apache.org/dist/commons/%{base_name}/source/%{short_name}-%{version}-src.tar.gz
|
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
|
# this will not be needed after commons-collections have proper pom
|
||||||
Source1: %{short_name}.depmap
|
|
||||||
|
|
||||||
BuildRequires: apache-commons-logging >= 0:1.0
|
BuildRequires: apache-commons-logging >= 0:1.0
|
||||||
BuildRequires: java >= 1:1.6.0
|
BuildRequires: java >= 1:1.6.0
|
||||||
BuildRequires: jpackage-utils > 0:1.7.2
|
BuildRequires: jpackage-utils > 0:1.7.2
|
||||||
|
BuildRequires: maven
|
||||||
BuildRequires: maven-plugin-bundle
|
BuildRequires: maven-plugin-bundle
|
||||||
BuildRequires: maven-surefire-maven-plugin
|
BuildRequires: maven-surefire-maven-plugin
|
||||||
BuildRequires: maven-surefire-provider-junit
|
BuildRequires: maven-surefire-provider-junit
|
||||||
BuildRequires: maven2-plugin-antrun
|
BuildRequires: maven-antrun-plugin
|
||||||
BuildRequires: maven2-plugin-assembly
|
BuildRequires: maven-assembly-plugin
|
||||||
BuildRequires: maven2-plugin-compiler
|
BuildRequires: maven-compiler-plugin
|
||||||
BuildRequires: maven2-plugin-idea
|
BuildRequires: maven-idea-plugin
|
||||||
BuildRequires: maven2-plugin-install
|
BuildRequires: maven-install-plugin
|
||||||
BuildRequires: maven2-plugin-jar
|
BuildRequires: maven-jar-plugin
|
||||||
BuildRequires: maven2-plugin-javadoc
|
BuildRequires: maven-javadoc-plugin
|
||||||
BuildRequires: maven2-plugin-resources
|
BuildRequires: maven-resources-plugin
|
||||||
BuildRequires: maven2-plugin-site
|
BuildRequires: maven-site-plugin
|
||||||
#change to apache-commons-collections once transition is done
|
#change to apache-commons-collections once transition is done
|
||||||
BuildRequires: jakarta-commons-collections-testframework >= 0:2.0
|
BuildRequires: apache-commons-collections-testframework >= 0:2.0
|
||||||
BuildRequires: jakarta-commons-collections >= 0:2.0
|
BuildRequires: apache-commons-collections >= 0:2.0
|
||||||
Requires: jakarta-commons-collections >= 0:2.0
|
Requires: apache-commons-collections >= 0:2.0
|
||||||
Requires: apache-commons-logging >= 0:1.0
|
Requires: apache-commons-logging >= 0:1.0
|
||||||
Requires(post): jpackage-utils
|
|
||||||
Requires(postun): jpackage-utils
|
|
||||||
Requires: java >= 1:1.6.0
|
Requires: java >= 1:1.6.0
|
||||||
|
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
|
||||||
|
|
||||||
# This should go away with F-17
|
# This should go away with F-17
|
||||||
Provides: jakarta-%{short_name} = 0:%{version}-%{release}
|
Provides: jakarta-%{short_name} = 0:%{version}-%{release}
|
||||||
@ -71,73 +68,65 @@ sed -i 's/\r//' *.txt
|
|||||||
export MAVEN_REPO_LOCAL=$(pwd)/.m2/repository
|
export MAVEN_REPO_LOCAL=$(pwd)/.m2/repository
|
||||||
mkdir -p $MAVEN_REPO_LOCAL
|
mkdir -p $MAVEN_REPO_LOCAL
|
||||||
# test failures ignored because they are caused by mock
|
# test failures ignored because they are caused by mock
|
||||||
mvn-jpp -Dmaven2.jpp.depmap.file="%{SOURCE1}" \
|
mvn-rpmbuild -Dmaven.test.failure.ignore=true \
|
||||||
-Dmaven.test.failure.ignore=true \
|
install javadoc:javadoc
|
||||||
-Dmaven.repo.local=$MAVEN_REPO_LOCAL \
|
|
||||||
install javadoc:javadoc
|
|
||||||
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
rm -rf $RPM_BUILD_ROOT
|
|
||||||
|
|
||||||
# jars
|
# jars
|
||||||
install -d -m 755 $RPM_BUILD_ROOT%{_javadir}
|
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}-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}.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
|
# 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}
|
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|apache-||g"`
|
||||||
ln -sf ${jar} `echo $jar| sed "s|-%{version}||g"`
|
|
||||||
ln -sf ${jar} `echo $jar| sed "s|apache-\(.*\)-%{version}|\1|g"`
|
|
||||||
done
|
done
|
||||||
popd # come back from javadir
|
popd # come back from javadir
|
||||||
|
|
||||||
install -d -m 755 $RPM_BUILD_ROOT%{_mavenpomdir}
|
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_maven_depmap JPP-%{name}.pom %{name}.jar -a "%{short_name}:%{short_name}-core,%{short_name}:%{short_name}-bean-collections"
|
||||||
%add_to_maven_depmap org.apache.commons %{short_name}-core %{version} JPP %{short_name}
|
%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"
|
||||||
%add_to_maven_depmap org.apache.commons %{short_name}-bean-collections %{version} JPP %{short_name}
|
|
||||||
|
|
||||||
# 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
|
# javadoc
|
||||||
install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
|
install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}
|
||||||
cp -pr target/site/apidocs/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
|
cp -pr target/site/apidocs/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}
|
||||||
%{__ln_s} %{name}-%{version} %{buildroot}%{_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
|
%files
|
||||||
%defattr(-,root,root,-)
|
|
||||||
%doc *.txt
|
%doc *.txt
|
||||||
%{_javadir}/*.jar
|
%{_javadir}/%{short_name}.jar
|
||||||
%{_mavenpomdir}/*.pom
|
%{_javadir}/%{short_name}-core.jar
|
||||||
%{_mavendepmapfragdir}/*
|
%{_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
|
%files javadoc
|
||||||
%defattr(-,root,root,-)
|
|
||||||
%doc LICENSE.txt NOTICE.txt RELEASE-NOTES.txt
|
%doc LICENSE.txt NOTICE.txt RELEASE-NOTES.txt
|
||||||
%{_javadocdir}/%{name}-%{version}
|
|
||||||
%{_javadocdir}/%{name}
|
%{_javadocdir}/%{name}
|
||||||
|
|
||||||
|
|
||||||
%changelog
|
%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
|
* 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
|
- 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
|
- use sed instead of bash 2.x extension in link area to make spec compatible
|
||||||
with distro using bash 1.1x
|
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
|
- 1.3
|
||||||
- added short names in %%{_javadir}, as does jakarta developpers
|
- added short names in %%{_javadir}, as does jakarta developpers
|
||||||
- first jPackage release
|
- first jPackage release
|
||||||
|
Loading…
Reference in New Issue
Block a user