218 lines
8.1 KiB
RPMSpec
218 lines
8.1 KiB
RPMSpec
|
|
%global base_name logging
|
|
%global short_name commons-%{base_name}
|
|
|
|
Name: apache-%{short_name}
|
|
Version: 1.1.1
|
|
Release: 23%{?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
|
|
Source1: %{short_name}.depmap
|
|
Source2: http://mirrors.ibiblio.org/pub/mirrors/maven2/%{short_name}/%{short_name}-api/1.1/%{short_name}-api-1.1.pom
|
|
# Sent upstream https://issues.apache.org/jira/browse/LOGGING-143
|
|
Patch0: %{short_name}-avalon-update.patch
|
|
|
|
Patch1: %{short_name}-eclipse-manifest.patch
|
|
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-plugin-build-helper
|
|
BuildRequires: maven-release-plugin
|
|
BuildRequires: maven-site-plugin
|
|
BuildRequires: servlet
|
|
|
|
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
|
|
interface (org.apache.commons.logging.Log) together with wrappers for
|
|
logging systems. The user can choose at runtime which system they want
|
|
to use. In addition, a small number of basic implementations are
|
|
provided to allow users to use the package standalone.
|
|
commons-logging was heavily influenced by Avalon's Logkit and Log4J. The
|
|
commons-logging abstraction is meant to minimize the differences between
|
|
the two, and to allow a developer to not tie himself to a particular
|
|
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}.
|
|
|
|
# -----------------------------------------------------------------------------
|
|
|
|
%prep
|
|
%setup -q -n %{short_name}-%{version}-src
|
|
|
|
%patch0 -p1
|
|
%patch1
|
|
|
|
sed -i 's/\r//' RELEASE-NOTES.txt LICENSE.txt NOTICE.txt
|
|
|
|
# -----------------------------------------------------------------------------
|
|
|
|
%build
|
|
# fails with recent surefire for some reason
|
|
rm src/test/org/apache/commons/logging/logkit/StandardTestCase.java
|
|
rm src/test/org/apache/commons/logging/servlet/BasicServletTestCase.java
|
|
|
|
# These files have names suggesting they are test cases but they are not.
|
|
# They should probably be renamed/excluded from surefire run properly
|
|
rm src/test/org/apache/commons/logging/log4j/log4j12/*StandardTestCase.java
|
|
|
|
mvn-rpmbuild -Dmaven.local.depmap.file="%{SOURCE1}" \
|
|
install javadoc:aggregate
|
|
|
|
# -----------------------------------------------------------------------------
|
|
|
|
%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
|
|
|
|
pushd $RPM_BUILD_ROOT%{_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
|
|
|
|
%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
|
|
|
|
# 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
|
|
%doc LICENSE.txt NOTICE.txt
|
|
%doc PROPOSAL.html STATUS.html RELEASE-NOTES.txt
|
|
%{_javadir}/*
|
|
%{_mavenpomdir}/JPP-%{short_name}.pom
|
|
%{_mavenpomdir}/JPP-%{short_name}-api.pom
|
|
%{_mavendepmapfragdir}/*
|
|
|
|
|
|
%files javadoc
|
|
%doc LICENSE.txt NOTICE.txt
|
|
%{_javadocdir}/%{name}
|
|
|
|
# -----------------------------------------------------------------------------
|
|
|
|
%changelog
|
|
* Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.1-23
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
|
|
|
|
* Wed Feb 06 2013 Java SIG <java-devel@lists.fedoraproject.org> - 1.1.1-22
|
|
- Update for https://fedoraproject.org/wiki/Fedora_19_Maven_Rebuild
|
|
- Replace maven BuildRequires with maven-local
|
|
|
|
* Thu Nov 22 2012 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.1.1-21
|
|
- Install NOTICE file
|
|
- Resolves: rhbz#879581
|
|
|
|
* Wed Jul 18 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.1-20
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
|
|
|
|
* Tue May 1 2012 Alexander Kurtakov <akurtako@redhat.com> 1.1.1-19
|
|
- Bring back jakarta-commons-logging provides/obsoletes - the comment was misleading.
|
|
|
|
* Mon Apr 30 2012 Alexander Kurtakov <akurtako@redhat.com> 1.1.1-18
|
|
- Fix build with latest libs.
|
|
- Adapt to current guidelines.
|
|
|
|
* Thu Jan 12 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.1-17
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
|
|
|
|
* Thu Apr 21 2011 Stanislav Ochotnicky <sochotnicky@redhat.com> - 1.1.1-16
|
|
- Build with maven 3
|
|
- Fix build for avalon-framework
|
|
|
|
* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.1-15
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
|
|
|
|
* Thu Dec 16 2010 Alexander Kurtakov <akurtako@redhat.com> 1.1.1-14
|
|
- Bring back commons-logging* symlinks.
|
|
|
|
* Thu Dec 16 2010 Stanislav Ochotnicky <sochotnicky@redhat.com> - 1.1.1-13
|
|
- Replace tomcat6 BR with servlet25 only
|
|
- Cleanups according to new packaging guidelines
|
|
- Install maven metadata for -api jar
|
|
- Versionless jars/javadocs
|
|
|
|
* Tue Nov 9 2010 Stanislav Ochotnicky <sochotnicky@redhat.com> - 1.1.1-12
|
|
- Add depmaps for api and adapters subpackages
|
|
- Use apache-commons-parent BR instead of maven-*
|
|
- Replace tomcat5 BR with tomcat6
|
|
- Reenable tests
|
|
|
|
* Thu Jul 8 2010 Stanislav Ochotnicky <sochotnicky@redhat.com> - 1.1.1-11
|
|
- Add license to javadoc subpackage
|
|
|
|
* Wed Jun 9 2010 Alexander Kurtakov <akurtako@redhat.com> 1.1.1-10
|
|
- Add osgi manifest entries.
|
|
|
|
* Fri May 21 2010 Stanislav Ochotnicky <sochotnicky@redhat.com> - 1.1.1-9
|
|
- Correct depmap filename for backward compatibility
|
|
|
|
* Mon May 17 2010 Stanislav Ochotnicky <sochotnicky@redhat.com> - 1.1.1-8
|
|
- Fix wrong depmap JPP name to short_name
|
|
- Add obsoletes to javadoc subpackage
|
|
|
|
* Wed May 12 2010 Stanislav Ochotnicky <sochotnicky@redhat.com> - 1.1.1-7
|
|
- Fix symlink problems introduced previously in r5
|
|
|
|
* Tue May 11 2010 Stanislav Ochotnicky <sochotnicky@redhat.com> - 1.1.1-6
|
|
- Add one more add_to_maven_depmap for backward compatibility
|
|
|
|
* Mon May 10 2010 Stanislav Ochotnicky <sochotnicky@redhat.com> - 1.1.1-5
|
|
- Fix up add_to_maven_depmap
|
|
- Add jpackage-utils Requires for javadoc
|
|
- Cleanup install a bit
|
|
|
|
* Fri May 7 2010 Stanislav Ochotnicky <sochotnicky@redhat.com> - 1.1.1-4
|
|
- Fix provides
|
|
|
|
* Thu May 6 2010 Stanislav Ochotnicky <sochotnicky@redhat.com> - 1.1.1-3
|
|
- Revert to using default permissions
|
|
- Drop "Package" from summary, improve javadoc summary text
|
|
|
|
* Thu May 6 2010 Stanislav Ochotnicky <sochotnicky@redhat.com> - 1.1.1-2
|
|
- Fix EOLs on docs
|
|
- Create javadoc symlinks during install
|
|
- Use version macro in Source0 URL, use _mavenpomdir macro
|
|
|
|
* Thu May 6 2010 Stanislav Ochotnicky <sochotnicky@redhat.com> - 1.1.1-1
|
|
- Rename and rebase from jakarta-commons-logging
|