Update to upstream version 2.5

- Update to current packaging guidelines
This commit is contained in:
Mikolaj Izdebski 2013-08-12 17:17:14 +02:00
parent 129d2c3ac3
commit 686bf35b3f
3 changed files with 16 additions and 99 deletions

1
.gitignore vendored
View File

@ -6,3 +6,4 @@ bin
/plexus-classworlds-2.4.tar.gz
/LICENSE-2.0.txt
/plexus-classworlds-2.4.2.tar.gz
/plexus-classworlds-2.5.tar.gz

View File

@ -1,64 +1,15 @@
# Copyright (c) 2000-2007, JPackage Project
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the
# distribution.
# 3. Neither the name of the JPackage Project nor the names of its
# contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
%global parent plexus
%global subname classworlds
Name: %{parent}-%{subname}
Version: 2.4.2
Release: 5%{?dist}
Name: plexus-classworlds
Version: 2.5
Release: 1%{?dist}
Summary: Plexus Classworlds Classloader Framework
License: ASL 2.0 and Plexus
Group: Development/Libraries
URL: http://plexus.codehaus.org/
Source0: https://github.com/sonatype/%{name}/archive/%{name}-%{version}.tar.gz
Source1: http://www.apache.org/licenses/LICENSE-2.0.txt
BuildArch: noarch
BuildRequires: jpackage-utils
BuildRequires: apache-commons-logging
BuildRequires: xml-commons-jaxp-1.3-apis
BuildRequires: maven-local
BuildRequires: maven-compiler-plugin
BuildRequires: maven-install-plugin
BuildRequires: maven-jar-plugin
BuildRequires: maven-javadoc-plugin
BuildRequires: maven-resources-plugin
BuildRequires: maven-release-plugin
BuildRequires: maven-shared-invoker
BuildRequires: maven-shared-reporting-impl
BuildRequires: maven-dependency-plugin
BuildRequires: maven-plugin-bundle
BuildRequires: plexus-utils
BuildRequires: mvn(org.apache.felix:maven-bundle-plugin)
BuildRequires: mvn(org.apache.maven.plugins:maven-dependency-plugin)
%description
Classworlds is a framework for container developers
@ -72,65 +23,31 @@ classworlds.
%package javadoc
Summary: Javadoc for %{name}
Group: Documentation
Requires: jpackage-utils
%description javadoc
API documentation for %{name}.
%prep
%setup -q -n %{name}-%{name}-%{version}
for j in $(find . -name "*.jar" | grep -v /test-data/ | grep -v /test-jars/); do
rm $j
done
# fix ant groupId
sed -i 's:<groupId>ant</groupId>:<groupId>org.apache.ant</groupId>:' pom.xml
# Generate OSGI info
%pom_xpath_inject "pom:project" "<packaging>bundle</packaging>"
%pom_xpath_inject "pom:build/pom:plugins" "
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<extensions>true</extensions>
<configuration>
<instructions>
<_nouses>true</_nouses>
<Export-Package>org.codehaus.classworlds.*;org.codehaus.plexus.classworlds.*</Export-Package>
</instructions>
</configuration>
</plugin>"
cp %{SOURCE1} .
%mvn_file : %{name} plexus/classworlds
%build
mvn-rpmbuild -e install javadoc:javadoc
%mvn_build
%install
# jars
install -Dpm 644 target/%{name}-%{version}.jar \
$RPM_BUILD_ROOT%{_javadir}/plexus/%{subname}.jar
%mvn_install
# pom
install -Dpm 644 pom.xml $RPM_BUILD_ROOT%{_mavenpomdir}/JPP.%{parent}-%{subname}.pom
%add_maven_depmap JPP.%{parent}-%{subname}.pom plexus/%{subname}.jar
# javadoc
install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}
cp -pr target/site/apidocs/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}
%files
%{_javadir}/%{parent}/*
%{_mavenpomdir}/*
%{_mavendepmapfragdir}/*
%files -f .mfiles
%doc LICENSE.txt LICENSE-2.0.txt
%files javadoc
%files javadoc -f .mfiles-javadoc
%doc LICENSE.txt LICENSE-2.0.txt
%doc %{_javadocdir}/%{name}
%changelog
* Mon Aug 12 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 2.5-1
- Update to upstream version 2.5
- Update to current packaging guidelines
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.4.2-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild

View File

@ -1,2 +1 @@
3b83ef96387f14655fc854ddc3c6bd57 LICENSE-2.0.txt
6fc109fde19057742f82daa99687f0a1 plexus-classworlds-2.4.2.tar.gz
cd36a85711a0cbbed564cec66a8e0ede plexus-classworlds-2.5.tar.gz