# Copyright (C) 2001-2004 Daniel Berrange <dan@berrange.com>
#
# $Id: Text-Smart-Plugin.spec.PL,v 1.1 2004/05/12 16:45:13 dan Exp $

use strict;

die unless (scalar @ARGV == 1);

unless (do 'lib/Text/Smart/Plugin.pm')
  {
    if ($@) { die $@ };
    die "lib/Text/Smart/Plugin.pm: $!";
  }
		
local $/ = undef;
$_ = <DATA>;
s/\@VERSION\@/$Text::Smart::Plugin::VERSION/g;

open SPEC, ">$ARGV[0]" or die "$!";
print SPEC $_;
close SPEC;
__DATA__
# Automatically generated by Text-Smart-Plugin.spec.PL

%define perlsitearch %(perl -e 'use Config; print $Config{installsitearch}')
%define perlsitelib %(perl -e 'use Config; print $Config{installsitelib}')
%define perlsiteprefix %(perl -e 'use Config; print $Config{siteprefix}')
%define perlsiteman3 %{perlsiteprefix}/share/man/man3
%define perlversion %(perl -e 'use Config; print $Config{version}')

%define appname Text-Smart-Plugin

Summary: Text::Smart::Plugin - Simple text markup processor
Name: perl-%{appname}
Version: @VERSION@
Release: 1
Copyright: GPL
Group: Applications/Internet
Source: %{appname}-%{version}.tar.gz
BuildRoot: /var/tmp/%{appname}-%{version}-root
BuildArchitectures: noarch
Requires: perl = %{perlversion}
Requires: perl-Text-Smart >= 1.0.0
Requires: perl-Template-Toolkit

%description
Text::Smart::Plugin provides a module for simple inline text
markup processing.
 
%prep
%setup -q -n %{appname}-%{version}


%build
perl Makefile.PL PREFIX=$RPM_BUILD_ROOT/usr
make


%install
rm -rf $RPM_BUILD_ROOT
make install INSTALLSITEMAN3DIR=$RPM_BUILD_ROOT%{perlsiteman3}
find $RPM_BUILD_ROOT%{perlsitearch} -name perllocal.pod -exec rm -f {} \;

%clean
rm -rf $RPM_BUILD_ROOT


%files
%defattr(-,root,root)
%doc AUTHORS
%doc COPYING
%doc README
%{perlsiteman3}/*
%{perlsitelib}/Text/Smart/Plugin.pm
%{perlsitearch}/auto/Text/Smart/Plugin/
