Adapt to current guidelines

This commit is contained in:
Michal Srb 2013-08-05 18:27:49 +02:00
parent 018f71ecea
commit 789b784c3d

View File

@ -4,34 +4,22 @@
Name: apache-%{short_name}
Version: 1.1.3
Release: 2%{?dist}
Release: 3%{?dist}
Summary: Apache Commons Logging
License: ASL 2.0
Group: Development/Libraries
URL: http://commons.apache.org/%{base_name}
Source0: http://www.apache.org/dist/commons/%{base_name}/source/%{short_name}-%{version}-src.tar.gz
Source2: http://mirrors.ibiblio.org/pub/mirrors/maven2/%{short_name}/%{short_name}-api/1.1/%{short_name}-api-1.1.pom
BuildArch: noarch
BuildRequires: maven-local
BuildRequires: java-devel >= 1:1.6.0
BuildRequires: jpackage-utils >= 0:1.6
BuildRequires: avalon-framework >= 4.3
BuildRequires: avalon-logkit
BuildRequires: apache-commons-parent
BuildRequires: maven-dependency-plugin
BuildRequires: maven-failsafe-plugin
BuildRequires: maven-plugin-build-helper
BuildRequires: maven-release-plugin
BuildRequires: maven-site-plugin
BuildRequires: servlet
BuildRequires: mvn(avalon-framework:avalon-framework-api)
BuildRequires: mvn(avalon-framework:avalon-framework-impl)
BuildRequires: mvn(javax.servlet:servlet-api)
BuildRequires: mvn(junit:junit)
BuildRequires: mvn(log4j:log4j)
BuildRequires: mvn(logkit:logkit)
BuildRequires: mvn(org.apache.commons:commons-parent)
Requires: java >= 1:1.6.0
Requires: jpackage-utils >= 0:1.6
# This should go away with F-17
Provides: jakarta-%{short_name} = 0:%{version}-%{release}
Obsoletes: jakarta-%{short_name} <= 0:1.0.4
%description
The commons-logging package provides a simple, component oriented
@ -46,10 +34,6 @@ logging implementation.
%package javadoc
Summary: API documentation for %{name}
Group: Documentation
Requires: jpackage-utils
Obsoletes: jakarta-%{short_name}-javadoc <= 0:1.0.4
%description javadoc
%{summary}.
@ -69,60 +53,47 @@ Obsoletes: jakarta-%{short_name}-javadoc <= 0:1.0.4
sed -i 's/\r//' RELEASE-NOTES.txt LICENSE.txt NOTICE.txt
# for compatibility reasons
%mvn_file ":%{short_name}{*}" "%{short_name}@1" "%{name}@1"
%mvn_alias ":%{short_name}{*}" "org.apache.commons:%{short_name}@1"
%build
mvn-rpmbuild install javadoc:aggregate
%mvn_build
# -----------------------------------------------------------------------------
%install
# jars
install -d -m 755 $RPM_BUILD_ROOT%{_javadir}
install -p -m 644 target/%{short_name}-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}.jar
install -p -m 644 target/%{short_name}-api-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}-api.jar
install -p -m 644 target/%{short_name}-adapters-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}-adapters.jar
%mvn_install
pushd $RPM_BUILD_ROOT%{_javadir}
for jar in %{name}*; do
ln -sf ${jar} `echo $jar| sed "s|apache-||g"`
install -p -m 644 target/%{short_name}-api-%{version}.jar %{buildroot}/%{_javadir}/%{name}-api.jar
install -p -m 644 target/%{short_name}-adapters-%{version}.jar %{buildroot}/%{_javadir}/%{name}-adapters.jar
pushd %{buildroot}/%{_javadir}
for jar in %{name}-*; do
ln -sf ${jar} `echo ${jar}| sed "s|apache-||g"`
done
popd
# pom
install -d -m 755 $RPM_BUILD_ROOT%{_mavenpomdir}
install -pm 644 pom.xml $RPM_BUILD_ROOT/%{_mavenpomdir}/JPP-%{short_name}.pom
install -pm 644 %{SOURCE2} $RPM_BUILD_ROOT/%{_mavenpomdir}/JPP-%{short_name}-api.pom
install -pm 644 %{SOURCE2} %{buildroot}/%{_mavenpomdir}/JPP-%{short_name}-api.pom
%add_to_maven_depmap org.apache.commons %{short_name} %{version} JPP %{short_name}
%add_to_maven_depmap org.apache.commons %{short_name}-api %{version} JPP %{short_name}-api
%add_to_maven_depmap org.apache.commons %{short_name}-adapters %{version} JPP %{short_name}-adapters
%add_maven_depmap JPP-%{short_name}-api.pom %{short_name}-api.jar -a "org.apache.commons:commons-logging-api"
# 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}-api %{version} JPP %{short_name}-api
%add_to_maven_depmap %{short_name} %{short_name}-adapters %{version} JPP %{short_name}-adapters
# javadoc
install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}
cp -pr target/site/apidocs/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}
%files
%files -f .mfiles
%doc LICENSE.txt NOTICE.txt
%doc PROPOSAL.html RELEASE-NOTES.txt
%{_javadir}/*
%{_mavenpomdir}/JPP-%{short_name}.pom
%{_mavenpomdir}/JPP-%{short_name}-api.pom
%{_mavendepmapfragdir}/*
%{_javadir}/*%{short_name}-api.jar
%{_javadir}/*%{short_name}-adapters.jar
%files javadoc
%files javadoc -f .mfiles-javadoc
%doc LICENSE.txt NOTICE.txt
%{_javadocdir}/%{name}
# -----------------------------------------------------------------------------
%changelog
* Mon Aug 05 2013 Michal Srb <msrb@redhat.com> - 1.1.3-3
- Adapt to current guidelines
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.3-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild