Request for Review: perl-Tk

Ville Skyttä ville.skytta at iki.fi
Wed Jun 15 19:04:55 UTC 2005


On Wed, 2005-06-15 at 07:56 +0200, Andreas Bierfert wrote:
> Steven Pritchard wrote:

> > And just think, Ville and Jose are the picky ones...  ;-)
> 
> Ok maybe they did not notice...yet ;)

Sure did, but didn't find time to look into it until now.  Here goes: ;)

I had packaged this locally too, here's a summary of what is in my
specfile but not in Andreas's latest, and some other random comments
(from skimming the specfiles, not actually tested).  See attached
specfile for more info.

perl(:MODULE_COMPAT_*) should be enough for the install time dependency,
no need for explicit versioned "Requires: perl >= 3:5.8.3" if you like
(as long as the versioned build dependency is there).

BuildRequires: tk-devel missing?

My specfile has in %prep:
chmod -x pod/Popup.pod Tixish/lib/Tk/balArrow.xbm

The LD_RUN_PATH stuff is generally needed for < FC2 arch-dependent
specfiles.  But IIRC I packaged this initially for FC3, and I still had
it in (and unlike your specfile, I applied the hack to all Makefiles in
the build perl-Tk build tree), so it could be something different.  If
you have fedora-rpmdevtools installed and check-rpaths and friends in
your ~/.rpmmacros' %__arch_install_post, it will complain about spurious
RPATHs if any are present at end of %install.

I think there's no need to install demos in the perl vendor install dirs
(nor own the "auto" dir or include fix_4_os2.pl or reindex.pl).  I
installed the demos as %doc, along with more license files, see
attachment.
-------------- next part --------------
%{!?perl_vendorarch: %define perl_vendorarch %(eval "`%{__perl} -V:installvendorarch`"; echo $installvendorarch)}

Name:           perl-Tk
Version:        804.027
Release:        0.fdr.1
Epoch:          0
Summary:        Perl bindings to the Tk GUI toolkit

Group:          Development/Libraries
License:        GPL or Artistic
URL:            http://www.perltk.org/
Source0:        http://www.cpan.org/authors/id/N/NI/NI-S/Tk-804.027.tar.gz
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildRequires:  perl >= 1:5.8.0, tk-devel, libjpeg-devel, libpng-devel
Requires:  perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
# Hack for Tk/LabRadio.pm -> "package Tk::LabRadiobutton"
Provides:       perl(Tk::LabRadio)

%description
%{summary}.


%prep
%setup -q -n Tk-%{version}
grep -rl '#!/.*bin/perl' * \
| xargs %{__perl} -pi -e 's|#!/.*bin/perl\S*|#!%{__perl}|'
chmod -x pod/Popup.pod Tixish/lib/Tk/balArrow.xbm


%build
CFLAGS="$RPM_OPT_FLAGS" %{__perl} Makefile.PL INSTALLDIRS=vendor XFT=1
find . -name Makefile | xargs %{__perl} -pi -e 's/^\tLD_RUN_PATH=[^\s]+\s*/\t/'
make %{?_smp_mflags} OPTIMIZE="$RPM_OPT_FLAGS"


%install
rm -rf $RPM_BUILD_ROOT __demos
make pure_install PERL_INSTALL_ROOT=$RPM_BUILD_ROOT
find $RPM_BUILD_ROOT -type f -name .packlist -exec rm -f {} ';'
find $RPM_BUILD_ROOT -type f -name '*.bs' -a -size 0 -exec rm -f {} ';'
find $RPM_BUILD_ROOT -type d -depth -exec rmdir {} 2>/dev/null ';'
chmod -R u+w $RPM_BUILD_ROOT/*
mkdir __demos
cp -pR $RPM_BUILD_ROOT%{perl_vendorarch}/Tk/demos __demos


%check || :
# make test # needs X11 (see also README for known Red Hat and Fedora issues)


%clean
rm -rf $RPM_BUILD_ROOT


%files
%defattr(-,root,root,-)
%doc Change* COPYING README README.linux ToDo pTk/*license* __demos/demos
%{_bindir}/*
%{perl_vendorarch}/auto/Tk
%{perl_vendorarch}/T*
%exclude %{perl_vendorarch}/fix_4_os2.pl
%exclude %{perl_vendorarch}/Tk/demos
%exclude %{perl_vendorarch}/Tk/reindex.pl
%{_mandir}/man[13]/*.[13]*


%changelog
* Wed Aug 18 2004 Ville Skytt?? <ville.skytta at iki.fi> - 0:804.027-0.fdr.1
- First build.


More information about the fedora-extras-list mailing list