Stephan Kulow 2011-06-06 14:01:29 +00:00 committed by Git OBS Bridge
parent 4de6bbc46f
commit 56c37c834f
2 changed files with 51 additions and 101 deletions

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Mon Jun 6 13:58:50 UTC 2011 - coolo@novell.com
- updated to 0.19
-------------------------------------------------------------------
Mon Nov 29 18:00:48 UTC 2010 - coolo@novell.com

View File

@ -1,117 +1,62 @@
%define pkgname OLE-Storage_Lite
%define filelist %{pkgname}-%{version}-filelist
%define NVR %{pkgname}-%{version}-%{release}
%define maketest 1
#
# spec file for package perl-OLE-Storage_Lite (Version 0.19)
#
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
name: perl-OLE-Storage_Lite
summary: OLE-Storage_Lite - Read and write OLE storage files
version: 0.19
release: 1
vendor: Kawai Takanori (kwitknr@cpan.org)
packager: Arix International <cpan2rpm@arix.com>
license: Artistic
group: Applications/CPAN
url: http://www.cpan.org
buildroot: %{_tmppath}/%{name}-%{version}-%(id -u -n)
buildarch: noarch
prefix: %(echo %{_prefix})
source: http://search.cpan.org//CPAN/authors/id/J/JM/JMCNAMARA/OLE-Storage_Lite-0.19.tar.gz
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: perl-OLE-Storage_Lite
Version: 0.19
Release: 1
License: Japan. All rights reserved. You may distribute under the terms of either the GNU General Public License or the Artistic License, as specified in the Perl README file.
%define cpan_name OLE-Storage_Lite
Summary: Simple Class for OLE document interface.
Url: http://search.cpan.org/dist/OLE-Storage_Lite/
Group: Development/Libraries/Perl
Source: http://www.cpan.org/authors/id/J/JM/JMCNAMARA/%{cpan_name}-%{version}.tar.gz
BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: perl
BuildRequires: perl-macros
%{perl_requires}
%description
OLE::Storage_Lite allows you to read and write an OLE structured file.
OLE::Storage_Lite::PPS is a class representing PPS. OLE::Storage_Lite::PPS::Root, OLE::Storage_Lite::PPS::File and OLE::Storage_Lite::PPS::Dir
are subclasses of OLE::Storage_Lite::PPS.
#
# This package was generated automatically with the cpan2rpm
# utility. To get this software or for more information
# please visit: http://perl.arix.com/
#
OLE::Storage_Lite::PPS is a class representing PPS.
OLE::Storage_Lite::PPS::Root, OLE::Storage_Lite::PPS::File and
OLE::Storage_Lite::PPS::Dir are subclasses of OLE::Storage_Lite::PPS.
%prep
%setup -q -n %{pkgname}-%{version}
chmod -R u+w %{_builddir}/%{pkgname}-%{version}
%setup -q -n %{cpan_name}-%{version}
%build
grep -rsl '^#!.*perl' . |
grep -v '.bak$' |xargs --no-run-if-empty \
%__perl -MExtUtils::MakeMaker -e 'MY->fixin(@ARGV)'
CFLAGS="$RPM_OPT_FLAGS"
%{__perl} Makefile.PL `%{__perl} -MExtUtils::MakeMaker -e ' print qq|PREFIX=%{buildroot}%{_prefix}| if \$ExtUtils::MakeMaker::VERSION =~ /5\.9[1-6]|6\.0[0-5]/ '`
%{__make}
%if %maketest
%{__perl} Makefile.PL INSTALLDIRS=vendor
%{__make} %{?_smp_mflags}
%check
%{__make} test
%endif
%install
[ "%{buildroot}" != "/" ] && rm -rf %{buildroot}
make DESTDIR=%buildroot install_vendor
cmd=/usr/share/spec-helper/compress_files
[ -x $cmd ] || cmd=/usr/lib/rpm/brp-compress
[ -x $cmd ] && $cmd
# SuSE Linux
if [ -e /etc/SuSE-release -o -e /etc/UnitedLinux-release ]
then
%{__mkdir_p} %{buildroot}/var/adm/perl-modules
%{__cat} `find %{buildroot} -name "perllocal.pod"` \
| %{__sed} -e s+%{buildroot}++g \
> %{buildroot}/var/adm/perl-modules/%{name}
fi
# remove special files
find %{buildroot} -name "perllocal.pod" \
-o -name ".packlist" \
-o -name "*.bs" \
|xargs -i rm -f {}
# no empty directories
find %{buildroot}%{_prefix} \
-type d -depth \
-exec rmdir {} \; 2>/dev/null
%{__perl} -MFile::Find -le '
find({ wanted => \&wanted, no_chdir => 1}, "%{buildroot}");
print "%doc sample Changes README";
for my $x (sort @dirs, @files) {
push @ret, $x unless indirs($x);
}
print join "\n", sort @ret;
sub wanted {
return if /auto$/;
local $_ = $File::Find::name;
my $f = $_; s|^\Q%{buildroot}\E||;
return unless length;
return $files[@files] = $_ if -f $f;
$d = $_;
/\Q$d\E/ && return for reverse sort @INC;
$d =~ /\Q$_\E/ && return
for qw|/etc %_prefix/man %_prefix/bin %_prefix/share|;
$dirs[@dirs] = $_;
}
sub indirs {
my $x = shift;
$x =~ /^\Q$_\E\// && $x ne $_ && return 1 for @dirs;
}
' > %filelist
[ -z %filelist ] && {
echo "ERROR: empty %files listing"
exit -1
}
%perl_make_install
%perl_process_packlist
%perl_gen_filelist
%clean
[ "%{buildroot}" != "/" ] && rm -rf %{buildroot}
%{__rm} -rf %{buildroot}
%files -f %filelist
%defattr(-,root,root)
%files -f %{name}.files
%defattr(-,root,root,755)
%doc Changes README
%changelog -n %{name}
%changelog