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