]> git.pld-linux.org Git - packages/Firebird.git/blob - Firebird.spec
- updated to 4.0.4.3010
[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/security4.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:        4.0.4.3010
19 Release:        0.3
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/v4.0.4/%{name}-%{version}-0.tar.xz
23 # Source0-md5:  25da348775097c75c5458e91a761909f
24 Source1:        http://www.firebirdsql.org/file/documentation/reference_manuals/user_manuals/%{name}-3-QuickStart.pdf
25 # Source1-md5:  c69991a4311090d6d672f7faaab6390e
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:  98d310a374ecc3f1f241e1feac6e4dca
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: a4a711621697fb1a23c35943a79d763b
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 Patch9:         parallel-build.patch
70 Patch10:        no-copy-from-icu.patch
71 Patch11:        config.patch
72 Patch12:        chown.patch
73 Patch13:        cloop-honour-build-flags.patch
74 Patch14:        mod_loader.patch
75 URL:            http://www.firebirdsql.org/
76 BuildRequires:  autoconf >= 2.67
77 BuildRequires:  automake
78 BuildRequires:  bison
79 BuildRequires:  libatomic_ops
80 BuildRequires:  libedit-devel
81 BuildRequires:  libicu-devel
82 BuildRequires:  libstdc++-devel
83 BuildRequires:  libtommath-devel
84 BuildRequires:  libtool >= 2:2
85 # for lockfile
86 BuildRequires:  procmail
87 BuildRequires:  rpmbuild(macros) >= 1.268
88 BuildRequires:  sed >= 4.0
89 BuildRequires:  zlib-devel
90 Requires:       %{name}-dirs = %{version}-%{release}
91 Requires:       %{name}-lib = %{version}-%{release}
92 # official ports are x86, x86_64, ppc, sparc, arm, mips/mipsel, ia64
93 # alpha is added in morearchs patch
94 # see morearchs patch if you want more
95 ExclusiveArch:  %{ix86} %{x8664} x32 arm ia64 mips mipsel ppc sparc sparcv9 alpha
96 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
97
98 %define         filterout       -flto
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 %patch9 -p1
211 %patch11 -p1
212 %patch12 -p1
213 %patch13 -p1
214 %patch14 -p1
215
216 mkdir docs
217 cp %{SOURCE1} %{SOURCE3} %{SOURCE4} %{SOURCE5} %{SOURCE6} %{SOURCE7} %{SOURCE8} %{SOURCE9} \
218   %{SOURCE10} %{SOURCE11} %{SOURCE12} %{SOURCE13} docs
219
220 # not processed by configure
221 %{__sed} -i -e 's/^CFLAGS.*$/& %{rpmcflags} %{rpmcppflags}/' extern/btyacc/Makefile
222 %{__sed} -i -e 's;^\(CC\|LINKER\)\(.*= \)gcc$;\1\2 %{__cc};' extern/btyacc/Makefile
223
224 %build
225 %{__libtoolize}
226 %{__aclocal}
227 %{__autoconf}
228
229 %configure \
230         CFLAGS="%{rpmcflags} -fno-delete-null-pointer-checks" \
231         --prefix=%{ibdir} \
232         --with-fbconf=%{_sysconfdir}/firebird \
233         --with-fbinclude=%{_includedir} \
234         --with-fblib=%{_libdir} \
235         --with-fblog=/var/log \
236         --with-fbsecure-db=/var/lib/firebird \
237         --with-fbglock=/var/lib/firebird \
238         --with-gnu-ld \
239         --with-gpre-pascal \
240         --with-system-editline \
241         %{?debug:--enable-debug} \
242         --disable-rpath \
243         --disable-binreloc
244
245 %{__make} -j1
246
247 %install
248 rm -rf $RPM_BUILD_ROOT
249
250 %{__make} -C src -f ../gen/Makefile.install buildRoot
251
252 install -d $RPM_BUILD_ROOT%{_sysconfdir}/{firebird{,/conf.d},rc.d/init.d,sysconfig/rc-inetd}
253 install -d $RPM_BUILD_ROOT{%{_bindir},%{ibdir},%{_libdir},%{_includedir},%{_pkgconfigdir}} \
254 install -d $RPM_BUILD_ROOT/var/{log,lib/firebird} \
255         $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
256 install -d $RPM_BUILD_ROOT%{_sysconfdir}/tmpfiles.d
257 install -d $RPM_BUILD_ROOT%{systemdunitdir}
258 cp -p %{SOURCE103} $RPM_BUILD_ROOT%{_sysconfdir}/tmpfiles.d/firebird.conf
259 touch $RPM_BUILD_ROOT/var/log/firebird.log
260
261 cp -p gen/install/misc/fbclient.pc $RPM_BUILD_ROOT%{_pkgconfigdir}
262
263 cd gen/buildroot
264 cp -p var/lib/firebird/security4.fdb $RPM_BUILD_ROOT/var/lib/firebird
265 cp -p etc/firebird/*.conf $RPM_BUILD_ROOT%{_sysconfdir}/firebird
266 chmod 755 usr/include/firebird/impl
267 cp -pr usr/include/* $RPM_BUILD_ROOT%{_includedir}
268 cp -dp usr/%{_lib}/*.so* $RPM_BUILD_ROOT%{_libdir}
269 cd .%{ibdir}
270 cp -a bin help intl plugins firebird.msg $RPM_BUILD_ROOT%{ibdir}
271 ln -s %{ibdir}/intl $RPM_BUILD_ROOT%{_sysconfdir}/firebird
272 ln -s %{ibdir}/{bin,plugins,firebird.msg} $RPM_BUILD_ROOT%{_sysconfdir}/firebird
273 chmod u+w -R examples # allow further cleaning
274 cp -rf examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
275
276 ln -sf libfbclient.so.2 $RPM_BUILD_ROOT%{_libdir}/libgds.so.0
277 ln -sf libfbclient.so.2 $RPM_BUILD_ROOT%{_libdir}/libgds.so
278
279 for f in bin/{fb_lock_print,gbak,gfix,gpre,gsec,gsplit,gstat,nbackup}; do
280         ln -sf %{ibdir}/$f $RPM_BUILD_ROOT%{_bindir}/${f#bin/}
281 done
282 ln -sf %{ibdir}/bin/isql $RPM_BUILD_ROOT%{_bindir}/fb_isql
283
284 rm -f $RPM_BUILD_ROOT%{ibdir}/bin/{FirebirdUninstall.sh,changeServerMode.sh}
285
286 sed -e 's|/usr/lib|%{_libdir}|' %{SOURCE100} >$RPM_BUILD_ROOT/etc/rc.d/init.d/firebird
287 cp -p %{SOURCE101} $RPM_BUILD_ROOT/etc/sysconfig/firebird
288 sed -e 's|/usr/lib|%{_libdir}|' %{SOURCE104} >$RPM_BUILD_ROOT%{systemdunitdir}/firebird.service
289 install -d $RPM_BUILD_ROOT/run/firebird
290
291 sed -e 's|/usr/lib|%{_libdir}|' %{SOURCE102} >$RPM_BUILD_ROOT/etc/sysconfig/rc-inetd/firebird
292 sed -e 's|/usr/lib|%{_libdir}|' %{SOURCE105} >$RPM_BUILD_ROOT%{systemdunitdir}/firebird-classic@.service
293 cp -p %{SOURCE106} $RPM_BUILD_ROOT%{systemdunitdir}/firebird-classic.socket
294
295 cp -p %{SOURCE107} $RPM_BUILD_ROOT%{_sysconfdir}/firebird/conf.d/
296 cp -p %{SOURCE108} $RPM_BUILD_ROOT%{_sysconfdir}/firebird/conf.d/
297 install -p %{_sourcedir}/fb_config $RPM_BUILD_ROOT%{_bindir}/fb_config
298
299 %clean
300 rm -rf $RPM_BUILD_ROOT
301
302 %pre
303 %groupadd -g 145 firebird
304 %useradd -u 145 -d %{ibdir} -s /bin/sh -g firebird -c "Firebird Server" firebird
305
306 %postun
307 if [ "$1" = "0" ]; then
308         %userremove firebird
309         %groupremove firebird
310 fi
311
312 %post   lib -p /sbin/ldconfig
313 %postun lib -p /sbin/ldconfig
314
315 %post ss
316 /sbin/chkconfig --add firebird
317 %service firebird restart
318 %systemd_post firebird.service
319
320 %preun ss
321 if [ "$1" = "0" ]; then
322         %service firebird stop
323         /sbin/chkconfig --del firebird
324 fi
325 %systemd_preun firebird.service
326
327 %postun ss
328 %systemd_reload
329
330 %post classic
331 %systemd_post firebird-classic@.service firebird-classic.socket
332
333 %preun classic
334 %systemd_preun firebird-classic@.service firebird-classic.socket
335
336 %postun classic
337 %systemd_reload
338
339 %triggerpostun -- %{name} < 2.1.1.17910-2
340 if [ -f %{ibdir}/firebird.conf.rpmsave ]; then
341         mv -f %{ibdir}/firebird.conf.rpmsave %{_sysconfdir}/firebird/firebird.conf
342 fi
343
344 %files
345 %defattr(644,root,root,755)
346 %doc doc/{license,sql.extensions,Firebird_conf.txt,README.user*}
347 %dir %{_sysconfdir}/firebird
348 %dir %{_sysconfdir}/firebird/conf.d
349 %attr(640,root,firebird) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/firebird/databases.conf
350 %attr(640,root,firebird) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/firebird/fbtrace.conf
351 %attr(640,root,firebird) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/firebird/firebird.conf
352 %attr(640,root,firebird) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/firebird/plugins.conf
353 %attr(640,root,firebird) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/firebird/replication.conf
354 %{_sysconfdir}/firebird/intl
355 %{_sysconfdir}/firebird/bin
356 %{_sysconfdir}/firebird/firebird.msg
357 %{_sysconfdir}/firebird/plugins
358 %attr(755,root,root) %{_bindir}/fb_isql
359 %attr(755,root,root) %{_bindir}/fb_lock_print
360 %attr(755,root,root) %{_bindir}/gbak
361 %attr(755,root,root) %{_bindir}/gfix
362 %attr(755,root,root) %{_bindir}/gsec
363 %attr(755,root,root) %{_bindir}/gsplit
364 %attr(755,root,root) %{_bindir}/gstat
365 %attr(755,root,root) %{_bindir}/nbackup
366 %attr(755,root,root) %{_libdir}/libib_util.so
367 %attr(755,root,root) %{ibdir}/bin/*
368 %exclude %{ibdir}/bin/fb_config
369 %exclude %{ibdir}/bin/gpre
370 %exclude %{ibdir}/bin/fbguard
371 %{ibdir}/help
372 %dir %{ibdir}/intl
373 %attr(755,root,root) %{ibdir}/intl/fbintl
374 # should it be moved to %{_sysconfdir} and marked as config?
375 %{ibdir}/intl/fbintl.conf
376 %dir %{ibdir}/plugins
377 %attr(755,root,root) %{ibdir}/plugins/libChaCha.so
378 %attr(755,root,root) %{ibdir}/plugins/libfbtrace.so
379 %attr(755,root,root) %{ibdir}/plugins/libEngine13.so
380 %attr(755,root,root) %{ibdir}/plugins/libLegacy_Auth.so
381 %attr(755,root,root) %{ibdir}/plugins/libLegacy_UserManager.so
382 %attr(755,root,root) %{ibdir}/plugins/libSrp.so
383 %attr(755,root,root) %{ibdir}/plugins/libudr_engine.so
384 %dir %{ibdir}/plugins/udr
385 %attr(755,root,root) %{ibdir}/plugins/udr/libudf_compat.so
386 %{ibdir}/plugins/udr/udf_compat.sql
387 %attr(755,root,root) %{ibdir}/plugins/udr/libudrcpp_example.so
388 %{ibdir}/plugins/udr_engine.conf
389
390 %{ibdir}/firebird.msg
391 %dir %attr(770,root,firebird) /var/lib/firebird
392 %attr(660,root,firebird) %config(noreplace) %verify(not md5 mtime size) /var/lib/firebird/security4.fdb
393 %attr(660,root,firebird) %config(noreplace) %verify(not md5 mtime size) /var/log/firebird.log
394
395
396 %files dirs
397 %defattr(644,root,root,755)
398 %dir %{ibdir}
399 %dir %{ibdir}/bin
400
401 %files lib
402 %defattr(644,root,root,755)
403 %attr(755,root,root) %{_libdir}/libfbclient.so.*.*.*
404 %attr(755,root,root) %ghost %{_libdir}/libfbclient.so.2
405
406 # InterBase/old Firebird compatibility symlinks
407 %attr(755,root,root) %{_libdir}/libgds.so.0
408 # needed here - original libgds.so.0 didn't have soname, so some old
409 # (possibly not open-source) apps may be linked with libgds.so
410 %attr(755,root,root) %{_libdir}/libgds.so
411
412 %files devel
413 %defattr(644,root,root,755)
414 %attr(755,root,root) %{_bindir}/fb_config
415 %attr(755,root,root) %{_libdir}/libfbclient.so
416 %attr(755,root,root) %{ibdir}/bin/fb_config
417 %attr(755,root,root) %{ibdir}/bin/gpre
418 %attr(755,root,root) %{_bindir}/gpre
419 %{_pkgconfigdir}/fbclient.pc
420 %{_includedir}/firebird
421 %{_includedir}/ib_util.h
422 %{_includedir}/ibase.h
423 %{_includedir}/iberror.h
424 %{_includedir}/perf.h
425 %{_examplesdir}/%{name}-%{version}
426
427 %files doc
428 %defattr(644,root,root,755)
429 %doc docs/*
430
431 %files ss
432 %defattr(644,root,root,755)
433 %attr(640,root,firebird) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/firebird/conf.d/server_mode-ss.conf
434 %attr(754,root,root) /etc/rc.d/init.d/firebird
435 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/firebird
436 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/tmpfiles.d/firebird.conf
437 %attr(755,root,root) %{ibdir}/bin/fbguard
438 %dir %attr(770,root,firebird) /run/firebird
439 %{systemdunitdir}/firebird.service
440
441 %files classic
442 %defattr(644,root,root,755)
443 %attr(640,root,firebird) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/firebird/conf.d/server_mode-classic.conf
444 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/rc-inetd/firebird
445 %{systemdunitdir}/firebird-classic@.service
446 %{systemdunitdir}/firebird-classic.socket
This page took 0.992822 seconds and 4 git commands to generate.