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