[perl-libwhisker2/f12/master] 2.5 bump

Petr Pisar ppisar at fedoraproject.org
Wed Aug 11 15:08:23 UTC 2010


commit 685323ee4882759457136b7725cf7fe11a484520
Author: Petr Písař <ppisar at redhat.com>
Date:   Wed Aug 11 16:59:28 2010 +0200

    2.5 bump
    
    License changed to BSD, documentation in separated subpackage

 .gitignore                      |    1 +
 libwhisker2-2.4-lw1bridge.patch |    7 ---
 perl-libwhisker2.spec           |   89 +++++++++++++++++++++++++++++++-------
 sources                         |    2 +-
 4 files changed, 74 insertions(+), 25 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 8b3e494..17dfd4c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
 libwhisker2-2.4.tar.gz
+libwhisker2-2.5.tar.gz
diff --git a/libwhisker2-2.4-lw1bridge.patch b/libwhisker2-2.4-lw1bridge.patch
index 925da09..dcbe142 100644
--- a/libwhisker2-2.4-lw1bridge.patch
+++ b/libwhisker2-2.4-lw1bridge.patch
@@ -1,10 +1,3 @@
---- libwhisker2-2.4/compat/LW.pm.orig	2007-05-08 16:00:52.000000000 +0200
-+++ libwhisker2-2.4/compat/LW.pm	2007-05-08 16:01:24.000000000 +0200
-@@ -1,3 +1,4 @@
-+#!/usr7bin/perl
- #
- # This is a compatiblity 'bridge' which will translate the
- # libwhisker 2.x API into libwhisker 1.x format.  This should
 --- libwhisker2-2.4/Makefile.orig	2007-05-08 16:02:49.000000000 +0200
 +++ libwhisker2-2.4/Makefile	2007-05-08 16:02:21.000000000 +0200
 @@ -11,6 +11,7 @@ build:
diff --git a/perl-libwhisker2.spec b/perl-libwhisker2.spec
index 8f0d2c8..1f7ebcc 100644
--- a/perl-libwhisker2.spec
+++ b/perl-libwhisker2.spec
@@ -1,34 +1,73 @@
-Name:           perl-libwhisker2
+%define real_name libwhisker2
+Name:           perl-%{real_name}
 Obsoletes:      perl-libwhisker <= 1.8
 Provides:       perl-libwhisker = %{version}-%{release}
-Version:        2.4
-Release:        6%{?dist}
-Summary:        Perl module geared specificly for HTTP testing
+Version:        2.5
+Release:        1%{?dist}
+Summary:        Perl module geared specifically for HTTP testing
 
 Group:          Development/Libraries
-License:        GPLv2+
+License:        BSD
 URL:            http://www.wiretrip.net/rfp/lw.asp
-Source0:        http://www.wiretrip.net/rfp/libwhisker/libwhisker2-%{version}.tar.gz
+Source0:        http://www.wiretrip.net/rfp/libwhisker/%{real_name}-%{version}.tar.gz
 #install to vendorlib, not sitelib
-Patch0:         libwhisker2-2.4-vendorlib.patch
+Patch0:         %{real_name}-2.4-vendorlib.patch
 #include libwhisker1 compatibility bridge
-Patch1:         libwhisker2-2.4-lw1bridge.patch
+Patch1:         %{real_name}-2.4-lw1bridge.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 BuildArch:      noarch
 
 BuildRequires:  perl
-Requires:       perl(Net::SSLeay), openssl-perl  
-Requires:       perl(MD5)
+BuildRequires:  perl(Digest::MD5)
+BuildRequires:  perl(IO::Socket)
+BuildRequires:  perl(MIME::Base64)
+BuildRequires:  perl(Net::SSLeay)
+BuildRequires:  perl(POSIX)
+BuildRequires:  perl(Socket)
+BuildRequires:  perl(Test::Simple)
+# All SSL and network related packages are optional at run time.
 Requires:       perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
 
 %description
-Libwhisker is a Perl module geared specificly for HTTP testing.
+Libwhisker is a Perl library useful for HTTP testing scripts.  It
+contains a pure-Perl implementation of functionality found in the LWP,
+URI, Digest::MD5, Digest::MD4, Data::Dumper, Authen::NTLM, HTML::Parser,
+HTML::FormParser, CGI::Upload, MIME::Base64, and GetOpt::Std modules.
+Libwhisker is designed to be portable (a single perl file), fast (general
+benchmarks show libwhisker is faster than LWP), and flexible (great care
+was taken to ensure the library does exactly what you want to do, even
+if it means breaking the protocol).
+
+%package doc
+Summary:        Development documentation for %{name}
+Group:          Documentation
+Requires:       %{name} = %{version}-%{release}
+BuildArch:      noarch
+
+%description doc
+Examples how to use LW(2) Perl module.
+
 
 %prep
-%setup -qn libwhisker2-%{version}
+%setup -qn %{real_name}-%{version}
 %patch0 -p1
 %patch1 -p1
+mv compat/{lw,LW}.pm
+# Fix EOLs
+for F in CHANGES KNOWNBUGS LICENSE README docs/* scripts/*; do
+    sed -e 's/\r$//' "$F" > "${F}.new"
+    touch -r "$F"{,.new}
+    mv "$F"{.new,}
+done
+# Fix interpreter path
+for F in scripts/*.pl; do
+    sed -e '1 s|^#!perl|#!/usr/bin/perl|' "$F" > "${F}.new"
+    chmod a+x "${F}.new"
+    touch -r "$F"{,.new}
+    mv "$F"{.new,}
+done
+
 
 %build
 make %{?_smp_mflags}
@@ -36,18 +75,22 @@ make %{?_smp_mflags}
 
 %install
 rm -rf $RPM_BUILD_ROOT
-#create directories, not created by Makefile.pl
+# Create directories, not created by Makefile.pl
 mkdir -p $RPM_BUILD_ROOT%{perl_vendorlib}
 mkdir -p $RPM_BUILD_ROOT%{_mandir}/man3
 
 make install DESTDIR=$RPM_BUILD_ROOT
 
+# Install documentation
+mkdir -p $RPM_BUILD_ROOT%{_datadir}/%{name}
+cp -a docs scripts $RPM_BUILD_ROOT%{_datadir}/%{name}
+
 #fix permissions
 chmod 0644 $RPM_BUILD_ROOT/%{perl_vendorlib}/*
 
-#%check
-#cd t 
-#perl ./test.pl
+%check
+cd t 
+perl ./test.pl
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -55,11 +98,23 @@ rm -rf $RPM_BUILD_ROOT
 
 %files
 %defattr(-,root,root,-)
-%doc CHANGES LICENSE README
+%doc CHANGES KNOWNBUGS LICENSE README
 %{perl_vendorlib}/*
 %{_mandir}/man?/*
 
+%files doc
+%defattr(-,root,root,-)
+%{_datadir}/%{name}
+
+
 %changelog
+* Wed Aug 11 2010 Petr Pisar <ppisar at redhat.com> - 2.5-1
+- 2.5 bump
+- License changed from to 2-clause-BSD
+- Remove optional Requires.
+- Enable tests
+- Distribute developer examples in `doc' subpackage
+
 * Sun Jul 26 2009 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 2.4-6
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
 
diff --git a/sources b/sources
index 7a1f1f0..c5aaf13 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-bdc618fa52bee38171c12e00bd99e18d  libwhisker2-2.4.tar.gz
+7cc1718dddde8f9a439d5622ae2f37eb  libwhisker2-2.5.tar.gz


More information about the scm-commits mailing list