[perl-Gtk2-Notify] Modernize spec file

Petr Pisar ppisar at fedoraproject.org
Thu Aug 21 09:31:46 UTC 2014


commit 16cd7564150abe64d93121f271375d1d5287366b
Author: Petr Písař <ppisar at redhat.com>
Date:   Wed Aug 20 14:15:18 2014 +0200

    Modernize spec file

 perl-Gtk2-Notify.spec |   74 ++++++++++++++++++++++++-------------------------
 1 files changed, 36 insertions(+), 38 deletions(-)
---
diff --git a/perl-Gtk2-Notify.spec b/perl-Gtk2-Notify.spec
index 04773ca..47c97f4 100644
--- a/perl-Gtk2-Notify.spec
+++ b/perl-Gtk2-Notify.spec
@@ -1,36 +1,39 @@
 Name:           perl-Gtk2-Notify
 Version:        0.05
-Release:        21%{?dist}
+Release:        22%{?dist}
 Summary:        Perl interface to libnotify
 License:        LGPLv2+
 Group:          Development/Libraries
 URL:            http://search.cpan.org/dist/Gtk2-Notify/
-Source0:        http://www.cpan.org/modules/by-module/Gtk2/Gtk2-Notify-%{version}.tar.gz
-#Source0: http://search.cpan.org/CPAN/authors/id/F/FL/FLORA/Gtk2-Notify-%{version}.tar.gz
-BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+Source0:        http://search.cpan.org/CPAN/authors/id/F/FL/FLORA/Gtk2-Notify-%{version}.tar.gz
 Patch0:         libnotify.patch
-# non-perl
+# gtk2-devel needed for <gtk2perl.h> from perl-Gtk2
+BuildRequires:  gtk2-devel
 BuildRequires:  libnotify-devel
-# core
-BuildRequires:  perl(ExtUtils::MakeMaker)
+BuildRequires:  perl
+BuildRequires:  perl(base)
+BuildRequires:  perl(ExtUtils::Depends)
+BuildRequires:  perl(ExtUtils::PkgConfig)
+BuildRequires:  perl(File::Spec::Functions)
+BuildRequires:  perl(Glib::MakeHelper)
+BuildRequires:  perl(Gtk2::CodeGen)
+BuildRequires:  perl(inc::Module::Install)
+BuildRequires:  perl(lib)
+BuildRequires:  perl(strict)
+BuildRequires:  perl(warnings)
+# Run-time:
+BuildRequires:  perl(Carp)
+BuildRequires:  perl(DynaLoader)
+BuildRequires:  perl(Gtk2)
+# Tests:
+BuildRequires:  perl(Glib) >= 1.093
+BuildRequires:  perl(Gtk2::TestHelper)
+BuildRequires:  perl(Test::Exception)
 BuildRequires:  perl(Test::More)
-# cpan
-BuildRequires:  perl(Glib) >= 1.093, perl(Gtk2), perl(Glib::MakeHelper)
-BuildRequires:  perl(ExtUtils::Depends), perl(ExtUtils::PkgConfig)
-
-# for tests...
-%{?_with_display_tests:BuildRequires:  perl(Test::Pod::Coverage) >= 1.04, perl(Test::Pod) >= 1.14}
-%{?_with_display_tests:BuildRequires:  perl(Test::Exception)}
-
-# libnotify-devel seems to be missing this.  see BZ#216946
-BuildRequires:  gtk2-devel
-
-Requires:       perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
-
-# don't "provide" private Perl libs
-%global _use_internal_dependency_generator 0
-%global provfind /bin/sh -c "grep -v '%perl_vendorarch.*\\.so$' | %__find_provides"
-%global __find_provides %provfind
+# Optional tests:
+BuildRequires:  perl(Test::Pod) >= 1.14
+Requires:       perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
+Requires:       perl(Carp)
 
 %description
 Perl bindings to libnotify.  This module will allow one to use the notify
@@ -39,39 +42,34 @@ functionality from within a perl application.
 %prep
 %setup -q -n Gtk2-Notify-%{version}
 %patch0 -p1
-
-find t/ -type f -exec perl -pi -e 's|^#!perl|#!/usr/bin/perl|' {} +
+# Remove bundled module
+rm -r ./inc/*
+sed -i -e '/^inc\//d' MANIFEST
 
 %build
-%{__perl} Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}"
+perl Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}"
 make %{?_smp_mflags}
 
 %install
-rm -rf %{buildroot}
-
-make pure_install PERL_INSTALL_ROOT=%{buildroot}
-
+make pure_install DESTDIR=%{buildroot}
 find %{buildroot} -type f -name .packlist -exec rm -f {} \;
 find %{buildroot} -type f -name '*.bs' -size 0 -exec rm -f {} \;
-find %{buildroot} -depth -type d -exec rmdir {} 2>/dev/null \;
-
 %{_fixperms} %{buildroot}/*
 
 %check
 # tests mostly bomb under mock, unfortunately
 %{?_with_display_tests: DISPLAY=:0 make test}
 
-%clean
-rm -rf %{buildroot}
-
 %files
-%defattr(-,root,root,-)
-%doc Changes README examples/ t/
+%doc Changes examples README
 %{perl_vendorarch}/auto/*
 %{perl_vendorarch}/Gtk2*
 %{_mandir}/man3/*
 
 %changelog
+* Wed Aug 20 2014 Petr Pisar <ppisar at redhat.com> - 0.05-22
+- Modernize spec file
+
 * Sun Aug 17 2014 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.05-21
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
 


More information about the scm-commits mailing list