Update to current packaging guidelines

This commit is contained in:
Mikolaj Izdebski 2014-05-21 18:11:55 +02:00
parent a08d6e2026
commit 11e90fabe3

View File

@ -1,30 +1,18 @@
Name: jsoup
Version: 1.7.2
Release: 2%{?dist}
Release: 3%{?dist}
Summary: Java library for working with real-world HTML
Group: Development/Libraries
License: MIT
URL: http://%{name}.org/
BuildArch: noarch
# https://github.com/jhy/jsoup/archive/jsoup-1.7.2.tar.gz
Source0: jsoup-jsoup-1.7.2.tar.gz
BuildArch: noarch
BuildRequires: java-devel >= 1:1.6.0
BuildRequires: maven-local
BuildRequires: maven-compiler-plugin
BuildRequires: maven-source-plugin
BuildRequires: maven-javadoc-plugin
BuildRequires: maven-plugin-plugin
BuildRequires: maven-jar-plugin
BuildRequires: maven-surefire-provider-junit4
BuildRequires: maven-install-plugin
Requires: jpackage-utils
Requires: java-headless
BuildRequires: maven-local
BuildRequires: mvn(junit:junit)
BuildRequires: mvn(org.apache.felix:maven-bundle-plugin)
BuildRequires: mvn(org.apache.maven.plugins:maven-source-plugin)
%description
jsoup is a Java library for working with real-world HTML.
@ -47,9 +35,7 @@ jsoup will create a sensible parse tree.
%package javadoc
Group: Documentation
Summary: Javadoc for %{name}
Requires: jpackage-utils
%description javadoc
API documentation for %{name}.
@ -58,32 +44,21 @@ API documentation for %{name}.
%setup -q -n jsoup-jsoup-%{version}
%build
mvn-rpmbuild install javadoc:aggregate
%mvn_build
%install
# jars
install -Dpm 644 target/%{name}-%{version}.jar %{buildroot}%{_javadir}/%{name}.jar
%mvn_install
# poms
install -Dpm 644 pom.xml %{buildroot}%{_mavenpomdir}/JPP-%{name}.pom
%add_maven_depmap JPP-%{name}.pom %{name}.jar
# javadoc
install -dm 755 %{buildroot}%{_javadocdir}/%{name}
cp -pr target/site/apidocs/* %{buildroot}%{_javadocdir}/%{name}
%files
%files -f .mfiles
%doc LICENSE README CHANGES
%{_javadir}/%{name}.jar
%{_mavenpomdir}/JPP-%{name}.pom
%{_mavendepmapfragdir}/%{name}
%files javadoc
%files javadoc -f .mfiles-javadoc
%doc LICENSE
%doc %{_javadocdir}/%{name}
%changelog
* Wed May 21 2014 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.7.2-3
- Update to current packaging guidelines
* Tue Mar 04 2014 Stanislav Ochotnicky <sochotnicky@redhat.com> - 1.7.2-2
- Use Requires: java-headless rebuild (#1067528)