Update to current packaging guidelines

This commit is contained in:
Mikolaj Izdebski 2014-10-14 11:01:39 +02:00
parent d77e78ddce
commit 527d635fe3

View File

@ -1,35 +1,23 @@
Name: plexus-sec-dispatcher
Version: 1.4
Release: 16%{?dist}
Release: 17%{?dist}
Summary: Plexus Security Dispatcher Component
Group: Development/Libraries
License: ASL 2.0
URL: http://spice.sonatype.org
BuildArch: noarch
#svn export http://svn.sonatype.org/spice/tags/plexus-sec-dispatcher-1.4/
#tar jcf plexus-sec-dispatcher-1.4.tar.bz2 plexus-sec-dispatcher-1.4/
Source0: %{name}-%{version}.tar.bz2
#Removed maven-compiler-plugin configuration version in the pom as annotations isn't available in version 1.4.
Patch0: %{name}-pom.patch
BuildArch: noarch
BuildRequires: java-devel >= 1:1.6.0
BuildRequires: maven-local
BuildRequires: maven-plugin-plugin
BuildRequires: maven-compiler-plugin
BuildRequires: maven-install-plugin
BuildRequires: maven-jar-plugin
BuildRequires: maven-javadoc-plugin
BuildRequires: maven-resources-plugin
BuildRequires: maven-surefire-maven-plugin
BuildRequires: modello
BuildRequires: plexus-utils
BuildRequires: plexus-cipher
BuildRequires: plexus-containers-component-metadata
BuildRequires: junit
BuildRequires: forge-parent
BuildRequires: spice-parent
Requires: jpackage-utils
Requires: java-headless
@ -49,30 +37,22 @@ API documentation for %{name}.
%prep
%setup -q
%patch0 -p1
%mvn_file : plexus/%{name}
%build
mvn-rpmbuild install javadoc:javadoc
%mvn_build
%install
# jars
install -Dpm 644 target/%{name}-%{version}.jar %{buildroot}%{_javadir}/plexus/%{name}.jar
# poms
install -Dpm 644 pom.xml %{buildroot}%{_mavenpomdir}/JPP.plexus-%{name}.pom
%add_maven_depmap JPP.plexus-%{name}.pom plexus/%{name}.jar
# javadoc
install -d -m 0755 %{buildroot}%{_javadocdir}/plexus/%{name}
cp -pr target/site/api*/* %{buildroot}%{_javadocdir}/plexus/%{name}
%mvn_install
%files -f .mfiles
%{_javadir}/plexus/*
%files javadoc
%{_javadocdir}/plexus/%{name}
%files javadoc -f .mfiles-javadoc
%changelog
* Tue Oct 14 2014 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.4-17
- Update to current packaging guidelines
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4-16
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild