# Copyright (C) 2001-2004 Daniel Berrange <dan@berrange.com>
#
# $Id: File-Path-Localize.spec.PL,v 1.8 2003/03/11 17:10:02 dan Exp $

use strict;
use vars qw($VERSION $RELEASE);

die unless (scalar @ARGV == 1);

do 'VERSION';

local $/ = undef;
$_ = <DATA>;
s/\@VERSION\@/$VERSION/g;
s/\@RELEASE\@/$RELEASE/g;

open SPEC, ">$ARGV[0]" or die "$!";
print SPEC $_;
close SPEC;
__DATA__
# Automatically generated by File-Path-Localize.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: File::Path::Localize - A filename expander
Name: perl-File-Path-Localize
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

File::Path::Localize is a library of methods for expanding a 
relative filename into a list of absolute filsnames using a 
path and set of locales.
 
%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}/File/Path/Localize.pm
