1
0
Fridrich Strba 2018-10-23 17:31:05 +00:00 committed by Git OBS Bridge
parent e2b51a1074
commit 05a1bc446b
2 changed files with 18 additions and 3 deletions

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Tue Oct 23 17:30:33 UTC 2018 - Fridrich Strba <fstrba@suse.com>
- Cleanup the maven pom files installation
------------------------------------------------------------------- -------------------------------------------------------------------
Fri Sep 21 07:44:23 UTC 2018 - Tomáš Chvátal <tchvatal@suse.com> Fri Sep 21 07:44:23 UTC 2018 - Tomáš Chvátal <tchvatal@suse.com>

View File

@ -32,6 +32,8 @@ BuildRequires: ant
BuildRequires: commons-collections BuildRequires: commons-collections
BuildRequires: commons-logging BuildRequires: commons-logging
BuildRequires: fdupes BuildRequires: fdupes
BuildRequires: javapackages-local
BuildRequires: javapackages-tools
BuildRequires: xml-commons-apis BuildRequires: xml-commons-apis
Requires: commons-collections >= 2.0 Requires: commons-collections >= 2.0
Requires: commons-logging >= 1.0 Requires: commons-logging >= 1.0
@ -74,16 +76,19 @@ ant -Dbuild.sysclasspath=first dist
%install %install
# jars # jars
install -d -m 755 %{buildroot}%{_javadir} install -d -m 755 %{buildroot}%{_javadir}
install -m 644 dist/%{short_name}-%{version}-SNAPSHOT.jar %{buildroot}%{_javadir}/%{name}.jar install -m 644 dist/%{short_name}-%{version}-SNAPSHOT.jar %{buildroot}%{_javadir}/%{name}-%{version}.jar
pushd %{buildroot}%{_javadir} pushd %{buildroot}%{_javadir}
ln -s %{name}-%{version}.jar %{name}.jar
for jar in *.jar; do for jar in *.jar; do
ln -sf ${jar} `echo $jar| sed "s|apache-||g"` ln -sf ${jar} `echo $jar| sed "s|apache-||g"`
done done
popd # come back from javadir popd # come back from javadir
# poms
install -d -m 755 %{buildroot}%{_mavenpomdir} install -d -m 755 %{buildroot}%{_mavenpomdir}
install -pm 644 pom.xml %{buildroot}%{_mavenpomdir}/JPP-%{name}.pom install -pm 644 pom.xml %{buildroot}%{_mavenpomdir}/%{name}-%{version}.pom
%add_maven_depmap %{name}-%{version}.pom %{name}-%{version}.jar -a "org.apache.commons:%{short_name}"
# javadoc # javadoc
install -d -m 755 %{buildroot}%{_javadocdir}/%{name} install -d -m 755 %{buildroot}%{_javadocdir}/%{name}
@ -95,7 +100,12 @@ cp -pr dist/docs/api/* %{buildroot}%{_javadocdir}/%{name}
%license LICENSE.txt %license LICENSE.txt
%doc NOTICE.txt RELEASE-NOTES.txt %doc NOTICE.txt RELEASE-NOTES.txt
%{_javadir}/* %{_javadir}/*
%{_mavenpomdir}/JPP-%{name}.pom %{_mavenpomdir}/*
%if %{defined _maven_repository}
%{_mavendepmapfragdir}/%{name}
%else
%{_datadir}/maven-metadata/%{name}.xml*
%endif
%files javadoc %files javadoc
%defattr(0644,root,root,0755) %defattr(0644,root,root,0755)