]> git.pld-linux.org Git - packages/Firebird.git/blob - Firebird.spec
- updated to 3.0.10.33601
[packages/Firebird.git] / Firebird.spec
1 # TODO:
2 # - check running
3 # - 2.5 -> 3.0 migration?
4 # - more docs from http://www.firebirdsql.org/en/reference-manuals/ ?
5 # - kill unaligned accesses (create_db,gpre_current,gbak_static,isql_static) on alpha
6 #   - check if it's fixed now (RISC_ALIGNMENT is defined)
7 # - check classic subpackage pre/post scripts
8 # - logrotate script
9 # - create SYSDBA user with initial password before first firebird start
10 #   eg.:
11 #     su firebird
12 #     echo "create user SYSDBA password 'masterkey';"|fb_isql -u SYSDBA /var/lib/firebird/security3.fdb
13 #
14 Summary:        Firebird SQL Database Server and Client tools
15 Summary(de.UTF-8):      Firebird - relationalen Open-Source- Datenbankmanagementsystems
16 Summary(pl.UTF-8):      Firebird - serwer baz danych SQL oraz narzędzia klienckie
17 Name:           Firebird
18 Version:        3.0.10.33601
19 Release:        1
20 License:        Interbase Public License 1.0, Initial Developer's Public License 1.0
21 Group:          Applications/Databases
22 Source0:        https://github.com/FirebirdSQL/firebird/releases/download/v3.0.10/%{name}-%{version}-0.tar.bz2
23 # Source0-md5:  849bbc5913276161cc5250d0a9d925d8
24 Source1:        http://www.firebirdsql.org/file/documentation/reference_manuals/user_manuals/%{name}-3-QuickStart.pdf
25 # Source1-md5:  1e7032a176e4dc1eca6b1e9babf297c4
26 # distfiles refuses this, would require some audit to allow '('/')' chars
27 #Source2:       http://www.firebirdsql.org/pdfmanual/Using-Firebird_(wip).pdf
28 ## Source2-md5: 9eb90583c200bdd7292a80ecc1df1178
29 Source3:        http://www.firebirdsql.org/pdfmanual/%{name}-Null-Guide.pdf
30 # Source3-md5:  dc8e5e234b2138af9a472feca6565359
31 Source4:        http://www.firebirdsql.org/pdfmanual/%{name}-Generator-Guide.pdf
32 # Source4-md5:  23926037205ab8716cf0a54544585231
33 Source5:        http://www.firebirdsql.org/pdfmanual/MSSQL-to-%{name}.pdf
34 # Source5-md5:  230ef237842d255916398f408f459281
35 Source6:        http://www.firebirdsql.org/pdfmanual/%{name}-nbackup.pdf
36 # Source6-md5:  5fd9de7144610ab45bdbb03cfc491adb
37 Source7:        http://www.firebirdsql.org/pdfmanual/%{name}-shell-scripts.pdf
38 # Source7-md5:  01c5e91de9f1639f62f93b3e486584c8
39 Source8:        http://www.firebirdnews.org/docs/fb2min.pdf
40 # Source8-md5:  5e192abaf5db4417b29ad871716522b5
41 Source9:        https://firebirdsql.org/file/documentation/reference_manuals/reference_material/Firebird-2.1-ErrorCodes.pdf
42 # Source9-md5:  9ab392dc349657dbcf9a9c35acd8e8db
43 Source10:       http://www.firebirdsql.org/pdfmanual/%{name}-gsec.pdf
44 # Source10-md5: 326ef6f7afebf369b534838945ee4f74
45 Source11:       http://www.firebirdsql.org/pdfmanual/%{name}-gfix.pdf
46 # Source11-md5: 22e2cdc1058dd4f764728bcb3a8644f0
47 Source12:       http://www.firebirdsql.org/pdfmanual/%{name}-gsplit.pdf
48 # Source12-md5: 0147b5d2118e2e80c93762600107a71f
49 Source13:       https://firebirdsql.org/file/documentation/pdf/en/refdocs/fblangref30/firebird-30-language-reference.pdf
50 # Source13-md5: 20c7cf7d0c102f5b21342fa4472d7938
51 Source100:      firebird.init
52 Source101:      firebird.sysconfig
53 Source102:      firebird.inetd
54 Source103:      firebird.tmpfiles
55 Source104:      firebird.service
56 Source105:      firebird-classic.service
57 Source106:      firebird-classic.socket
58 Source107:      server_mode-ss.conf
59 Source108:      server_mode-classic.conf
60 Source109:      fb_config
61 Patch0:         %{name}-chmod.patch
62 Patch1:         %{name}-editline.patch
63 Patch2:         %{name}-va.patch
64 Patch3:         %{name}-FHS.patch
65 Patch4:         %{name}-opt.patch
66 Patch5:         %{name}-gcc-icu.patch
67 Patch6:         %{name}-libpath.patch
68 Patch7:         add-pkgconfig-files.patch
69 Patch8:         Provide-sized-global-delete-operators-when-compiled.patch
70 Patch9:         parallel-build.patch
71 Patch10:        no-copy-from-icu.patch
72 Patch11:        config.patch
73 Patch12:        chown.patch
74 Patch13:        cloop-honour-build-flags.patch
75 Patch14:        mod_loader.patch
76 URL:            http://www.firebirdsql.org/
77 BuildRequires:  autoconf >= 2.67
78 BuildRequires:  automake
79 BuildRequires:  bison
80 BuildRequires:  libatomic_ops
81 BuildRequires:  libedit-devel
82 BuildRequires:  libicu-devel
83 BuildRequires:  libstdc++-devel
84 BuildRequires:  libtommath-devel
85 BuildRequires:  libtool >= 2:2
86 # for lockfile
87 BuildRequires:  procmail
88 BuildRequires:  rpmbuild(macros) >= 1.268
89 BuildRequires:  sed >= 4.0
90 BuildRequires:  zlib-devel
91 Requires:       %{name}-dirs = %{version}-%{release}
92 Requires:       %{name}-lib = %{version}-%{release}
93 # official ports are x86, x86_64, ppc, sparc, arm, mips/mipsel, ia64
94 # alpha is added in morearchs patch
95 # see morearchs patch if you want more
96 ExclusiveArch:  %{ix86} %{x8664} x32 arm ia64 mips mipsel ppc sparc sparcv9 alpha
97 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
98
99 %define         ibdir   %{_libdir}/interbase
100 %define         specflags       -fno-strict-aliasing
101 %define         debugcflags     -O1 -g -Wall -fno-strict-aliasing
102 %define         Werror_cflags   ''
103
104 %description
105 Firebird is a powerful, high-performance relational database designed
106 to be embedded into applications on multiple platforms.
107
108 %description -l pl.UTF-8
109 Firebird jest potężnym, wysoko wydajnym systemem relacyjnych baz
110 danych zaprojektowanym do osadzania w aplikacjach na wielu
111 platformach.
112
113 %description -l de.UTF-8
114 Firebird ist der Open-Source-Spin-Off des weiterhin kommerziell von
115 Borland vertriebenen relationalen Datenbankmanagementsystemes
116 InterBase. Die Abspaltung erfolgte im Jahre 2000 als kurz vor Freigabe
117 der Version 6 des kommerziellen Vorgängers Interbase bei Borland
118 ernsthafte Überlegungen im Gange waren, die Weiterentwicklung
119 einzustellen.
120
121 Aus Interbase 6.0 wurde Firebird 1.0, wobei dies als eine
122 Bugfix-Version mit nur wenigen Erweiterungen angesehen werden kann.
123 Eine Erweiterung von Firebird 1.0 ist der 64-Bit File I/O, so dass
124 auch Datenbankdateien über 2GB erzeugt werden können.
125
126 %package dirs
127 Summary:        Firebird SQL Database common directories
128 Summary(pl.UTF-8):      Firebird - wspólne katalogi
129 Group:          Applications/Databases
130
131 %description dirs
132 Firebird SQL Database common directories.
133
134 %description dirs -l pl.UTF-8
135 Firebird - wspólne katalogi.
136
137 %package lib
138 Summary:        Firebird shared library
139 Summary(pl.UTF-8):      Biblioteka współdzielona Firebird
140 Group:          Libraries
141
142 %description lib
143 Firebird shared library (libgds).
144
145 %description lib -l pl.UTF-8
146 Biblioteka współdzielona Firebird (libgds).
147
148 %package devel
149 Summary:        Header files for Firebird library
150 Summary(pl.UTF-8):      Pliki nagłówkowe biblioteki Firebird
151 Group:          Development/Libraries
152 Requires:       %{name}-dirs = %{version}-%{release}
153 Requires:       %{name}-lib = %{version}-%{release}
154 Requires:       libstdc++-devel
155 Obsoletes:      Firebird-static
156
157 %description devel
158 Header files for Firebird library.
159
160 %description devel -l pl.UTF-8
161 Pliki nagłówkowe biblioteki Firebird.
162
163 %package doc
164 Summary:        Extensive InterBase and Firebird documentation
165 Summary(pl.UTF-8):      Obszerna dokumentacja do baz InterBase i Firebird
166 Group:          Documentation
167
168 %description doc
169 Extensive InterBase and Firebird documentation.
170
171 %description doc -l pl.UTF-8
172 Obszerna dokumentacja do baz InterBase i Firebird.
173
174 %package ss
175 Summary:        Firebird SuperServer init scripts
176 Summary(pl.UTF-8):      Skrypty startowe Firebirda jako SuperServera
177 Group:          Daemons
178 Requires:       %{name} = %{version}-%{release}
179 Requires(post,preun):   /sbin/chkconfig
180 Requires:       rc-scripts
181
182 %description ss
183 Firebird SuperServer init scripts.
184
185 %description ss -l pl.UTF-8
186 Skrypty startowe Firebirda jako SuperServera.
187
188 %package classic
189 Summary:        Firebird Classic init scripts
190 Summary(pl.UTF-8):      Skrypty startowe Firebirda w wersji Classic
191 Group:          Daemons
192 Requires:       %{name} = %{version}-%{release}
193
194 %description classic
195 Firebird Classic (inetd) init scripts.
196
197 %description classic -l pl.UTF-8
198 Skrypty startowe Firebirda w wersji Classic (inetd).
199
200 %prep
201 %setup -q -n %{name}-%{version}-0
202 %patch0 -p1
203 %patch1 -p1
204 %patch2 -p1
205 %patch3 -p1
206 %patch4 -p1
207 %patch5 -p1
208 %patch6 -p1
209 %patch7 -p1
210 %patch8 -p1
211 %patch9 -p1
212 %patch11 -p1
213 %patch12 -p1
214 %patch13 -p1
215 %patch14 -p1
216
217 mkdir docs
218 cp %{SOURCE1} %{SOURCE3} %{SOURCE4} %{SOURCE5} %{SOURCE6} %{SOURCE7} %{SOURCE8} %{SOURCE9} \
219   %{SOURCE10} %{SOURCE11} %{SOURCE12} %{SOURCE13} docs
220
221 # not processed by configure
222 %{__sed} -i -e 's/^CFLAGS.*$/& %{rpmcflags} %{rpmcppflags}/' extern/btyacc/Makefile
223 %{__sed} -i -e 's;^\(CC\|LINKER\)\(.*= \)gcc$;\1\2 %{__cc};' extern/btyacc/Makefile
224
225 %build
226 %{__libtoolize}
227 %{__aclocal}
228 %{__autoconf}
229
230 %configure \
231         CFLAGS="%{rpmcflags} -fno-delete-null-pointer-checks" \
232         --prefix=%{ibdir} \
233         --with-fbconf=%{_sysconfdir}/firebird \
234         --with-fbinclude=%{_includedir} \
235         --with-fblib=%{_libdir} \
236         --with-fblog=/var/log \
237         --with-fbsecure-db=/var/lib/firebird \
238         --with-fbglock=/var/lib/firebird \
239         --with-gnu-ld \
240         --with-gpre-pascal \
241         --with-system-editline \
242         %{?debug:--enable-debug} \
243         --disable-rpath \
244         --disable-binreloc
245
246 %{__make} -j1
247
248 %install
249 rm -rf $RPM_BUILD_ROOT
250
251 %{__make} -C src -f ../gen/Makefile.install buildRoot
252
253 install -d $RPM_BUILD_ROOT%{_sysconfdir}/{firebird{,/conf.d},rc.d/init.d,sysconfig/rc-inetd}
254 install -d $RPM_BUILD_ROOT{%{_bindir},%{ibdir},%{_libdir},%{_includedir},%{_pkgconfigdir}} \
255 install -d $RPM_BUILD_ROOT/var/{log,lib/firebird} \
256         $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
257 install -d $RPM_BUILD_ROOT%{_sysconfdir}/tmpfiles.d
258 install -d $RPM_BUILD_ROOT%{systemdunitdir}
259 cp -p %{SOURCE103} $RPM_BUILD_ROOT%{_sysconfdir}/tmpfiles.d/firebird.conf
260 touch $RPM_BUILD_ROOT/var/log/firebird.log
261
262 cp -p gen/install/misc/fbclient.pc $RPM_BUILD_ROOT%{_pkgconfigdir}
263
264 cd gen/buildroot
265 cp -p var/lib/firebird/security3.fdb $RPM_BUILD_ROOT/var/lib/firebird
266 cp -p etc/firebird/*.conf $RPM_BUILD_ROOT%{_sysconfdir}/firebird
267 chmod 755 usr/include/firebird/impl
268 cp -pr usr/include/* $RPM_BUILD_ROOT%{_includedir}
269 cp -dp usr/%{_lib}/*.so* $RPM_BUILD_ROOT%{_libdir}
270 cd .%{ibdir}
271 cp -a UDF bin help intl plugins firebird.msg $RPM_BUILD_ROOT%{ibdir}
272 ln -s %{ibdir}/intl $RPM_BUILD_ROOT%{_sysconfdir}/firebird
273 ln -s %{ibdir}/{UDF,bin,plugins,firebird.msg} $RPM_BUILD_ROOT%{_sysconfdir}/firebird
274 chmod u+w -R examples # allow further cleaning
275 cp -rf examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
276
277 ln -sf libfbclient.so.2 $RPM_BUILD_ROOT%{_libdir}/libgds.so.0
278 ln -sf libfbclient.so.2 $RPM_BUILD_ROOT%{_libdir}/libgds.so
279
280 for f in bin/{fb_lock_print,gbak,gfix,gpre,gsec,gsplit,gstat,nbackup}; do
281         ln -sf %{ibdir}/$f $RPM_BUILD_ROOT%{_bindir}/${f#bin/}
282 done
283 ln -sf %{ibdir}/bin/isql $RPM_BUILD_ROOT%{_bindir}/fb_isql
284
285 rm -f $RPM_BUILD_ROOT%{ibdir}/bin/{FirebirdUninstall.sh,changeServerMode.sh}
286
287 sed -e 's|/usr/lib|%{_libdir}|' %{SOURCE100} >$RPM_BUILD_ROOT/etc/rc.d/init.d/firebird
288 cp -p %{SOURCE101} $RPM_BUILD_ROOT/etc/sysconfig/firebird
289 sed -e 's|/usr/lib|%{_libdir}|' %{SOURCE104} >$RPM_BUILD_ROOT%{systemdunitdir}/firebird.service
290 install -d $RPM_BUILD_ROOT/run/firebird
291
292 sed -e 's|/usr/lib|%{_libdir}|' %{SOURCE102} >$RPM_BUILD_ROOT/etc/sysconfig/rc-inetd/firebird
293 sed -e 's|/usr/lib|%{_libdir}|' %{SOURCE105} >$RPM_BUILD_ROOT%{systemdunitdir}/firebird-classic@.service
294 cp -p %{SOURCE106} $RPM_BUILD_ROOT%{systemdunitdir}/firebird-classic.socket
295
296 cp -p %{SOURCE107} $RPM_BUILD_ROOT%{_sysconfdir}/firebird/conf.d/
297 cp -p %{SOURCE108} $RPM_BUILD_ROOT%{_sysconfdir}/firebird/conf.d/
298 install -p %{_sourcedir}/fb_config $RPM_BUILD_ROOT%{_bindir}/fb_config
299
300 %clean
301 rm -rf $RPM_BUILD_ROOT
302
303 %pre
304 %groupadd -g 145 firebird
305 %useradd -u 145 -d %{ibdir} -s /bin/sh -g firebird -c "Firebird Server" firebird
306
307 %postun
308 if [ "$1" = "0" ]; then
309         %userremove firebird
310         %groupremove firebird
311 fi
312
313 %post   lib -p /sbin/ldconfig
314 %postun lib -p /sbin/ldconfig
315
316 %post ss
317 /sbin/chkconfig --add firebird
318 %service firebird restart
319 %systemd_post firebird.service
320
321 %preun ss
322 if [ "$1" = "0" ]; then
323         %service firebird stop
324         /sbin/chkconfig --del firebird
325 fi
326 %systemd_preun firebird.service
327
328 %postun ss
329 %systemd_reload
330
331 %post classic
332 %systemd_post firebird-classic@.service firebird-classic.socket
333
334 %preun classic
335 %systemd_preun firebird-classic@.service firebird-classic.socket
336
337 %postun classic
338 %systemd_reload
339
340 %triggerpostun -- %{name} < 2.1.1.17910-2
341 if [ -f %{ibdir}/firebird.conf.rpmsave ]; then
342         mv -f %{ibdir}/firebird.conf.rpmsave %{_sysconfdir}/firebird/firebird.conf
343 fi
344
345 %files
346 %defattr(644,root,root,755)
347 %doc doc/{license,sql.extensions,Firebird_conf.txt,README.user*,WhatsNew,fb2-todo.txt}
348 %dir %{_sysconfdir}/firebird
349 %dir %{_sysconfdir}/firebird/conf.d
350 %attr(640,root,firebird) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/firebird/databases.conf
351 %attr(640,root,firebird) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/firebird/fbtrace.conf
352 %attr(640,root,firebird) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/firebird/firebird.conf
353 %attr(640,root,firebird) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/firebird/plugins.conf
354 %{_sysconfdir}/firebird/intl
355 %{_sysconfdir}/firebird/UDF
356 %{_sysconfdir}/firebird/bin
357 %{_sysconfdir}/firebird/firebird.msg
358 %{_sysconfdir}/firebird/plugins
359 %attr(755,root,root) %{_bindir}/fb_isql
360 %attr(755,root,root) %{_bindir}/fb_lock_print
361 %attr(755,root,root) %{_bindir}/gbak
362 %attr(755,root,root) %{_bindir}/gfix
363 %attr(755,root,root) %{_bindir}/gsec
364 %attr(755,root,root) %{_bindir}/gsplit
365 %attr(755,root,root) %{_bindir}/gstat
366 %attr(755,root,root) %{_bindir}/nbackup
367 %attr(755,root,root) %{_libdir}/libib_util.so
368 %attr(755,root,root) %{ibdir}/UDF
369 %attr(755,root,root) %{ibdir}/bin/*
370 %exclude %{ibdir}/bin/fb_config
371 %exclude %{ibdir}/bin/gpre
372 %exclude %{ibdir}/bin/fbguard
373 %{ibdir}/help
374 %dir %{ibdir}/intl
375 %attr(755,root,root) %{ibdir}/intl/fbintl
376 # should it be moved to %{_sysconfdir} and marked as config?
377 %{ibdir}/intl/fbintl.conf
378 %dir %{ibdir}/plugins
379 %attr(755,root,root) %{ibdir}/plugins/libfbtrace.so
380 %attr(755,root,root) %{ibdir}/plugins/libCryptKeyHolder_example.so
381 %attr(755,root,root) %{ibdir}/plugins/libDbCrypt_example.so
382 %attr(755,root,root) %{ibdir}/plugins/libEngine12.so
383 %attr(755,root,root) %{ibdir}/plugins/libLegacy_Auth.so
384 %attr(755,root,root) %{ibdir}/plugins/libLegacy_UserManager.so
385 %attr(755,root,root) %{ibdir}/plugins/libSrp.so
386 %attr(755,root,root) %{ibdir}/plugins/libudr_engine.so
387 %dir %{ibdir}/plugins/udr
388 %attr(755,root,root) %{ibdir}/plugins/udr/libudrcpp_example.so
389 %{ibdir}/plugins/udr_engine.conf
390
391 %{ibdir}/firebird.msg
392 %dir %attr(770,root,firebird) /var/lib/firebird
393 %attr(660,root,firebird) %config(noreplace) %verify(not md5 mtime size) /var/lib/firebird/security3.fdb
394 %attr(660,root,firebird) %config(noreplace) %verify(not md5 mtime size) /var/log/firebird.log
395
396
397 %files dirs
398 %defattr(644,root,root,755)
399 %dir %{ibdir}
400 %dir %{ibdir}/bin
401
402 %files lib
403 %defattr(644,root,root,755)
404 %attr(755,root,root) %{_libdir}/libfbclient.so.*.*.*
405 %attr(755,root,root) %ghost %{_libdir}/libfbclient.so.2
406
407 # InterBase/old Firebird compatibility symlinks
408 %attr(755,root,root) %{_libdir}/libgds.so.0
409 # needed here - original libgds.so.0 didn't have soname, so some old
410 # (possibly not open-source) apps may be linked with libgds.so
411 %attr(755,root,root) %{_libdir}/libgds.so
412
413 %files devel
414 %defattr(644,root,root,755)
415 %attr(755,root,root) %{_bindir}/fb_config
416 %attr(755,root,root) %{_libdir}/libfbclient.so
417 %attr(755,root,root) %{ibdir}/bin/fb_config
418 %attr(755,root,root) %{ibdir}/bin/gpre
419 %attr(755,root,root) %{_bindir}/gpre
420 %{_pkgconfigdir}/fbclient.pc
421 %{_includedir}/firebird
422 %{_includedir}/ib_util.h
423 %{_includedir}/ibase.h
424 %{_includedir}/iberror.h
425 %{_includedir}/perf.h
426 %{_examplesdir}/%{name}-%{version}
427
428 %files doc
429 %defattr(644,root,root,755)
430 %doc docs/*
431
432 %files ss
433 %defattr(644,root,root,755)
434 %attr(640,root,firebird) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/firebird/conf.d/server_mode-ss.conf
435 %attr(754,root,root) /etc/rc.d/init.d/firebird
436 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/firebird
437 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/tmpfiles.d/firebird.conf
438 %attr(755,root,root) %{ibdir}/bin/fbguard
439 %dir %attr(770,root,firebird) /run/firebird
440 %{systemdunitdir}/firebird.service
441
442 %files classic
443 %defattr(644,root,root,755)
444 %attr(640,root,firebird) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/firebird/conf.d/server_mode-classic.conf
445 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/rc-inetd/firebird
446 %{systemdunitdir}/firebird-classic@.service
447 %{systemdunitdir}/firebird-classic.socket
This page took 0.081215 seconds and 4 git commands to generate.