]> git.pld-linux.org Git - packages/perl-DBD-SQLite.git/blobdiff - perl-DBD-SQLite.spec
- release 2 (by relup.sh)
[packages/perl-DBD-SQLite.git] / perl-DBD-SQLite.spec
index 0e98d24d24c554010040071ffde75227d3d15e37..9e75389253ae430be300616e73d5a9a4d0f887a1 100644 (file)
@@ -1,6 +1,7 @@
 #
 # Conditional build:
-%bcond_without tests   # do not perform "make test"
+%bcond_without tests           # do not perform "make test"
+%bcond_without system_sqlite3  # don't use system sqlite3
 #
 %include       /usr/lib/rpm/macros.perl
 %define                pdir    DBD
@@ -8,21 +9,31 @@
 Summary:       DBD::SQLite - Self Contained RDBMS in a DBI Driver (sqlite 3.x)
 Summary(pl.UTF-8):     DBD::SQLite - Kompletny RDBMS zawarty w sterowniku DBI (sqlite 3.x)
 Name:          perl-DBD-SQLite
-Version:       1.14
-Release:       5
+Version:       1.48
+Release:       2
 # same as perl
 License:       GPL v1+ or Artistic
 Group:         Development/Languages/Perl
 Source0:       http://www.cpan.org/modules/by-module/DBD/%{pdir}-%{pnam}-%{version}.tar.gz
-# Source0-md5: 78a89cc8fd46bb2a5d537433dcccc8e6
+# Source0-md5: 020c02ca595b2074a767a19af8506d2a
 URL:           http://search.cpan.org/dist/DBD-SQLite/
-%if %{with tests}
-BuildRequires: perl-DBI
-%endif
+BuildRequires: perl-DBI >= 1.57
 BuildRequires: perl-devel >= 1:5.8.0
 BuildRequires: rpm-perlprov >= 4.1-13
+BuildRequires: rpmbuild(macros) >= 1.663
+%{?with_system_sqlite3:BuildRequires:  sqlite3-devel >= 3.6.0}
+%if %{with tests}
+BuildRequires: perl-Encode
+BuildRequires: perl-Test-Simple >= 0.86
+# needs ENABLE_FTS3_PARENTHESIS
+%{?with_system_sqlite3:BuildRequires:  sqlite3 >= 3.8.11.1-2}
+%endif
+%{?with_system_sqlite3:Requires:       sqlite3 >= 3.6.0}
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
+# virtual module provided by VirtualTable.pm
+%define                _noautoreq_perl DBD::SQLite::VirtualTable::Cursor
+
 %description
 DBD::SQLite is a DBI driver for SQLite database. SQLite is a public
 domain RDBMS database engine that you can find at
@@ -51,15 +62,18 @@ Aby używać baz danych stworzonych przy pomocy starszej wersji SQLite
 %prep
 %setup -q -n %{pdir}-%{pnam}-%{version}
 
+# honour USE_LOCAL_SQLITE instead of using bundled sqlite3 (see comments inside)
+%{__perl} -pi -e 's/if \( 0 \)/if ( 1 )/' Makefile.PL
+
 %build
 echo y | %{__perl} Makefile.PL \
-       USE_LOCAL_SQLITE=1 \
+       %{!?with_system_sqlite3:USE_LOCAL_SQLITE=1} \
        INSTALLDIRS=vendor
 
-# dumps core with sqlite 3.5.4 sometimes (eg. t/06error.t)
 %{__make} \
        CC="%{__cc}" \
-       OPTIMIZE="%{rpmcflags}"
+       OPTIMIZE="%{rpmcflags}" \
+       OTHERLDFLAGS="%{rpmcflags} %{rpmldflags}"
 
 %{?with_tests:%{__make} test}
 
@@ -69,6 +83,10 @@ rm -rf $RPM_BUILD_ROOT
 %{__make} install \
        DESTDIR=$RPM_BUILD_ROOT
 
+%{__rm} $RPM_BUILD_ROOT%{perl_vendorarch}/DBD/SQLite/{Cookbook,Fulltext_search}.pod
+# "sqlite3 amalgamation" sources
+%{__rm} -r $RPM_BUILD_ROOT%{perl_vendorarch}/auto/share
+
 %clean
 rm -rf $RPM_BUILD_ROOT
 
@@ -76,7 +94,7 @@ rm -rf $RPM_BUILD_ROOT
 %defattr(644,root,root,755)
 %doc Changes README
 %{perl_vendorarch}/DBD/SQLite.pm
+%{perl_vendorarch}/DBD/SQLite
 %dir %{perl_vendorarch}/auto/DBD/SQLite
-%{perl_vendorarch}/auto/DBD/SQLite/SQLite.bs
 %attr(755,root,root) %{perl_vendorarch}/auto/DBD/SQLite/SQLite.so
-%{_mandir}/man3/DBD*
+%{_mandir}/man3/DBD::SQLite*.3pm*
This page took 0.031311 seconds and 4 git commands to generate.