1 | # Run optional test
|
---|
2 | #%bcond_without perl_DBD_SQLite_enables_optional_test
|
---|
3 |
|
---|
4 | Name: perl-DBD-SQLite
|
---|
5 | Version: 1.58
|
---|
6 | Release: 2%{?dist}
|
---|
7 | Summary: SQLite DBI Driver
|
---|
8 | Vendor: bww bitwise works GmbH
|
---|
9 | # lib/DBD/SQLite.pm: GPL+ or Artistic
|
---|
10 | # LICENSE: GPL+ or Artistic
|
---|
11 | ## unbundled
|
---|
12 | # inc/Test/NoWarnings.pm: LGPLv2+
|
---|
13 | # sqlite3.c: Public Domain (copied from sqlite)
|
---|
14 | # sqlite3.h: Public Domain (copied from sqlite)
|
---|
15 | # sqlite3ext.h: Public Domain (copied from sqlite)
|
---|
16 | License: (GPL+ or Artistic) and Public Domain
|
---|
17 | URL: http://search.cpan.org/dist/DBD-SQLite/
|
---|
18 | Source0: http://search.cpan.org/CPAN/authors/id/I/IS/ISHIGAKI/DBD-SQLite-%{version}.tar.gz
|
---|
19 | Patch0: perl-DBD-SQLite-bz543982.patch
|
---|
20 | # Remove notes about bundled sqlite C source from man page and README
|
---|
21 | Patch1: Disable-DSQLITE_ENABLE.patch
|
---|
22 | # Adapt tests to unbundled Test::NoWarnings
|
---|
23 | #Patch2: DBD-SQLite-1.58-Unbundle-Test-NoWarnings.patch
|
---|
24 | #Patch1: 03_do_not_use_local_header.patch
|
---|
25 | # if sqlite >= 3.6.0 then
|
---|
26 | # perl-DBD-SQLite uses the external library
|
---|
27 | # else
|
---|
28 | # perl-DBD-SQLite is self-contained (uses the sqlite local copy)
|
---|
29 | # But we always unbundle sqlite.
|
---|
30 | BuildRequires: sqlite-devel
|
---|
31 | BuildRequires: coreutils
|
---|
32 | BuildRequires: findutils
|
---|
33 | BuildRequires: gcc
|
---|
34 | BuildRequires: make
|
---|
35 | BuildRequires: perl-devel
|
---|
36 | BuildRequires: perl-generators
|
---|
37 | #BuildRequires: perl-interpreter
|
---|
38 | #BuildRequires: perl(:VERSION) >= 5.6
|
---|
39 | BuildRequires: perl(base)
|
---|
40 | BuildRequires: perl(Config)
|
---|
41 | BuildRequires: perl(constant)
|
---|
42 | # Prevent bug #443495
|
---|
43 | BuildRequires: perl(DBI) >= 1.607
|
---|
44 | BuildRequires: perl(DBI::DBD)
|
---|
45 | BuildRequires: perl(ExtUtils::MakeMaker) >= 6.63
|
---|
46 | BuildRequires: perl(File::Spec) >= 0.82
|
---|
47 | BuildRequires: perl(strict)
|
---|
48 | # Run-time:
|
---|
49 | BuildRequires: perl(DynaLoader)
|
---|
50 | # File::Basename not used
|
---|
51 | BuildRequires: perl(locale)
|
---|
52 | BuildRequires: perl(Scalar::Util)
|
---|
53 | BuildRequires: perl(Tie::Hash)
|
---|
54 | BuildRequires: perl(warnings)
|
---|
55 | BuildRequires: sed
|
---|
56 | # Tests only
|
---|
57 | #BuildRequires: perl(bytes)
|
---|
58 | #BuildRequires: perl(Carp)
|
---|
59 | #BuildRequires: perl(Data::Dumper)
|
---|
60 | #BuildRequires: perl(Encode)
|
---|
61 | #BuildRequires: perl(Exporter)
|
---|
62 | #BuildRequires: perl(File::Spec::Functions)
|
---|
63 | #BuildRequires: perl(File::Temp)
|
---|
64 | #BuildRequires: perl(FindBin)
|
---|
65 | #BuildRequires: perl(lib)
|
---|
66 | # POSIX not used
|
---|
67 | #BuildRequires: perl(Test::More)
|
---|
68 | #BuildRequires: perl(Test::NoWarnings) >= 0.081
|
---|
69 | # Win32 not used
|
---|
70 | #%if %{with perl_DBD_SQLite_enables_optional_test}
|
---|
71 | # Optional tests
|
---|
72 | #BuildRequires: perl(Unicode::UCD)
|
---|
73 | #%endif
|
---|
74 | Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
|
---|
75 |
|
---|
76 | %{?perl_default_filter}
|
---|
77 |
|
---|
78 | %description
|
---|
79 | SQLite is a public domain RDBMS database engine that you can find at
|
---|
80 | http://www.hwaci.com/sw/sqlite/.
|
---|
81 |
|
---|
82 | This module provides a SQLite RDBMS module that uses the system SQLite
|
---|
83 | libraries.
|
---|
84 |
|
---|
85 | %prep
|
---|
86 | %setup -q -n DBD-SQLite-%{version}
|
---|
87 | %patch0 -p1
|
---|
88 | %patch1 -p1
|
---|
89 | #%patch2 -p1
|
---|
90 | # Remove bundled sqlite libraries (BZ#1059154)
|
---|
91 | # System libraries will be used
|
---|
92 | rm sqlite*
|
---|
93 |
|
---|
94 | sed -i -e '/^sqlite/ d' MANIFEST
|
---|
95 | # Remove bundled modules
|
---|
96 | rm -rf inc
|
---|
97 | sed -i -e '/^inc\// d' MANIFEST
|
---|
98 |
|
---|
99 | %build
|
---|
100 | export LIBS="-lcx"
|
---|
101 | CFLAGS="%{optflags}" perl Makefile.PL SQLITE_INC=/@unixroot/usr/include INSTALLDIRS=vendor NO_PACKLIST=1
|
---|
102 | make %{?_smp_mflags} OPTIMIZE="%{optflags}"
|
---|
103 | make manifypods
|
---|
104 |
|
---|
105 | %install
|
---|
106 | make pure_install DESTDIR=%{buildroot}
|
---|
107 | find %{buildroot} -type f -name '*.bs' -size 0 -delete
|
---|
108 | %{_fixperms} %{buildroot}/*
|
---|
109 |
|
---|
110 | %check
|
---|
111 | #make test
|
---|
112 |
|
---|
113 | %files
|
---|
114 | %doc Changes README
|
---|
115 | %{perl_vendorarch}/auto/*
|
---|
116 | %{perl_vendorarch}/DBD/
|
---|
117 | %{_mandir}/man3/*.3pm*
|
---|
118 |
|
---|
119 | %changelog
|
---|
120 | * Fri May 18 2018 Elbert Pol <elbert.pol@gmail.com> - 1.58-2
|
---|
121 | - Add a patch for Disable-DSQLITE in Makefile.PL
|
---|
122 | * Fri May 18 2018 Elbert Pol <elbert.pol@gmail.com> - 1.58-1
|
---|
123 | - initial rpm for OS2
|
---|
124 |
|
---|