my own OBS-URL: https://build.opensuse.org/request/show/50517 OBS-URL: https://build.opensuse.org/package/show/devel:languages:perl/perl-Text-Balanced?expand=0&rev=1
96 lines
2.9 KiB
RPMSpec
96 lines
2.9 KiB
RPMSpec
#
|
|
# spec file for package perl-perl-Text-Balanced (Version 2.02)
|
|
#
|
|
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
|
# This file and all modifications and additions to the pristine
|
|
# package are under the same license as the package itself.
|
|
#
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
# See also http://wiki.opensuse.org/openSUSE:Packaging_Perl
|
|
|
|
# norootforbuild
|
|
|
|
Name: perl-Text-Balanced
|
|
Version: 2.02
|
|
Release: 0%{?dist}
|
|
License: GPL+ or Artistic
|
|
Group: Development/Libraries/Perl
|
|
Summary: Extract balanced-delimiter substrings
|
|
Source: http://search.cpan.org/CPAN/authors/id/A/AD/ADAMK/Text-Balanced-%{version}.tar.gz
|
|
Url: http://search.cpan.org/dist/Text-Balanced
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
Requires: perl = %(eval "`%{__perl} -V:version`"; echo $version)
|
|
|
|
BuildArch: noarch
|
|
|
|
BuildRequires: perl(Test::More) >= 0.47
|
|
|
|
|
|
%description
|
|
The various 'extract_...' subroutines may be used to extract a delimited
|
|
substring, possibly after skipping a specified prefix string. By
|
|
default, that prefix is optional whitespace ('/\s*/'), but you can
|
|
change it to whatever you wish (see below).The substring to be extracted
|
|
must appear at the current 'pos' location of the string's variable (or
|
|
at index zero, if no 'pos' position is defined). In other words, the
|
|
'extract_...' subroutines _don't_ extract the first occurrence of a
|
|
substring anywhere in a string (like an unanchored regex would). Rather,
|
|
they extract an occurrence of the substring appearing immediately at the
|
|
current matching position in the string (like a '\G'-anchored regex
|
|
would).General behaviour in list contexts In a list context, all the
|
|
subroutines return a list, the first three elements of which are always:
|
|
|
|
|
|
|
|
%prep
|
|
%setup -q -n Text-Balanced-%{version}
|
|
|
|
%build
|
|
if [ -f Build.PL ]; then
|
|
%{__perl} Build.PL --installdirs vendor
|
|
else
|
|
%{__perl} Makefile.PL INSTALLDIRS=vendor
|
|
fi
|
|
if [ -f Build.PL ]; then
|
|
./Build build flags=%{?_smp_mflags}
|
|
else
|
|
%{__make} %{?_smp_mflags}
|
|
fi
|
|
|
|
%install
|
|
if [ -f Build.PL ]; then
|
|
./Build pure_install --destdir %{buildroot}
|
|
else
|
|
%{__make} pure_install PERL_INSTALL_ROOT=%{buildroot}
|
|
fi
|
|
|
|
# FIXME: use ./Build install destdir=$RPM_BUILD_ROOT create_packlist=0
|
|
# maybe then we would not need to remove the .packlist files :-)
|
|
find %{buildroot} -type f -name .packlist -exec rm -f {} ';'
|
|
|
|
find %{buildroot} -depth -type d -exec rmdir {} 2>/dev/null ';'
|
|
|
|
%{_fixperms} %{buildroot}/*
|
|
%perl_process_packlist
|
|
%perl_gen_filelist
|
|
|
|
%check
|
|
if [ -f Build.PL ]; then
|
|
./Build test
|
|
else
|
|
%{__make} test
|
|
fi
|
|
|
|
%clean
|
|
[ "$RPM_BUILD_ROOT" != "/" ] && [ -d $RPM_BUILD_ROOT ] && %{__rm} -rf $RPM_BUILD_ROOT
|
|
|
|
%files -f %{name}.files
|
|
%defattr(-,root,root,-)
|
|
%doc README Changes
|
|
|
|
%changelog
|
|
* Mon Aug 16 2010 %{packager}
|
|
- initial SUSE packaging
|
|
- generated with cpan2dist (CPANPLUS::Dist::SUSE version 0.0.8)
|
|
|