# Copyright (C) 2001-2004 Daniel Berrange # # $Id: Config-Record.spec.PL,v 1.1 2004/02/10 19:03:50 dan Exp $ use strict; use vars qw($VERSION $RELEASE); die unless (scalar @ARGV == 1); unless (do 'lib/Config/Record.pm') { if ($@) { die $@ }; die "lib/Config/Record.pm: $!"; } local $/ = undef; $_ = ; s/\@VERSION\@/$Config::Record::VERSION/g; s/\@RELEASE\@/$Config::Record::RELEASE/g; open SPEC, ">$ARGV[0]" or die "$!"; print SPEC $_; close SPEC; __DATA__ # Automatically generated by Config-Record.spec.PL %define perlsitearch %(perl -e 'use Config; print $Config{installsitearch}') %define perlsitelib %(perl -e 'use Config; print $Config{installsitelib}') %define perlman1dir %(perl -e 'use Config; print $Config{installman1dir}') %define perlman3dir %(perl -e 'use Config; print $Config{installman3dir}') %define perlversion %(perl -e 'use Config; print $Config{version}') Summary: Config::Record - Simple configuration records Name: perl-Config-Record Version: @VERSION@ Release: @RELEASE@ Copyright: GPL Group: Applications/Internet Source: %{name}-%{version}.tar.gz BuildRoot: /var/tmp/%{name}-%{version}-root BuildArchitectures: noarch #Requires: perl >= %{perlversion} Requires: perl %description Config::Record provides a module for loading configuration records. It supports scalar, array and hash parameters nested to an arbitrary depth. %prep %setup -q %build perl Makefile.PL make %install rm -rf $RPM_BUILD_ROOT make PREFIX=$RPM_BUILD_ROOT/usr INSTALLMAN3DIR=$RPM_BUILD_ROOT/usr/share/man/man3 install find $RPM_BUILD_ROOT/usr/lib/perl5 -name perllocal.pod -exec rm -f {} \; %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root) %doc AUTHORS %doc COPYING %doc README %{perlman3dir}/* %{perlsitelib}/IO/File/Cached.pm [B