]> git.pld-linux.org Git - packages/Firebird.git/blame_incremental - Firebird.spec
- rel 1
[packages/Firebird.git] / Firebird.spec
... / ...
CommitLineData
1# TODO:
2# - check running
3# - 2.5 -> 3.0 migration?
4# - systemd support (see builds/install/arch-specific/linux : gen/install/misc/*)
5# - more docs from http://www.firebirdsql.org/en/reference-manuals/ ?
6# - kill unaligned accesses (create_db,gpre_current,gbak_static,isql_static) on alpha
7# - check if it's fixed now (RISC_ALIGNMENT is defined)
8# - create classic server/super server subpackages and drop bcond
9# (see firebird2 on debian how to do it)
10# - logrotate script
11#
12# Conditional build:
13%bcond_with ss # Super Server (standalone daemon instead of inetd service)
14#
15Summary: Firebird SQL Database Server and Client tools
16Summary(de.UTF-8): Firebird - relationalen Open-Source- Datenbankmanagementsystems
17Summary(pl.UTF-8): Firebird - serwer baz danych SQL oraz narzędzia klienckie
18Name: Firebird
19# FirebirdCS/FirebirdSS (Classic Server/Super Server)?
20Version: 3.0.1.32609
21Release: 1
22License: Interbase Public License 1.0, Initial Developer's Public License 1.0
23Group: Applications/Databases
24Source0: http://downloads.sourceforge.net/firebird/%{name}-%{version}-0.tar.bz2
25# Source0-md5: 85e2ace3d6950793d4c6917473e00c74
26Source1: http://www.firebirdsql.org/file/documentation/reference_manuals/user_manuals/Firebird-3-QuickStart.pdf
27# Source1-md5: 8e029d449e9cb3e1da8213ac6c11ad02
28# distfiles refuses this, would require some audit to allow '('/')' chars
29#Source2: http://www.firebirdsql.org/pdfmanual/Using-Firebird_(wip).pdf
30## Source2-md5: 9eb90583c200bdd7292a80ecc1df1178
31Source3: http://www.firebirdsql.org/pdfmanual/%{name}-Null-Guide.pdf
32# Source3-md5: d1f8ba75fe3bb9eb9d203ce3f82a1a1a
33Source4: http://www.firebirdsql.org/pdfmanual/%{name}-Generator-Guide.pdf
34# Source4-md5: 44e7568ef477072a8ad5f381c3e12a75
35Source5: http://www.firebirdsql.org/pdfmanual/MSSQL-to-%{name}.pdf
36# Source5-md5: 1bd4a168e550910fc899e2aa125d83a3
37Source6: http://www.firebirdsql.org/pdfmanual/%{name}-nbackup.pdf
38# Source6-md5: 7ef8a8b9a899d06bec2a5da0bb5fea0e
39Source7: http://www.firebirdsql.org/pdfmanual/%{name}-Utils-WIP.pdf
40# Source7-md5: 39b9a4f3c9d9e27d985e9277ae163ceb
41Source8: http://www.firebirdnews.org/docs/fb2min.pdf
42# Source8-md5: ebac312c0afbe97b1850bdc74c553c28
43Source9: http://www.firebirdsql.org/doc/contrib/fb_2_1_errorcodes.pdf
44# Source9-md5: 9ab392dc349657dbcf9a9c35acd8e8db
45Source100: firebird.init
46Source101: firebird.sysconfig
47Source102: firebird.inetd
48Patch0: %{name}-chmod.patch
49Patch1: %{name}-editline.patch
50Patch2: %{name}-va.patch
51Patch3: %{name}-FHS.patch
52Patch4: %{name}-opt.patch
53Patch5: %{name}-gcc-icu.patch
54Patch6: %{name}-libpath.patch
55Patch7: Make-the-generated-code-compatible-with-gcc-6-in-C-1.patch
56Patch8: Provide-sized-global-delete-operators-when-compiled.patch
57Patch9: parallel-build.patch
58Patch10: no-copy-from-icu.patch
59URL: http://www.firebirdsql.org/
60BuildRequires: autoconf >= 2.67
61BuildRequires: automake
62BuildRequires: bison
63BuildRequires: libatomic_ops
64BuildRequires: libedit-devel
65BuildRequires: libicu-devel
66BuildRequires: libstdc++-devel
67BuildRequires: libtommath-devel
68BuildRequires: libtool >= 2:2
69# for lockfile
70BuildRequires: procmail
71BuildRequires: rpmbuild(macros) >= 1.268
72BuildRequires: sed >= 4.0
73BuildRequires: zlib-devel
74Requires: %{name}-dirs = %{version}-%{release}
75Requires: %{name}-lib = %{version}-%{release}
76%if %{with ss}
77Requires(post,preun): /sbin/chkconfig
78Requires: rc-scripts
79%endif
80# official ports are x86, x86_64, ppc, sparc, arm, mips/mipsel, ia64
81# alpha is added in morearchs patch
82# see morearchs patch if you want more
83ExclusiveArch: %{ix86} %{x8664} x32 arm ia64 mips mipsel ppc sparc sparcv9 alpha
84BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
85
86%define ibdir %{_libdir}/interbase
87%define specflags -fno-strict-aliasing
88%define debugcflags -O1 -g -Wall -fno-strict-aliasing
89%define Werror_cflags ''
90
91%description
92Firebird is a powerful, high-performance relational database designed
93to be embedded into applications on multiple platforms.
94
95%description -l pl.UTF-8
96Firebird jest potężnym, wysoko wydajnym systemem relacyjnych baz
97danych zaprojektowanym do osadzania w aplikacjach na wielu
98platformach.
99
100%description -l de.UTF-8
101Firebird ist der Open-Source-Spin-Off des weiterhin kommerziell von
102Borland vertriebenen relationalen Datenbankmanagementsystemes
103InterBase. Die Abspaltung erfolgte im Jahre 2000 als kurz vor Freigabe
104der Version 6 des kommerziellen Vorgängers Interbase bei Borland
105ernsthafte Überlegungen im Gange waren, die Weiterentwicklung
106einzustellen.
107
108Aus Interbase 6.0 wurde Firebird 1.0, wobei dies als eine
109Bugfix-Version mit nur wenigen Erweiterungen angesehen werden kann.
110Eine Erweiterung von Firebird 1.0 ist der 64-Bit File I/O, so dass
111auch Datenbankdateien über 2GB erzeugt werden können.
112
113%package dirs
114Summary: Firebird SQL Database common directories
115Summary(pl.UTF-8): Firebird - wspólne katalogi
116Group: Applications/Databases
117
118%description dirs
119Firebird SQL Database common directories.
120
121%description dirs -l pl.UTF-8
122Firebird - wspólne katalogi.
123
124%package lib
125Summary: Firebird shared library
126Summary(pl.UTF-8): Biblioteka współdzielona Firebird
127Group: Libraries
128
129%description lib
130Firebird shared library (libgds).
131
132%description lib -l pl.UTF-8
133Biblioteka współdzielona Firebird (libgds).
134
135%package devel
136Summary: Header files for Firebird library
137Summary(pl.UTF-8): Pliki nagłówkowe biblioteki Firebird
138Group: Development/Libraries
139Requires: %{name}-dirs = %{version}-%{release}
140Requires: %{name}-lib = %{version}-%{release}
141Requires: libstdc++-devel
142Obsoletes: Firebird-static
143
144%description devel
145Header files for Firebird library.
146
147%description devel -l pl.UTF-8
148Pliki nagłówkowe biblioteki Firebird.
149
150%package doc
151Summary: Extensive InterBase and Firebird documentation
152Summary(pl.UTF-8): Obszerna dokumentacja do baz InterBase i Firebird
153Group: Documentation
154
155%description doc
156Extensive InterBase and Firebird documentation.
157
158%description doc -l pl.UTF-8
159Obszerna dokumentacja do baz InterBase i Firebird.
160
161%prep
162%setup -q -n %{name}-%{version}-0
163%patch0 -p1
164%patch1 -p1
165%patch2 -p1
166%patch3 -p1
167%patch4 -p1
168%patch5 -p0
169%patch6 -p1
170%patch7 -p1
171%patch8 -p1
172%patch9 -p1
173%patch10 -p1
174
175mkdir docs
176cp %{SOURCE1} %{SOURCE3} %{SOURCE4} %{SOURCE5} %{SOURCE6} %{SOURCE7} %{SOURCE8} %{SOURCE9} docs
177
178# not processed by configure
179%{__sed} -i -e 's/^CFLAGS.*$/& %{rpmcflags} %{rpmcppflags}/' extern/btyacc/Makefile
180%{__sed} -i -e 's/^\(CC\|LINKER\)\(.*= \)gcc$/\1\2 %{__cc}/' extern/btyacc/Makefile
181
182%build
183%{__libtoolize}
184%{__aclocal}
185%{__autoconf}
186
187%configure \
188 CFLAGS="%{rpmcflags} -fno-delete-null-pointer-checks" \
189 --prefix=%{ibdir} \
190 --with-system-editline \
191 --with-fbconf=%{_sysconfdir}/firebird \
192 --with-fbinclude=%{_includedir} \
193 --with-fblib=%{_libdir} \
194 --with-fblog=/var/log \
195 --with-fbsecure-db=/var/lib/firebird \
196 --with-fbglock=/var/lib/firebird \
197 --with-gnu-ld \
198 --with-gpre-pascal \
199 --with-system-editline \
200 %{?debug:--enable-debug} \
201 --disable-rpath \
202 --disable-binreloc \
203 %{?with_ss:--enable-superserver} \
204
205%{__make} -j1
206
207%install
208rm -rf $RPM_BUILD_ROOT
209
210%{__make} -C src -f ../gen/Makefile.install buildImageDir
211
212install -d $RPM_BUILD_ROOT%{_sysconfdir}/{firebird,rc.d/init.d,sysconfig/rc-inetd}
213install -d $RPM_BUILD_ROOT{%{_bindir},%{ibdir},%{_libdir},%{_includedir}} \
214install -d $RPM_BUILD_ROOT/var/{log,lib/firebird} \
215 $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
216
217touch $RPM_BUILD_ROOT/var/log/firebird.log
218
219cd gen/buildroot
220install var/lib/firebird/security3.fdb $RPM_BUILD_ROOT/var/lib/firebird
221install etc/firebird/*.conf $RPM_BUILD_ROOT%{_sysconfdir}/firebird
222chmod 755 usr/include/firebird/impl
223cp -pr usr/include/* $RPM_BUILD_ROOT%{_includedir}
224cp -dp usr/%{_lib}/*.so* $RPM_BUILD_ROOT%{_libdir}
225cd .%{ibdir}
226cp -a UDF bin help intl plugins firebird.msg $RPM_BUILD_ROOT%{ibdir}
227ln -s %{ibdir}/intl $RPM_BUILD_ROOT%{_sysconfdir}/firebird
228chmod u+w -R examples # allow further cleaning
229cp -rf examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
230
231ln -sf libfbclient.so.2 $RPM_BUILD_ROOT%{_libdir}/libgds.so.0
232ln -sf libfbclient.so.2 $RPM_BUILD_ROOT%{_libdir}/libgds.so
233
234for f in bin/{fb_lock_print,gbak,gfix,gpre,gsec,gsplit,gstat,nbackup}; do
235 ln -sf %{ibdir}/$f $RPM_BUILD_ROOT%{_bindir}/${f#bin/}
236done
237
238%if %{with ss}
239install %{SOURCE100} $RPM_BUILD_ROOT/etc/rc.d/init.d/firebird
240install %{SOURCE101} $RPM_BUILD_ROOT/etc/sysconfig/firebird
241install -d $RPM_BUILD_ROOT/var/run/firebird
242%else
243sed -e 's|/usr/lib|%{_libdir}|' %{SOURCE102} >$RPM_BUILD_ROOT/etc/sysconfig/rc-inetd/firebird
244%endif
245
246%clean
247rm -rf $RPM_BUILD_ROOT
248
249%pre
250%groupadd -g 145 firebird
251%useradd -u 145 -d %{ibdir} -s /bin/sh -g firebird -c "Firebird Server" firebird
252
253%if %{with ss}
254%post
255/sbin/chkconfig --add firebird
256%service firebird restart
257
258%preun
259if [ "$1" = "0" ]; then
260 %service firebird stop
261 /sbin/chkconfig --del firebird
262fi
263%endif
264
265%postun
266if [ "$1" = "0" ]; then
267 %userremove firebird
268 %groupremove firebird
269fi
270
271%post lib -p /sbin/ldconfig
272%postun lib -p /sbin/ldconfig
273
274%triggerpostun -- %{name} < 2.1.1.17910-2
275if [ -f %{ibdir}/firebird.conf.rpmsave ]; then
276 mv -f %{ibdir}/firebird.conf.rpmsave %{_sysconfdir}/firebird/firebird.conf
277fi
278
279%files
280%defattr(644,root,root,755)
281%doc doc/{license,sql.extensions,Firebird_conf.txt,README.user*,WhatsNew,fb2-todo.txt}
282%dir %{_sysconfdir}/firebird
283%attr(640,root,firebird) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/firebird/databases.conf
284%attr(640,root,firebird) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/firebird/fbtrace.conf
285%attr(640,root,firebird) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/firebird/firebird.conf
286%attr(640,root,firebird) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/firebird/plugins.conf
287%{_sysconfdir}/firebird/intl
288%attr(755,root,root) %{_bindir}/fb_lock_print
289%attr(755,root,root) %{_bindir}/gbak
290%attr(755,root,root) %{_bindir}/gfix
291%attr(755,root,root) %{_bindir}/gpre
292%attr(755,root,root) %{_bindir}/gsec
293%attr(755,root,root) %{_bindir}/gsplit
294%attr(755,root,root) %{_bindir}/gstat
295%attr(755,root,root) %{_bindir}/nbackup
296%attr(755,root,root) %{_libdir}/libib_util.so
297%attr(755,root,root) %{ibdir}/UDF
298%attr(755,root,root) %{ibdir}/bin/*
299%exclude %{ibdir}/bin/fb_config
300%{ibdir}/help
301%dir %attr(770,root,firebird) %{ibdir}/intl
302%attr(755,root,root) %{ibdir}/intl/fbintl
303# should it be moved to %{_sysconfdir} and marked as config?
304%{ibdir}/intl/fbintl.conf
305%dir %{ibdir}/plugins
306%attr(755,root,root) %{ibdir}/plugins/libfbtrace.so
307%attr(755,root,root) %{ibdir}/plugins/libCryptKeyHolder_example.so
308%attr(755,root,root) %{ibdir}/plugins/libDbCrypt_example.so
309%attr(755,root,root) %{ibdir}/plugins/libEngine12.so
310%attr(755,root,root) %{ibdir}/plugins/libLegacy_Auth.so
311%attr(755,root,root) %{ibdir}/plugins/libLegacy_UserManager.so
312%attr(755,root,root) %{ibdir}/plugins/libSrp.so
313%attr(755,root,root) %{ibdir}/plugins/libudr_engine.so
314%dir %{ibdir}/plugins/udr
315%attr(755,root,root) %{ibdir}/plugins/udr/libudrcpp_example.so
316%{ibdir}/plugins/udr_engine.conf
317
318%{ibdir}/firebird.msg
319%dir %attr(770,root,firebird) /var/lib/firebird
320%attr(660,root,firebird) %config(noreplace) %verify(not md5 mtime size) /var/lib/firebird/security3.fdb
321%attr(660,root,firebird) %config(noreplace) %verify(not md5 mtime size) /var/log/firebird.log
322
323%if %{with ss}
324%attr(754,root,root) /etc/rc.d/init.d/firebird
325%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/firebird
326%attr(770,root,firebird) /var/run/firebird
327%else
328%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/rc-inetd/firebird
329%endif
330
331%files dirs
332%defattr(644,root,root,755)
333%dir %{ibdir}
334%dir %{ibdir}/bin
335
336%files lib
337%defattr(644,root,root,755)
338%attr(755,root,root) %{_libdir}/libfbclient.so.*.*.*
339%attr(755,root,root) %ghost %{_libdir}/libfbclient.so.2
340
341# InterBase/old Firebird compatibility symlinks
342%attr(755,root,root) %{_libdir}/libgds.so.0
343# needed here - original libgds.so.0 didn't have soname, so some old
344# (possibly not open-source) apps may be linked with libgds.so
345%attr(755,root,root) %{_libdir}/libgds.so
346
347%files devel
348%defattr(644,root,root,755)
349%attr(755,root,root) %{_libdir}/libfbclient.so
350%attr(755,root,root) %{ibdir}/bin/fb_config
351%{_includedir}/firebird
352%{_includedir}/ib_util.h
353%{_includedir}/ibase.h
354%{_includedir}/iberror.h
355%{_includedir}/perf.h
356%{_examplesdir}/%{name}-%{version}
357
358%files doc
359%defattr(644,root,root,755)
360%doc docs/*
This page took 0.076209 seconds and 4 git commands to generate.