[perl-MIME-tools] Spec file clean-up

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



commit 13ea9f5d7ca5ebe04ae549343472df4add6b832f
Author: Paul Howarth <paul@xxxxxxxxxxxx>
Date:   Wed Oct 26 13:40:58 2011 +0100

    Spec file clean-up
    
    - Use patch rather than scripted iconv to fix character encoding
    - Use DESTDIR rather than PERL_INSTALL_ROOT
    - Nobody else likes macros for commands
    - Use %{_fixperms} macro rather than our own chmod incantation
    - Explicitly specify all manpages in %files list

 MIME-tools-5.502-UTF8.patch |   11 ++++++
 perl-MIME-tools.spec        |   77 +++++++++++++++++++++++++++---------------
 2 files changed, 60 insertions(+), 28 deletions(-)
---
diff --git a/MIME-tools-5.502-UTF8.patch b/MIME-tools-5.502-UTF8.patch
new file mode 100644
index 0000000..c5d1871
--- /dev/null
+++ b/MIME-tools-5.502-UTF8.patch
@@ -0,0 +1,11 @@
+--- MIME-tools/ChangeLog
++++ MIME-tools/ChangeLog
+@@ -213,7 +213,7 @@
+ 	* Added MIME::Parser->decode_bodies method.  This lets you force
+ 	MIME::Tools to store body parts WITHOUT decoding them.  Useful
+ 	if you need the exact unmangled message source (for example,
+-	for GPG-signing.)  Patch submitted by J�Reder.
++	for GPG-signing.)  Patch submitted by Jörn Reder.
+ 
+ 5.418     2005-09-29  David F. Skoll  <dfs@xxxxxxxxxxxxxxxxxx>
+ 
diff --git a/perl-MIME-tools.spec b/perl-MIME-tools.spec
index 629c5c6..fc3961a 100644
--- a/perl-MIME-tools.spec
+++ b/perl-MIME-tools.spec
@@ -1,11 +1,12 @@
 Summary:	Modules for parsing and creating MIME entities in Perl
 Name:		perl-MIME-tools
 Version:	5.502
-Release:	3%{?dist}
+Release:	4%{?dist}
 Group:		Development/Libraries
 License:	GPL+ or Artistic
 URL:		http://search.cpan.org/dist/MIME-tools/
 Source0:	http://search.cpan.org/CPAN/authors/id/D/DS/DSKOLL/MIME-tools-%{version}.tar.gz
+Patch0:		MIME-tools-5.502-UTF8.patch
 BuildRequires:	perl(ExtUtils::MakeMaker)
 BuildRequires:	perl(File::Path)	>= 1
 BuildRequires:	perl(File::Spec)	>= 0.6
@@ -24,8 +25,8 @@ BuildRequires:	perl(Test::Pod)
 BuildRequires:	perl(Test::Pod::Coverage)
 BuildRequires:	perl(Test::Kwalitee)
 BuildArch:	noarch
-BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-Requires:	perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
+BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(id -nu)
+Requires:	perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
 
 %description
 MIME-tools - modules for parsing (and creating!) MIME entities. Modules in this
@@ -38,41 +39,40 @@ parser and tool for building your own MIME parser, and utilities.
 %setup -q -n MIME-tools-%{version}
 
 # Fix character encoding
-/usr/bin/iconv -f iso-8859-1 -t utf-8 ChangeLog > ChangeLog.utf8
-%{__mv} ChangeLog.utf8 ChangeLog
+%patch0 -p1
 
 # The more useful examples will go in %%{_bindir}
-%{__mkdir} useful-examples
-%{__mv} examples/mime{dump,encode,explode,postcard,send} useful-examples
+mkdir useful-examples
+mv examples/mime{dump,encode,explode,postcard,send} useful-examples/
 
 %build
-%{__perl} Makefile.PL INSTALLDIRS=vendor --skipdeps
-%{__make} %{?_smp_mflags}
-
-%clean
-%{__rm} -rf %{buildroot}
+perl Makefile.PL INSTALLDIRS=vendor --skipdeps
+make %{?_smp_mflags}
 
 %install
-%{__rm} -rf %{buildroot}
-%{__make} pure_install PERL_INSTALL_ROOT=%{buildroot}
-/usr/bin/find %{buildroot} -type f -name .packlist -exec %{__rm} -f {} ';'
-/usr/bin/find %{buildroot} -depth -type d -exec /bin/rmdir {} ';' 2>/dev/null
-%{__chmod} -R u+w %{buildroot}
+rm -rf %{buildroot}
+make pure_install DESTDIR=%{buildroot}
+find %{buildroot} -type f -name .packlist -exec rm -f {} ';'
+find %{buildroot} -depth -type d -exec rmdir {} ';' 2>/dev/null
+%{_fixperms} %{buildroot}
 
 # Put the more useful examples in %%{_bindir}
