75 lines
2.3 KiB
RPMSpec
75 lines
2.3 KiB
RPMSpec
%define name PerlTk
|
|
%define tarball Tk800.015
|
|
%define version 8.15
|
|
%define release 1
|
|
|
|
%define builddir $RPM_BUILD_DIR/%{tarball}
|
|
|
|
Summary: Tk modules for Perl
|
|
Name: %{name}
|
|
Version: %{version}
|
|
Release: %{release}
|
|
Copyright: distributable
|
|
Group: Utilities/Text
|
|
Vendor: Nick Ing-Simmons <nick@ni-s.u-net.com>
|
|
Packager: Troy Engel <tengel@sonic.net>
|
|
URL: http://www.personal.u-net.com/~ni-s
|
|
BuildRoot: /tmp/%{name}-%{version}-root
|
|
Source0: http://www.perl.com/CPAN/authors/id/NI-S/%{tarball}.tar.gz
|
|
Source1: frf.tar.gz
|
|
Provides: perl/tk ptk pTk
|
|
Requires: perl >= 5.0
|
|
|
|
%description
|
|
This package provides the modules and Tk code for Perl/Tk, as written by Nick
|
|
Ing-Simmons (pTk), John Ousterhout(Tk), and Ioi Kim Lam(Tix). It gives you
|
|
the ability to develop perl applications using the Tk GUI. It includes the
|
|
source code for the Tk and Tix elements it uses. The licences for the various
|
|
components differ, so check the copyright.
|
|
|
|
%prep
|
|
touch `find . -type f`
|
|
|
|
%setup -n %{tarball} -b 1
|
|
# Fix to make scripts compatible with perl RPM (installs as /usr/bin/perl not local).
|
|
# Note: the order of these two lines is important.
|
|
find . | ../frf/rfrind "/usr/local/bin/perl5" "/usr/bin/perl" .
|
|
find . | ../frf/rfrind "/usr/local/bin/perl" "/usr/bin/perl" .
|
|
perl Makefile.PL
|
|
|
|
# Fix for MakeMaker to allow non-root building of package.
|
|
find . -name Makefile | ../frf/frf "PREFIX = /usr" "PREFIX = $RPM_BUILD_ROOT/usr"
|
|
find . -name Makefile | ../frf/frf "INSTALLMAN1DIR = /usr/man/man1" 'INSTALLMAN1DIR = $(PREFIX)/man/man1'
|
|
|
|
touch `find . -type f`
|
|
|
|
|
|
%build
|
|
make
|
|
|
|
|
|
%install
|
|
rm -rf $RPM_BUILD_ROOT
|
|
install -d $RPM_BUILD_ROOT/usr/lib/perl5/man/man1
|
|
install -d $RPM_BUILD_ROOT/usr/lib/perl5/man/man3
|
|
install -d $RPM_BUILD_ROOT/usr/man/man1
|
|
make install
|
|
|
|
cd $RPM_BUILD_ROOT
|
|
find . -type d | sed '1,2d;s,^\.,\%attr(-\,root\,root) \%dir ,' > \
|
|
$RPM_BUILD_DIR/file.list.%{name}
|
|
find . -type f | sed -e 's,^\.,\%attr(-\,root\,root) ,' \
|
|
-e '/\/config\//s|^|%config|' >> \
|
|
$RPM_BUILD_DIR/file.list.%{name}
|
|
find . -type l | sed 's,^\.,\%attr(-\,root\,root) ,' >> \
|
|
$RPM_BUILD_DIR/file.list.%{name}
|
|
|
|
|
|
%clean
|
|
rm -rf $RPM_BUILD_ROOT
|
|
rm -rf %{builddir}
|
|
rm -f $RPM_BUILD_DIR/file.list.%{name}
|
|
|
|
|
|
%files -f ../file.list.%{name}
|
|
%attr(-,root,root) %doc COPYING Change* Funcs.doc INSTALL README* ToDo Contrib/
|