Build with xmvn
This commit is contained in:
parent
41a992d052
commit
6de5810f32
@ -1,43 +1,21 @@
|
|||||||
|
|
||||||
%global base_name beanutils
|
%global base_name beanutils
|
||||||
%global short_name commons-%{base_name}
|
%global short_name commons-%{base_name}
|
||||||
|
|
||||||
Name: apache-%{short_name}
|
Name: apache-%{short_name}
|
||||||
Version: 1.8.3
|
Version: 1.8.3
|
||||||
Release: 9%{?dist}
|
Release: 10%{?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
|
|
||||||
URL: http://commons.apache.org/%{base_name}
|
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
|
|
||||||
|
|
||||||
BuildRequires: apache-commons-logging >= 0:1.0
|
|
||||||
BuildRequires: java >= 1:1.6.0
|
|
||||||
BuildRequires: jpackage-utils > 0:1.7.2
|
|
||||||
BuildRequires: maven-local
|
BuildRequires: maven-local
|
||||||
BuildRequires: maven-plugin-bundle
|
BuildRequires: mvn(commons-collections:commons-collections)
|
||||||
BuildRequires: maven-surefire-maven-plugin
|
BuildRequires: mvn(commons-collections:commons-collections-testframework)
|
||||||
BuildRequires: maven-surefire-provider-junit
|
BuildRequires: mvn(commons-logging:commons-logging)
|
||||||
BuildRequires: maven-antrun-plugin
|
BuildRequires: mvn(org.apache.commons:commons-parent)
|
||||||
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: 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: java >= 1:1.6.0
|
|
||||||
|
|
||||||
|
|
||||||
# This should go away with F-17
|
|
||||||
Provides: jakarta-%{short_name} = 0:%{version}-%{release}
|
Provides: jakarta-%{short_name} = 0:%{version}-%{release}
|
||||||
Obsoletes: jakarta-%{short_name} <= 0:1.7.0
|
Obsoletes: jakarta-%{short_name} <= 0:1.7.0
|
||||||
|
|
||||||
@ -49,8 +27,6 @@ is very lightweight.
|
|||||||
|
|
||||||
%package javadoc
|
%package javadoc
|
||||||
Summary: Javadoc for %{name}
|
Summary: Javadoc for %{name}
|
||||||
Group: Documentation
|
|
||||||
Requires: jpackage-utils
|
|
||||||
|
|
||||||
Provides: jakarta-%{short_name}-javadoc = 0:%{version}-%{release}
|
Provides: jakarta-%{short_name}-javadoc = 0:%{version}-%{release}
|
||||||
Obsoletes: jakarta-%{short_name}-javadoc <= 0:1.7.0
|
Obsoletes: jakarta-%{short_name}-javadoc <= 0:1.7.0
|
||||||
@ -62,65 +38,40 @@ Obsoletes: jakarta-%{short_name}-javadoc <= 0:1.7.0
|
|||||||
%setup -q -n %{short_name}-%{version}-src
|
%setup -q -n %{short_name}-%{version}-src
|
||||||
sed -i 's/\r//' *.txt
|
sed -i 's/\r//' *.txt
|
||||||
|
|
||||||
|
%pom_remove_plugin :maven-antrun-plugin
|
||||||
|
%pom_remove_plugin :maven-assembly-plugin
|
||||||
|
|
||||||
|
%mvn_alias :{*} :@1-core :@1-bean-collections
|
||||||
|
%mvn_alias :{*} org.apache.commons:@1 org.apache.commons:@1-core org.apache.commons:@1-bean-collections
|
||||||
|
%mvn_file : %{name} %{name}-core %{name}-bean-collections
|
||||||
|
%mvn_file : %{short_name} %{short_name}-core %{short_name}-bean-collections
|
||||||
|
|
||||||
%build
|
%build
|
||||||
|
# Some tests fail in Koji
|
||||||
export MAVEN_REPO_LOCAL=$(pwd)/.m2/repository
|
%mvn_build -f
|
||||||
mkdir -p $MAVEN_REPO_LOCAL
|
|
||||||
# test failures ignored because they are caused by mock
|
|
||||||
mvn-rpmbuild -Dmaven.test.failure.ignore=true \
|
|
||||||
install javadoc:javadoc
|
|
||||||
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
# jars
|
%mvn_install
|
||||||
install -d -m 755 $RPM_BUILD_ROOT%{_javadir}
|
|
||||||
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 *.jar; do
|
|
||||||
ln -sf ${jar} `echo $jar| sed "s|apache-||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-%{name}.pom
|
|
||||||
|
|
||||||
%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"
|
|
||||||
|
|
||||||
|
|
||||||
# javadoc
|
|
||||||
install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}
|
|
||||||
cp -pr target/site/apidocs/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}
|
|
||||||
|
|
||||||
%pre javadoc
|
%pre javadoc
|
||||||
# workaround for rpm bug, can be removed in F-20
|
# workaround for rpm bug, can be removed in F-20
|
||||||
[ $1 -gt 1 ] && [ -L %{_javadocdir}/%{name} ] && \
|
[ $1 -gt 1 ] && [ -L %{_javadocdir}/%{name} ] && \
|
||||||
rm -rf $(readlink -f %{_javadocdir}/%{name}) %{_javadocdir}/%{name} || :
|
rm -rf $(readlink -f %{_javadocdir}/%{name}) %{_javadocdir}/%{name} || :
|
||||||
|
|
||||||
|
%files -f .mfiles
|
||||||
|
%doc README.txt RELEASE-NOTES.txt
|
||||||
|
%doc LICENSE.txt NOTICE.txt
|
||||||
|
|
||||||
%files
|
%files javadoc -f .mfiles-javadoc
|
||||||
%doc *.txt
|
%doc LICENSE.txt NOTICE.txt
|
||||||
%{_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
|
|
||||||
%doc LICENSE.txt NOTICE.txt RELEASE-NOTES.txt
|
|
||||||
%{_javadocdir}/%{name}
|
|
||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Apr 29 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.8.3-10
|
||||||
|
- Build with xmvn
|
||||||
|
- Don't generate extra JARs
|
||||||
|
- Simplify build dependencies
|
||||||
|
- Update to current packaging guidelines
|
||||||
|
|
||||||
* Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.8.3-9
|
* Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.8.3-9
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user