-%{__install} -d -m 755 %{buildroot}%{_bindir}
-%{__install} -d -m 755 %{buildroot}%{_mandir}/man1
+install -d -m 755 %{buildroot}%{_bindir}
+install -d -m 755 %{buildroot}%{_mandir}/man1
 cd useful-examples
 for ex in mime*
 do
-	%{__install} -p -m 755 ${ex} %{buildroot}%{_bindir}/
-	/usr/bin/pod2man ${ex} > %{buildroot}%{_mandir}/man1/${ex}.1
+	install -p -m 755 ${ex} %{buildroot}%{_bindir}/
+	pod2man ${ex} > %{buildroot}%{_mandir}/man1/${ex}.1
 done
 cd -
 
 %check
 # POD Coverage test fails due to lots of undocumented routines
-TEST_POD_COVERAGE=0 %{__make} test
+TEST_POD_COVERAGE=0 make test
+
+%clean
+rm -rf %{buildroot}
 
 %files
 %defattr(-,root,root,-)
@@ -90,19 +90,40 @@ TEST_POD_COVERAGE=0 %{__make} test
 %{_mandir}/man1/mimeencode.1*
 %{_mandir}/man1/mimeexplode.1*
 %{_mandir}/man1/mimepostcard.1*
-%{_mandir}/man1/mimesend*
+%{_mandir}/man1/mimesend.1*
 %{_mandir}/man3/MIME::Body.3pm*
-%{_mandir}/man3/MIME::Decoder*
+%{_mandir}/man3/MIME::Decoder.3pm*
+%{_mandir}/man3/MIME::Decoder::Base64.3pm*
+%{_mandir}/man3/MIME::Decoder::BinHex.3pm*
+%{_mandir}/man3/MIME::Decoder::Binary.3pm*
+%{_mandir}/man3/MIME::Decoder::Gzip64.3pm*
+%{_mandir}/man3/MIME::Decoder::NBit.3pm*
+%{_mandir}/man3/MIME::Decoder::QuotedPrint.3pm*
+%{_mandir}/man3/MIME::Decoder::UU.3pm*
 %{_mandir}/man3/MIME::Entity.3pm*
-%{_mandir}/man3/MIME::Field::*
+%{_mandir}/man3/MIME::Field::ConTraEnc.3pm*
+%{_mandir}/man3/MIME::Field::ContDisp.3pm*
+%{_mandir}/man3/MIME::Field::ContType.3pm*
+%{_mandir}/man3/MIME::Field::ParamVal.3pm*
 %{_mandir}/man3/MIME::Head.3pm*
-%{_mandir}/man3/MIME::Parser*
+%{_mandir}/man3/MIME::Parser.3pm*
+%{_mandir}/man3/MIME::Parser::Filer.3pm*
+%{_mandir}/man3/MIME::Parser::Reader.3pm*
+%{_mandir}/man3/MIME::Parser::Results.3pm*
 %{_mandir}/man3/MIME::Tools.3pm*
-%{_mandir}/man3/MIME::Word*
+%{_mandir}/man3/MIME::WordDecoder.3pm*
+%{_mandir}/man3/MIME::Words.3pm*
 
 %changelog
+* Wed Oct 26 2011 Paul Howarth <paul@xxxxxxxxxxxx> - 5.502-4
+- Use patch rather than scripted iconv to fix character encoding
+- Use DESTDIR rather than PERL_INSTALL_ROOT
+- Nobody else likes macros for commands
+- Use %%{_fixperms} macro rather than our own chmod incantation
+- Explicitly specify all manpages in %%files list
+
 * Wed Oct 26 2011 Marcela Mašláňová <mmaslano@xxxxxxxxxx> - 5.502-3
-- own only man pages of this packages (conflict with Perl package)
+- Own only man pages of this packages (conflict with Perl package)
 
 * Wed Jul 20 2011 Petr Sabata <contyk@xxxxxxxxxx> - 5.502-2
 - Perl mass rebuild
--
Fedora Extras Perl SIG
http://www.fedoraproject.org/wiki/Extras/SIGs/Perl
perl-devel mailing list
perl-devel@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/perl-devel

[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Legacy Announce]     [Fedora PHP Devel]     [Kernel Devel]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Big List of Linux Books]     [Gimp]     [Yosemite Information]
  Powered by Linux