]> git.pld-linux.org Git - packages/libdbi-drivers.git/blob - libdbi-drivers.spec
- fix building without pgsql
[packages/libdbi-drivers.git] / libdbi-drivers.spec
1 #
2 # Conditional build:
3 %bcond_without mysql  # don't build mysql driver
4 %bcond_without pgsql  # don't build postgresql driver
5 %bcond_without sqlite # don't build sqlite driver
6 #
7 %define dbiver  0.7.2
8 Summary:        Database Independent Abstraction Layer for C
9 Summary(pl):    Warstwa DBI dla C
10 Name:           libdbi-drivers
11 Version:        0.7.1
12 Release:        2
13 License:        LGPL
14 Group:          Libraries
15 Source0:        http://dl.sourceforge.net/libdbi-drivers/libdbi-drivers-%{version}.tar.gz
16 # Source0-md5:  f11020119ceb7a6dee3969cb0589d4bc
17 Patch0:         %{name}-opt.patch
18 URL:            http://libdbi-drivers.sourceforge.net/
19 BuildRequires:  autoconf
20 BuildRequires:  automake
21 BuildRequires:  libtool
22 BuildRequires:  libdbi-devel >= %{dbiver}
23 %{?with_mysql:BuildRequires:    mysql-devel}
24 %{?with_pgsql:BuildRequires:    postgresql-devel}
25 %{?with_sqlite:BuildRequires:   sqlite-devel}
26 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
27
28 %description
29 libdbi implements a database-independent abstraction layer in C,
30 similar to the DBI/DBD layer in Perl. Writing one generic set of code,
31 programmers can leverage the power of multiple databases and multiple
32 simultaneous database connections by using this framework.
33
34 %description -l pl
35 libdbi jest implementacj± w C warstwy abstrakcyjnej niezale¿nej od
36 bazy danych, podobnej do warstwy DBI/DBD w Perlu. U¿ywaj±c tego
37 ¶rodowiska programista mo¿e za pomoc± jednego, wspólnego kodu
38 odwo³ywaæ siê do wielu ró¿nych baz danych, tak¿e jednocze¶nie.
39
40 %package mysql
41 Summary:        MySQL plugin for libdbi
42 Summary(pl):    Wtyczka MySQL dla libdbi
43 Group:          Libraries
44 Requires:       libdbi >= %{dbiver}
45 Provides:       libdbi-dbd = %{version}-%{release}
46 Obsoletes:      libdbi-dbd-mysql
47
48 %description mysql
49 This plugin provides connectivity to MySQL database servers through
50 the libdbi database independent abstraction layer. Switching a
51 program's plugin does not require recompilation or rewriting source
52 code.
53
54 %description mysql -l pl
55 Ta wtyczka daje mo¿liwo¶æ ³±czenia siê z serwerami MySQL poprzez
56 bibliotekê libdbi. Zmiana u¿ywanej wtyczki nie wymaga rekompilacji ani
57 zmiany ¼róde³ programu.
58
59 %package pgsql
60 Summary:        PostgreSQL plugin for libdbi
61 Summary(pl):    Wtyczka PostgreSQL dla libdbi
62 Group:          Libraries
63 Requires:       libdbi >= %{dbiver}
64 Provides:       libdbi-dbd = %{version}-%{release}
65 Obsoletes:      libdbi-dbd-pgsql
66
67 %description pgsql
68 This plugin provides connectivity to PostgreSQL database servers
69 through the libdbi database independent abstraction layer. Switching a
70 program's plugin does not require recompilation or rewriting source
71 code.
72
73 %description pgsql -l pl
74 Ta wtyczka daje mo¿liwo¶æ ³±czenia siê z serwerami PostgreSQL poprzez
75 bibliotekê libdbi. Zmiana u¿ywanej wtyczki nie wymaga rekompilacji ani
76 zmiany ¼róde³ programu.
77
78 %package sqlite
79 Summary:        SQLite plugin for libdbi
80 Summary(pl):    Wtyczka SQLite dla libdbi
81 Group:          Libraries
82 Requires:       libdbi >= %{dbiver}
83 Provides:       libdbi-dbd = %{version}-%{release}
84
85 %description sqlite
86 This plugin provides connectivity to SQLite engine
87 through the libdbi database independent abstraction layer. Switching a
88 program's plugin does not require recompilation or rewriting source
89 code.
90
91 %description sqlite -l pl
92 Ta wtyczka daje mo¿liwo¶æ ³±czenia siê z silnikiem SQLite poprzez
93 bibliotekê libdbi. Zmiana u¿ywanej wtyczki nie wymaga rekompilacji ani
94 zmiany ¼róde³ programu.
95
96 %prep
97 %setup -q
98 %patch0 -p1
99
100 %build
101 %{__libtoolize}
102 %{__aclocal}
103 %{__automake}
104 %{__autoconf}
105 %configure \
106         --disable-static \
107 %if %{with sqlite}
108         --with-sqlite \
109         --with-sqlite-libdir=%{_libdir} \
110         --with-sqlite-incdir=%{_includedir} \
111 %endif
112 %if %{with mysql}
113         --with-mysql \
114         --with-mysql-libdir=%{_libdir} \
115         --with-mysql-incdir=%{_includedir} \
116 %endif
117 %if %{with pgsql}
118         --with-pgsql \
119         --with-pgsql-libdir=%{_libdir} \
120         --with-pgsql-incdir=%{_includedir} \
121 %endif
122         --with-dbi-incdir=%{_includedir}
123 %{__make}
124
125 %install
126 rm -rf $RPM_BUILD_ROOT
127 install -d $RPM_BUILD_ROOT%{_libdir}/dbd
128
129 %{__make} install \
130         DESTDIR=$RPM_BUILD_ROOT
131
132 rm -f $RPM_BUILD_ROOT%{_libdir}/dbd/lib*.la
133
134 %clean
135 rm -rf $RPM_BUILD_ROOT
136
137 %if %{with mysql}
138 %files mysql
139 %defattr(644,root,root,755)
140 %doc drivers/mysql/*.pdf drivers/mysql/dbd_mysql
141 %attr(755,root,root) %{_libdir}/dbd/libmysql.so
142 %endif
143
144 %if %{with pgsql}
145 %files pgsql
146 %defattr(644,root,root,755)
147 %doc drivers/pgsql/*.pdf drivers/pgsql/dbd_pgsql
148 %attr(755,root,root) %{_libdir}/dbd/libpgsql.so
149 %endif
150
151 %if %{with sqlite}
152 %files sqlite
153 %defattr(644,root,root,755)
154 %doc drivers/sqlite/*.pdf drivers/sqlite/dbd_sqlite
155 %{_libdir}/dbd/libsqlite.so
156 %endif
This page took 0.253241 seconds and 4 git commands to generate.