From 91f01486c5069b5ebe90852c6be17cb7845393f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppi...@redhat.com> Date: Fri, 18 Mar 2016 14:43:14 +0100 Subject: Modernize spec file
--- perl-Gtk2-Spell.spec | 75 ++++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 58 insertions(+), 17 deletions(-) diff --git a/perl-Gtk2-Spell.spec b/perl-Gtk2-Spell.spec index 71bd77a..b333da9 100644 --- a/perl-Gtk2-Spell.spec +++ b/perl-Gtk2-Spell.spec @@ -1,31 +1,62 @@ +%global use_x11_tests 1 + Name: perl-Gtk2-Spell Version: 1.04 -Release: 12%{?dist} +Release: 13%{?dist} Summary: Gtk2::Spell perl module Group: Development/Libraries License: LGPLv2+ URL: http://search.cpan.org/dist/Gtk2-Spell/ Source0: http://search.cpan.org/CPAN/authors/id/T/TS/TSCH/Gtk2-Spell-%{version}.tar.gz +BuildRequires: findutils BuildRequires: gtk2-devel BuildRequires: gtkspell-devel -# For when tests are enabled -#BuildRequires: perl(constant) +BuildRequires: make +BuildRequires: perl +BuildRequires: perl-devel +BuildRequires: perl(Cwd) BuildRequires: perl(ExtUtils::Depends) +BuildRequires: perl(ExtUtils::MakeMaker) BuildRequires: perl(ExtUtils::PkgConfig) -BuildRequires: perl(Glib) +BuildRequires: perl(File::Spec) +BuildRequires: perl(Glib) >= 1.24 BuildRequires: perl(Glib::MakeHelper) -BuildRequires: perl(Gtk2) +BuildRequires: perl(Gtk2) >= 1.00 BuildRequires: perl(Gtk2::CodeGen) +BuildRequires: pkgconfig(gtkspell-2.0) >= 2.0.0 +%if %{use_x11_tests} +# Run-time: +BuildRequires: perl(DynaLoader) +BuildRequires: perl(strict) +BuildRequires: perl(warnings) +%endif +# Tests: BuildRequires: perl(Test::More) -Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) +%if %{use_x11_tests} +BuildRequires: font(:lang=en) +BuildRequires: perl(constant) +BuildRequires: xorg-x11-server-Xvfb +%endif +Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version)) +Requires: perl(Gtk2) >= 1.00 %{?perl_default_filter} +# Remove under-specified dependencies +%global __requires_exclude %{?__requires_exclude:%{__requires_exclude}|}^perl\\(Gtk2\\)$ %description Perl bindings to GtkSpell, used in concert with Gtk2::TextView. Provides mis-spelled word highlighting in red and offers a right click pop-up menu with suggested corrections. +%package devel +Summary: XS support for Gtk2::Spell +Requires: %name = %{?epoch:%{epoch}:}%{version}-%{release} +Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version)) +Requires: pkgconfig(gtkspell-2.0) >= 2.0.0 + +%description devel + %prep %setup -q -n Gtk2-Spell-%{version} @@ -34,24 +65,34 @@ perl Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}" make %{?_smp_mflags} %install -make pure_install PERL_INSTALL_ROOT=%{buildroot} -find %{buildroot} -type f -name .packlist -exec rm -f {} ';' -find %{buildroot} -type f -name '*.bs' -a -size 0 -exec rm -f {} ';' -find %{buildroot} -type d -depth -exec rmdir {} 2>/dev/null ';' -chmod -R u+w %{buildroot}/* +make pure_install DESTDIR=%{buildroot} +find %{buildroot} -type f -name .packlist -delete +find %{buildroot} -type f -name '*.bs' -a -size 0 -delete +%{_fixperms} %{buildroot}/* %check -# We do not run make test, as it requires an active X11-session. I rather -# suspect this won't work under mock/plague :) -#make test +%if %{use_x11_tests} + xvfb-run -a make test +%else + make test +%endif %files -%doc README gtkspell_simple.pl AUTHORS LICENSE ChangeLog NEWS -%{perl_vendorarch}/auto/Gtk2/* -%{perl_vendorarch}/Gtk2/* +%license LICENSE +%doc README gtkspell_simple.pl AUTHORS ChangeLog NEWS +%{perl_vendorarch}/auto/Gtk2 +%{perl_vendorarch}/Gtk2 +%exclude %{perl_vendorarch}/Gtk2/Spell/Install %{_mandir}/man3/*.3* +%files devel +%{perl_vendorarch}/Gtk2/Spell/Install + %changelog +* Fri Mar 18 2016 Petr Pisar <ppi...@redhat.com> - 1.04-13 +- Modernize spec file +- Move header files into devel sub-package + * Thu Feb 04 2016 Fedora Release Engineering <rel...@fedoraproject.org> - 1.04-12 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild -- cgit v0.12 http://pkgs.fedoraproject.org/cgit/perl-Gtk2-Spell.git/commit/?h=master&id=91f01486c5069b5ebe90852c6be17cb7845393f9 -- Fedora Extras Perl SIG http://www.fedoraproject.org/wiki/Extras/SIGs/Perl perl-devel mailing list perl-de...@lists.fedoraproject.org http://lists.fedoraproject.org/admin/lists/perl-de...@lists.fedoraproject.org