]> git.pld-linux.org Git - packages/perl-DBD-SQLite.git/blob - perl-DBD-SQLite.spec
- updated URL
[packages/perl-DBD-SQLite.git] / perl-DBD-SQLite.spec
1 #
2 # Conditional build:
3 %bcond_without  tests           # unit tests
4 %bcond_without  system_sqlite3  # system sqlite3
5 #
6 %define         pdir    DBD
7 %define         pnam    SQLite
8 Summary:        DBD::SQLite - Self Contained RDBMS in a DBI Driver (sqlite 3.x)
9 Summary(pl.UTF-8):      DBD::SQLite - Kompletny RDBMS zawarty w sterowniku DBI (sqlite 3.x)
10 Name:           perl-DBD-SQLite
11 Version:        1.72
12 Release:        2
13 # same as perl
14 License:        GPL v1+ or Artistic
15 Group:          Development/Languages/Perl
16 Source0:        https://www.cpan.org/modules/by-module/DBD/%{pdir}-%{pnam}-%{version}.tar.gz
17 # Source0-md5:  976df252ae0aceb7fb81587af425580b
18 Patch0:         data_type.patch
19 URL:            https://metacpan.org/dist/DBD-SQLite
20 BuildRequires:  perl-DBI >= 1.57
21 BuildRequires:  perl-devel >= 1:5.8.0
22 BuildRequires:  rpm-perlprov >= 4.1-13
23 BuildRequires:  rpmbuild(macros) >= 1.745
24 %{?with_system_sqlite3:BuildRequires:   sqlite3-devel >= 3.6.0}
25 %if %{with tests}
26 BuildRequires:  perl-Encode
27 BuildRequires:  perl-Test-Simple >= 0.86
28 # needs ENABLE_FTS3_PARENTHESIS
29 %{?with_system_sqlite3:BuildRequires:   sqlite3 >= 3.8.11.1-2}
30 %endif
31 %{?with_system_sqlite3:Requires:        sqlite3 >= 3.6.0}
32 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
33
34 # virtual module provided by VirtualTable.pm
35 %define         _noautoreq_perl DBD::SQLite::VirtualTable::Cursor
36
37 %description
38 DBD::SQLite is a DBI driver for SQLite database. SQLite is a public
39 domain RDBMS database engine that you can find at
40 <http://www.sqlite.org/>.
41
42 Rather than ask you to install SQLite first, DBD::SQLite includes the
43 entire thing in the distribution. So in order to get a fast
44 transaction capable RDBMS working for your perl project you simply
45 have to install this module, and nothing else.
46
47 To use databases created using older SQLite version (2.x) you should
48 use perl-DBD-SQLite2 package.
49
50 %description -l pl.UTF-8
51 DBD::SQLite to sterownik DBI do baz danych SQLite. SQLite to silnik
52 relacyjnych baz danych na licencji public domain. Można go znaleźć pod
53 adresem <http://www.sqlite.org/>.
54
55 DBD::SQLite zawiera w sobie cały silnik bazy danych. Dzięki temu aby
56 otrzymać działający RDBMS dostępny z poziomu Perla nie trzeba
57 instalować żadnych innych pakietów.
58
59 Aby używać baz danych stworzonych przy pomocy starszej wersji SQLite
60 (2.x) należy zainstalować pakiet perl-DBD-SQLite2.
61
62 %prep
63 %setup -q -n %{pdir}-%{pnam}-%{version}
64 %patch0 -p1
65
66 # honour USE_LOCAL_SQLITE instead of using bundled sqlite3 (see comments inside)
67 %{__perl} -pi -e 's/if \( 0 \)/if ( 1 )/' Makefile.PL
68
69 %build
70 echo y | %{__perl} Makefile.PL \
71         %{!?with_system_sqlite3:USE_LOCAL_SQLITE=1} \
72         INSTALLDIRS=vendor
73
74 %{__make} \
75         CC="%{__cc}" \
76         OPTIMIZE="%{rpmcflags}" \
77         OTHERLDFLAGS="%{rpmcflags} %{rpmldflags}"
78
79 %{?with_tests:%{__make} test}
80
81 %install
82 rm -rf $RPM_BUILD_ROOT
83
84 %{__make} install \
85         DESTDIR=$RPM_BUILD_ROOT
86
87 %{__rm} $RPM_BUILD_ROOT%{perl_vendorarch}/DBD/SQLite/{Cookbook,Fulltext_search}.pod
88 # "sqlite3 amalgamation" sources
89 %{__rm} -r $RPM_BUILD_ROOT%{perl_vendorarch}/auto/share
90
91 %clean
92 rm -rf $RPM_BUILD_ROOT
93
94 %files
95 %defattr(644,root,root,755)
96 %doc Changes README
97 %{perl_vendorarch}/DBD/SQLite.pm
98 %{perl_vendorarch}/DBD/SQLite
99 %dir %{perl_vendorarch}/auto/DBD/SQLite
100 %attr(755,root,root) %{perl_vendorarch}/auto/DBD/SQLite/SQLite.so
101 %{_mandir}/man3/DBD::SQLite*.3pm*
This page took 0.117663 seconds and 4 git commands to generate.