[jakarta-commons-httpclient] Adapt to current guidelines

Michal Srb msrb at fedoraproject.org
Wed May 21 12:41:07 UTC 2014


commit dc5febc08e5a93c880761171fb11d905be0078fd
Author: Michal Srb <msrb at redhat.com>
Date:   Wed May 21 14:40:52 2014 +0200

    Adapt to current guidelines

 jakarta-commons-httpclient.spec |   77 ++++++++-------------------------------
 1 files changed, 15 insertions(+), 62 deletions(-)
---
diff --git a/jakarta-commons-httpclient.spec b/jakarta-commons-httpclient.spec
index 6b592bc..b83ec2e 100644
--- a/jakarta-commons-httpclient.spec
+++ b/jakarta-commons-httpclient.spec
@@ -1,41 +1,12 @@
-# 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 short_name httpclient
 
 Name:           jakarta-commons-httpclient
 Version:        3.1
-Release:        16%{?dist}
-Epoch:          1
+Release:        17%{?dist}
 Summary: Jakarta Commons HTTPClient implements the client side of HTTP standards
 License:        ASL 2.0 and (ASL 2.0 or LGPLv2+)
+URL:            http://jakarta.apache.org/commons/httpclient/
+Epoch:          1
 Source0:        http://archive.apache.org/dist/httpcomponents/commons-httpclient/source/commons-httpclient-3.1-src.tar.gz
 Source1:        http://repo.maven.apache.org/maven2/commons-httpclient/commons-httpclient/%{version}/commons-httpclient-%{version}.pom
 Patch0:         %{name}-disablecryptotests.patch
@@ -45,20 +16,18 @@ Patch2:         %{name}-encoding.patch
 # CVE-2012-5783: missing connection hostname check against X.509 certificate name
 # https://fisheye6.atlassian.com/changelog/httpcomponents?cs=1422573
 Patch3:         %{name}-CVE-2012-5783.patch
-URL:            http://jakarta.apache.org/commons/httpclient/
-Group:          Development/Libraries
+
 BuildArch:      noarch
 
 BuildRequires:  jpackage-utils >= 0:1.5
 BuildRequires:  ant
 BuildRequires:  apache-commons-codec
 BuildRequires:  apache-commons-logging >= 0:1.0.3
-#BuildRequires:  java-javadoc
 BuildRequires:  apache-commons-logging-javadoc
+BuildRequires:  java-javadoc
 BuildRequires:  junit
 
 Requires:       java-headless
-Requires:       jpackage-utils
 Requires:       apache-commons-logging >= 0:1.0.3
 Requires:       apache-commons-codec
 
@@ -87,15 +56,12 @@ for distributed communication.
 
 %package        javadoc
 Summary:        Javadoc for %{name}
-Group:          Documentation
-Requires:       jpackage-utils
 
 %description    javadoc
 %{summary}.
 
 %package        demo
 Summary:        Demos for %{name}
-Group:          Development/Tools
 Requires:       %{name} = %{epoch}:%{version}-%{release}
 
 %description    demo
@@ -103,7 +69,6 @@ Requires:       %{name} = %{epoch}:%{version}-%{release}
 
 %package        manual
 Summary:        Manual for %{name}
-Group:          Documentation
 Requires:       %{name}-javadoc = %{epoch}:%{version}-%{release}
 
 %description    manual
@@ -135,6 +100,8 @@ pushd src
     rm tempf
 popd
 
+%mvn_file ":{*}" jakarta- at 1 "@1" commons-%{short_name}3
+
 %build
 ant \
   -Dbuild.sysclasspath=first \
@@ -145,42 +112,25 @@ ant \
   -Djavac.encoding=UTF-8 \
   dist test
 
-
 %install
-# jars
-mkdir -p $RPM_BUILD_ROOT%{_javadir}
-cp -p dist/commons-httpclient.jar \
-  $RPM_BUILD_ROOT%{_javadir}/%{name}.jar
-# compat symlink
-pushd $RPM_BUILD_ROOT%{_javadir}
-ln -s jakarta-commons-httpclient.jar commons-httpclient3.jar
-ln -s jakarta-commons-httpclient.jar commons-httpclient.jar
-popd
-
-# javadoc
-mkdir -p $RPM_BUILD_ROOT%{_javadocdir}
-mv dist/docs/api $RPM_BUILD_ROOT%{_javadocdir}/%{name}
+%mvn_artifact %{SOURCE1} dist/commons-httpclient.jar
+%mvn_install -J dist/docs/api
 
 # demo
 mkdir -p $RPM_BUILD_ROOT%{_datadir}/%{name}
 cp -pr src/examples src/contrib $RPM_BUILD_ROOT%{_datadir}/%{name}
 
 # manual and docs
-rm -f dist/docs/{BUILDING,TESTING}.txt
-ln -s %{_javadocdir}/%{name}-%{version} dist/docs/apidocs
+rm -Rf dist/docs/{api,BUILDING.txt,TESTING.txt}
+ln -s %{_javadocdir}/%{name} dist/docs/apidocs
 
-# maven POM and depmap
-install -d -m 755 $RPM_BUILD_ROOT%{_mavenpomdir}
-install -p -m 644 %{SOURCE1} $RPM_BUILD_ROOT%{_mavenpomdir}/JPP-%{name}.pom
-%add_maven_depmap
 
 %files -f .mfiles
 %doc LICENSE NOTICE
 %doc README RELEASE_NOTES
 
-%files javadoc
+%files javadoc -f .mfiles-javadoc
 %doc LICENSE NOTICE
-%doc %{_javadocdir}/%{name}
 
 %files demo
 %{_datadir}/%{name}
@@ -190,6 +140,9 @@ install -p -m 644 %{SOURCE1} $RPM_BUILD_ROOT%{_mavenpomdir}/JPP-%{name}.pom
 
 
 %changelog
+* Wed May 21 2014 Michal Srb <msrb at redhat.com> - 1:3.1-17
+- Adapt to current guidelines
+
 * Wed May 21 2014 Michal Srb <msrb at redhat.com> - 1:3.1-16
 - Migrate to mfiles
 


More information about the scm-commits mailing list