perl-Class-Singleton/perl-Class-Singleton.spec

64 lines
2.2 KiB
RPMSpec
Raw Normal View History

%define perl_major_ver %(eval `perl -V:version`; echo ${version%*.[0-9]*}.0)
Name: perl-Class-Singleton
Version: 1.4
Release: 3mamba
Summary: Class::Singleton - Implementation of a "Singleton" class
Group: System/Libraries/Perl
Vendor: openmamba
Distribution: openmamba
Packager: Aleph0 <aleph0@openmamba.org>
URL: http://www.cpan.org
Source: http://www.cpan.org/modules/by-module/Class/Class-Singleton-%{version}.tar.gz
License: Artistic
Requires: perl >= %perl_major_ver
BuildRequires: perl-devel >= %perl_major_ver
BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-root
%description
This is the "Class::Singleton" module.
A Singleton describes an object class that can have only one instance in any system.
An example of a Singleton might be a print spooler or system registry.
This module implements a Singleton class from which other classes can be derived.
By itself, the "Class::Singleton" module does very little other than manage the instantiation of a single object.
In deriving a class from "Class::Singleton", your module will inherit the Singleton instantiation method and can implement whatever specific functionality is required.
%prep
%setup -q -n Class-Singleton-%{version}
%build
perl Makefile.PL PREFIX=%{_prefix} INSTALLDIRS=vendor
%make
%make test
%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%makeinstall_perl
packlist=`find %{buildroot} -name .packlist`
[ -z "$packlist" ] && exit 1 || cat $packlist | \
sed "s,%buildroot,,g;s,.*/man/.*,&.gz,g" | \
sort -u > .packlist && rm $packlist
strid=`echo $packlist | sed 's,.*auto\(.*\)/.packlist,\1,'`
for dir in `find %{buildroot} -type d | grep $strid`; do
echo "%dir ${dir#%buildroot}" >> .packlist
done
%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
rm -f .packlist
%files -f .packlist
%defattr(-,root,root)
%changelog
* Tue Nov 13 2012 Silvan Calarco <silvan.calarco@mambasoft.it> 1.4-3mamba
- perl 5.16 mass rebuild
* Tue Nov 04 2008 Silvan Calarco <silvan.calarco@mambasoft.it> 1.4-2mamba
- automatic rebuild by autodist
* Thu Dec 06 2007 Aleph0 <aleph0@openmamba.org> 1.4-1mamba
- package created by autospec