File perl-ProjectBuilder.spec of Package perl-ProjectBuilder

# $Id$
%define perlvendorlib %(eval "`%{__perl} -V:installvendorlib`"; echo $installvendorlib)
%define srcname ProjectBuilder

Summary:	Perl module providing multi-OSes (Linux/Solaris/...) Continuous Packaging
Summary(fr):	Module Perl pour le support de divers OS (Linux/Solaris/...)

Name:		perl-ProjectBuilder
Version:	0.14.6
Release:	1.sles12
License:	GPLv2
Group:		System/Configuration/Packaging
BuildRoot:	%{_tmppath}/%{srcname}-%{version}-%{release}-root-%(id -u -n)
BuildArch:	noarch
Requires:	perl >= 5.6.2,perl-YAML
BuildRequires: rpm-build

ProjectBuilder is a perl module providing set of functions
to help develop packages for projects and deal
with different Operating systems (Linux distributions, Solaris, ...).
It implements a Continuous Packaging approach.

%description -l fr
perl-ProjectBuilder est un ensemble de fonctions pour aider à développer 
des projets perl et à traiter de diverses distributions Linux.

%setup -q -n %{srcname}-%{version}

%{__perl} Makefile.PL INSTALLDIRS=vendor destdir=${RPM_BUILD_ROOT}/  SYSCONFDIR=%{_sysconfdir}/pb CONFDIR=%{_datadir}/pb MANDIR=%{_mandir}
make %{?_smp_mflags}

%{__rm} -rf $RPM_BUILD_ROOT
make DESTDIR=${RPM_BUILD_ROOT} install
find ${RPM_BUILD_ROOT} -type f -name perllocal.pod -o -name .packlist -o -name '*.bs' -a -size 0 | xargs rm -f
find ${RPM_BUILD_ROOT} -type d -depth | xargs rmdir --ignore-fail-on-non-empty

make test

%{__rm} -rf $RPM_BUILD_ROOT

%dir %{_datadir}/pb
%config %{_datadir}/pb/*
%config(noreplace) %{_sysconfdir}/pb