Name:		perl-Gtk2-Unique
Version:	0.05
Release:	2%{?_dist_release}
Summary:	Perl bindings for the C library "libunique"

Group:		Development/Libraries
License:	Artistic or GPL (same terms as Perl)
URL:		http://search.cpan.org/dist/Gtk2-Unique/
Source0:	http://search.cpan.org/CPAN/authors/id/P/PO/POTYL/Gtk2-Unique-%{version}.tar.gz
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildRequires:	perl(Gtk2)
BuildRequires:	perl(ExtUtils::MakeMaker)
BuildRequires:	perl(ExtUtils::Depends)
BuildRequires:	perl(ExtUtils::PkgConfig)
BuildRequires:	unique-devel
Requires:	perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
Requires:	unique

Vendor: Project Vine
Distribution: Vine Linux

%description
Perl bindings for the C library "libunique" that provides a mechanism for
writing single instance applications. If you launch a single instance
application twice, the second instance will either just quit or will send a
message to the running instance.


%prep
%setup -q -n Gtk2-Unique-%{version}


%build
%{__perl} Makefile.PL INSTALLDIRS=vendor OPTIMIZE="$RPM_OPT_FLAGS"
%{__make} %{?_smp_mflags}


%install
%{__rm} -rf $RPM_BUILD_ROOT
%{__make} pure_install PERL_INSTALL_ROOT=$RPM_BUILD_ROOT
find $RPM_BUILD_ROOT -type f -name .packlist -exec rm -f {} ';'
find $RPM_BUILD_ROOT -type f -name '*.bs' -empty -exec rm -f {} ';'
find $RPM_BUILD_ROOT -depth -type d -exec rmdir {} 2>/dev/null ';'
%{__chmod} -R u+w $RPM_BUILD_ROOT/*


%clean
%{__rm} -rf $RPM_BUILD_ROOT


%files
%defattr(-,root,root,-)
%doc Changes README
%{perl_vendorarch}/auto/Gtk2/Unique/
%{perl_vendorarch}/Gtk2/Unique*
%{_mandir}/man3/*.3pm*


%changelog
* Fri Apr 01 2011 Kazutaka HARADA <kazutaka@vinelinux.org> 0.05-2
- build with perl 5.12.3
- add Vendor and Distribution tags

* Sat Feb 12 2011 Kazutaka HARADA <kazutaka@vinelinux.org> 0.05-1
- initial build for Vine Linux

