This repository has been archived on 2026-01-16. You can view files and clone it, but you cannot make any changes to its state, such as pushing and creating new issues, pull requests or comments.
apache-commons-discovery/apache-commons-discovery.spec
Alexander Kurtakov e735dc366d Update to 0.5.
Build with maven and adapt to current guidelines.
2011-11-07 13:16:38 +02:00

92 lines
3 KiB
RPMSpec

%global base_name discovery
%global short_name commons-%{base_name}
Name: apache-%{short_name}
Version: 0.5
Release: 1%{?dist}
Epoch: 2
Summary: Apache Commons Discovery
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
Patch0: %{name}-addosgimanifest.patch
BuildArch: noarch
BuildRequires: java-devel >= 1:1.6.0
BuildRequires: jpackage-utils >= 0:1.6
BuildRequires: maven
BuildRequires: maven-surefire-provider-junit4
BuildRequires: apache-commons-logging >= 1.1.1
Requires: apache-commons-logging >= 1.1.1
# This should go away with F-17
Provides: jakarta-%{short_name} = %{epoch}:%{version}-%{release}
Obsoletes: jakarta-%{short_name} <= 1:0.4
%description
The Discovery component is about discovering, or finding, implementations for
pluggable interfaces. Pluggable interfaces are specified with the intent that
multiple implementations are, or will be, available to provide the service
described by the interface. Discovery provides facilities for finding and
instantiating classes, and for lifecycle management of singleton (factory)
classes.
%package javadoc
Group: Documentation
Summary: API documentation for %{name}
Requires: jpackage-utils
Obsoletes: jakarta-%{short_name}-javadoc <= 1:0.4
%description javadoc
%{summary}.
%prep
%setup -q -n %{short_name}-%{version}-src
%patch0
%build
mvn-rpmbuild install javadoc:aggregate
%install
# jar
install -d -m 755 $RPM_BUILD_ROOT%{_javadir}
install -p -m 644 target/%{short_name}-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}.jar
ln -sf %{name}.jar %{buildroot}%{_javadir}/%{short_name}.jar
# javadoc
install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}
cp -pr target/site/api*/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}
%files
%doc LICENSE.txt NOTICE.txt RELEASE-NOTES.txt
%{_javadir}/*
%files javadoc
%doc %{_javadocdir}/%{name}
%doc LICENSE.txt NOTICE.txt
%changelog
* Mon Nov 7 2011 Alexander Kurtakov <akurtako@redhat.com> 2:0.5-1
- Update to 0.5 upstream release.
- Build with maven.
* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2:0.4-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
* Thu Jul 8 2010 Stanislav Ochotnicky <sochotnicky@redhat.com> - 2:0.4-5
- Add license to javadoc subpackage
- Fix jar symlink installation
* Wed May 12 2010 Stanislav Ochotnicky <sochotnicky@redhat.com> - 2:0.4-4
- Add obsoletes to javadoc subpackage
- Add proper symlinks for unversioned jar files
* Fri May 7 2010 Stanislav Ochotnicky <sochotnicky@redhat.com> - 2:0.4-3
- Add jpackage-utils as dep for -javadoc subpackage
* Fri May 7 2010 Stanislav Ochotnicky <sochotnicky@redhat.com> - 2:0.4-2
- Fix provides
* Thu May 6 2010 Stanislav Ochotnicky <sochotnicky@redhat.com> - 0.4-1
- Rename and cleanup of jakarta-commons-discovery