%global upname DBD-Sybase Name: perl-%{upname} Version: 1.15 Release: 1%{?dist} Summary: Sybase DB driver for the DBI module Group: System Environment/Libraries License: GPL+ or Artistic URL: http://search.cpan.org/dist/%{upname}/ Source0: http://search.cpan.org/CPAN/authors/id/M/ME/MEWP/%{upname}-%{version}.tar.gz %{?el5:BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)} BuildRequires: freetds-devel BuildRequires: perl(Carp) BuildRequires: perl(DBI) BuildRequires: perl(DynaLoader) BuildRequires: perl(Exporter) BuildRequires: perl(ExtUtils::MakeMaker) BuildRequires: perl(Sys::Hostname) BuildRequires: perl(Test::More) BuildRequires: perl(strict) Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) Provides: perl-DBD-sybase = %{version}-%{release} %{?perl_default_filter} %description DBD::Sybase is a Perl module which works with the DBI module to provide access to Sybase or MS-SQL databases. %prep %setup -q -n %{upname}-%{version} # rpmlint complains about 'configure-without-libdir-spec' which you can safely # ignore, because we are creating a dummy-configure here, just for %%configure # exporting the proper compiler/linker-flags from redhat-rpm-config. # echo '#!/bin/sh' > ./configure chmod +x ./configure # fixup hashbang in examples # sed -i -e 's!/local/!/!g' eg/* %build %configure export SYBASE="%{_prefix}" %{__perl} Makefile.PL \ INSTALLDIRS=vendor \ --accept_test_defaults \ --chained Y \ --threaded_libs N make %{?_smp_mflags} %install %{?el5:rm -rf %{buildroot}} make pure_install DESTDIR=%{buildroot} find %{buildroot} -type f -name .packlist -exec rm -f {} ';' find %{buildroot} -type f -name '*.bs' -a -size 0 -exec rm -f {} ';' find %{buildroot} -type f -name '*.pod' -exec rm -f {} ';' %{_fixperms} %{buildroot}/* %check # The DBD::Sybase module need access to a Sybase server to run the tests. # There's none avail during koji-build, so testsuite will fail. # For this reason running the testsuite is disabled by default. # # Uncomment the following line if want to run the testsuite. # #make test %clean %{?el5:rm -rf %{buildroot}} %files %doc BUGS CHANGES README* *.pod eg %{perl_vendorarch}/DBD/ %{perl_vendorarch}/auto/DBD/ %{_mandir}/man*/* %changelog * Tue Jul 23 2013 Marcus Asshauer - 1.15-1 - Initial RPM release