File perl-User-Utmp.spec of Package perl-User-Utmp
Name: perl-User-Utmp
Version: 1.8
Release: 1
License: GPL
Group: Development/Libraries/Perl
Summary: Perl module User::Utmp
Summary(de): Perlmodul User::Utmp
URL: http://search.cpan.org/~mpiotr/
Source0: User-Utmp-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Packager: Carsten Schoene <cs@linux-administrator.com>
Vendor: linux-administrator.com
BuildRequires: glibc-devel libgcc gcc gcc-c++ perl
%if 0%{?fedora_version} >= 7
BuildRequires: perl-ExtUtils-MakeMaker
%endif
%description
This module provides a Perl interface to utmpx- and utmp-style
databases on UNIX systems, the most important being "the utmpx file"
(typically found at /var/run/utmpx, /etc/utmpx or a similar location),
which provides information about users currently logged in. There is
also support for writing records to utmpx and utmp files. For further
details see the POD documentation embedded in the file Utmp.pm, which
will also be installed as User::Utmp(3) manpage, and the example.pl
script.
%prep
%setup -q -n User-Utmp-%{version}
perl Makefile.PL
%__make
%makeinstall DESTDIR=$RPM_BUILD_ROOT
%if 0%{?suse_version}
%perl_process_packlist
%else
find $RPM_BUILD_ROOT -name perllocal.pod -exec rm {} \; >/dev/null
%endif
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 's,^\.,\%attr(-\,root\,root) ,' >> $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 $RPM_BUILD_DIR/%{name}*
%if 0%{?suse_version}
%files
%doc Changes README
/usr/share/man/man3/*
/var/adm/perl-modules/perl-User-Utmp
%ifarch %ix86
%{perl_sitelib}/i586-linux-thread-multi
%endif
%ifarch x86_64
%{perl_sitelib}/x86_64-linux-thread-multi
%endif
%else
%files -f ../file.list.%{name}
%endif
%changelog
* Tue Mar 06 2007 Carsten Schoene <cs@linux-administrator.com>
- initial build of User::Utmp perl package.