]> git.pld-linux.org Git - packages/Firebird.git/blame_incremental - Firebird.spec
- fixed md5, in Firebird 2.x is security2.fdb, no security.fdb
[packages/Firebird.git] / Firebird.spec
... / ...
CommitLineData
1# TODO:
2# - kill unaligned accesses (create_db,gpre_current,gbak_static,isql_static) on alpha
3# - create classic server/super server subpackages and drop bcond
4# (see firebird2 on debian how to do it)
5#
6# Conditional build:
7%bcond_with ss # Super Server (standalone daemon instead of inetd service)
8#
9Summary: Firebird SQL Database Server and Client tools
10Summary(de.UTF-8): Firebird - relationalen Open-Source- Datenbankmanagementsystems
11Summary(pl.UTF-8): Firebird - serwer baz danych SQL oraz narzędzia klienckie
12Name: Firebird
13# FirebirdCS/FirebirdSS (Classic Server/Super Server)?
14Version: 2.1.0.17798
15Release: 1
16License: Interbase Public License 1.0
17Group: Applications/Databases
18Source0: http://dl.sourceforge.net/firebird/Firebird-%{version}-0.tar.bz2
19# Source0-md5: e663417416b4dc808d6ace991e6b783f
20Source1: http://www.firebirdsql.org/pdfmanual/Firebird-2.0-QuickStart.pdf
21# Source1-md5: d77105c5b24202fe7adbf2a011e71b35
22Source2: http://www.firebirdsql.org/pdfmanual/Using-Firebird_(wip).pdf
23# Source2-md5: 9eb90583c200bdd7292a80ecc1df1178
24Source3: http://www.firebirdsql.org/pdfmanual/Firebird-Null-Guide.pdf
25# Source3-md5: d1f8ba75fe3bb9eb9d203ce3f82a1a1a
26Source4: http://www.firebirdsql.org/pdfmanual/Firebird-Generator-Guide.pdf
27# Source4-md5: 44e7568ef477072a8ad5f381c3e12a75
28Source5: http://www.firebirdsql.org/pdfmanual/MSSQL-to-Firebird.pdf
29# Source5-md5: 1bd4a168e550910fc899e2aa125d83a3
30Source6: http://www.firebirdsql.org/pdfmanual/Firebird-nbackup.pdf
31# Source6-md5: 4e195bc085dba520b0f7cd9dcd1f995c
32Source7: http://www.firebirdsql.org/pdfmanual/Firebird-Utils-WIP.pdf
33# Source7-md5: 39b9a4f3c9d9e27d985e9277ae163ceb
34Source8: http://www.firebirdnews.org/docs/fb2min.pdf
35# Source8-md5: ebac312c0afbe97b1850bdc74c553c28
36Source9: http://www.firebirdsql.org/doc/contrib/fb_2_0_errorcodes.pdf
37# Source9-md5: 2acf2ff63c4ba3a1c590989e19bb253e
38Source100: firebird.init
39Source101: firebird.sysconfig
40Source102: firebird.inetd
41Patch0: %{name}-chmod.patch
42Patch1: %{name}-editline.patch
43Patch2: %{name}-va.patch
44Patch3: %{name}-morearchs.patch
45Patch4: %{name}-gcc4.patch
46Patch5: %{name}-fix-os-detection.dpatch
47Patch6: %{name}-fix-pthreads-detect.dpatch
48Patch7: %{name}-link-with-g++.dpatch
49Patch8: %{name}-no-custom-errno-and-sys_XXerrXX.dpatch
50Patch9: %{name}-opt-bypass-redundant-sort.dpatch
51Patch10: %{name}-security-remote-preauth-crash.dpatch
52Patch11: %{name}-separate-file-and-sem-perms.dpatch
53Patch12: %{name}-ppc.patch
54Patch13: %{name}-64bit.patch
55URL: http://www.firebirdsql.org/
56BuildRequires: autoconf
57BuildRequires: automake
58BuildRequires: bison
59BuildRequires: libicu-devel
60BuildRequires: libstdc++-devel
61BuildRequires: libtool
62BuildRequires: ncurses-devel
63BuildRequires: psmisc >= 22.5-2
64BuildRequires: rpmbuild(macros) >= 1.268
65Requires: %{name}-lib = %{version}-%{release}
66%if %{with ss}
67Requires(post,preun): /sbin/chkconfig
68Requires: rc-scripts
69%endif
70# official ports are x86, sparc and x86_64
71# alpha and ppc added in morearchs patch
72# see morearchs patch if you want to add support for more archs
73ExclusiveArch: %{ix86} %{x8664} sparc sparcv9 alpha ppc
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
80%description
81Firebird is a powerful, high-performance relational database designed
82to be embedded into applications on multiple platforms.
83
84%description -l pl.UTF-8
85Firebird jest potężnym, wysoko wydajnym systemem relacyjnych baz
86danych zaprojektowanym do osadzania w aplikacjach na wielu
87platformach.
88
89%description -l de.UTF-8
90Firebird ist der Open-Source-Spin-Off des weiterhin kommerziell von
91Borland vertriebenen relationalen Datenbankmanagementsystemes
92InterBase. Die Abspaltung erfolgte im Jahre 2000 als kurz vor Freigabe
93der Version 6 des kommerziellen Vorgängers Interbase bei Borland
94ernsthafte Überlegungen im Gange waren, die Weiterentwicklung
95einzustellen.
96
97Aus Interbase 6.0 wurde Firebird 1.0, wobei dies als eine
98Bugfix-Version mit nur wenigen Erweiterungen angesehen werden kann.
99Eine Erweiterung von Firebird 1.0 ist der 64-Bit File I/O, so dass
100auch Datenbankdateien über 2GB erzeugt werden können.
101
102%package lib
103Summary: Firebird shared library
104Summary(pl.UTF-8): Biblioteka współdzielona Firebird
105Group: Libraries
106
107%description lib
108Firebird shared library (libgds).
109
110%description lib -l pl.UTF-8
111Biblioteka współdzielona Firebird (libgds).
112
113%package devel
114Summary: Header files for Firebird library
115Summary(pl.UTF-8): Pliki nagłówkowe biblioteki Firebird
116Group: Development/Libraries
117Requires: %{name}-lib = %{version}-%{release}
118Requires: libstdc++-devel
119
120%description devel
121Header files for Firebird library.
122
123%description devel -l pl.UTF-8
124Pliki nagłówkowe biblioteki Firebird.
125
126%package static
127Summary: Static Firebird library
128Summary(pl.UTF-8): Statyczna biblioteka Firebird
129Group: Development/Libraries
130Requires: %{name}-devel = %{version}-%{release}
131
132%description static
133Static Firebird library (libgds).
134
135%description static -l pl.UTF-8
136Statyczna biblioteka Firebird (libgds).
137
138%package doc
139Summary: Extensive InterBase and Firebird documentation
140Summary(pl.UTF-8): Obszerna dokumentacja do baz InterBase i Firebird
141Group: Documentation
142
143%description doc
144Extensive InterBase and Firebird documentation.
145
146%description doc -l pl.UTF-8
147Obszerna dokumentacja do baz InterBase i Firebird.
148
149%prep
150%setup -q -n Firebird-%{version}-0
151%patch0 -p1
152# OBSOLETE?
153# %patch1 -p1
154# ???
155# %patch2 -p1
156# looks obsolete (but not fully)
157# %patch3 -p1
158# %patch4 -p1
159# %patch5 -p1
160# %patch6 -p1
161# %patch7 -p1
162# %patch8 -p1
163# %patch9 -p1
164# %patch10 -p1
165# %patch11 -p1
166# %patch12 -p1
167# %patch13 -p1
168
169# force rebuild
170rm -f src/dsql/parse.cpp
171
172%build
173%{__libtoolize}
174%{__aclocal}
175%{__autoconf}
176
177%configure \
178 --with-editline \
179 --with-system-editline \
180 --with-system-icu \
181 --with-gnu-ld \
182 %{?with_ss:--enable-superserver} \
183 --prefix=%{ibdir} \
184 %{?debug:--enable-debug}
185
186# OPTFLAGS for editline
187export OPTFLAGS="%{rpmcflags}"
188DARCH=""
189%ifarch %{x8664}
190DARCH="-DAMD64"
191%endif
192%ifarch sparc sparcv9
193DARCH="-Dsparc"
194%endif
195%ifarch ppc
196DARCH="-DPPC"
197%endif
198
199%{__make} -j1 \
200 CC="%{__cc}" \
201 CXX="%{__cxx}" \
202 PROD_FLAGS="%{rpmcflags} -DNDEBUG -DLINUX -pipe -MMD -fPIC $DARCH" \
203 DEV_FLAGS="%{rpmcflags} -DLINUX -DDEBUG_GDS_ALLOC -pipe -MMD -fPIC -Wall -Wno-switch $DARCH" \
204 LIB_LINK_RPATH_LINE= \
205 LIB_CLIENT_LINK_OPTIONS="-lpthread"
206
207# my name is hack. dirty hack.
208# why isn't that build in previous make call?
209%{__make} -C src -f ../gen/Makefile.libfbembed libfbembed \
210 CC="%{__cc}" \
211 CXX="%{__cxx}" \
212 PROD_FLAGS="%{rpmcflags} -DNDEBUG -DLINUX -pipe -MMD -fPIC $DARCH" \
213 DEV_FLAGS="%{rpmcflags} -DLINUX -DDEBUG_GDS_ALLOC -pipe -MMD -fPIC -Wall -Wno-switch $DARCH" \
214 LIB_LINK_RPATH_LINE= \
215 LIB_CLIENT_LINK_OPTIONS="-lpthread"
216
217# fb_lock_mgr is started during build - try to stop it (if /proc is mounted...)
218fuser -k gen/firebird/bin/fb_lock_mgr 2>/dev/null || :
219
220%install
221rm -rf $RPM_BUILD_ROOT
222
223%{__make} -C src -f ../gen/Makefile.install buildImageDir
224
225install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig/rc-inetd}
226install -d $RPM_BUILD_ROOT{%{ibdir},%{_libdir},%{_includedir}} \
227 $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
228
229install gen/firebird/lib/libfb*.a $RPM_BUILD_ROOT%{_libdir}
230install gen/firebird/lib/libfbembed.so* $RPM_BUILD_ROOT%{_libdir}
231cd gen/buildroot/%{ibdir}
232
233cp -af UDF bin help intl aliases.conf firebird.conf firebird.msg security2.fdb \
234 $RPM_BUILD_ROOT%{ibdir}
235install include/* $RPM_BUILD_ROOT%{_includedir}
236cp -df lib/* $RPM_BUILD_ROOT%{_libdir}
237install examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
238
239# or libfbembed?
240ln -sf libfbclient.so.1 $RPM_BUILD_ROOT%{_libdir}/libgds.so.0
241ln -sf libfbclient.so.1 $RPM_BUILD_ROOT%{_libdir}/libgds.so
242
243ln -sf libfbstatic.a $RPM_BUILD_ROOT%{_libdir}/libgds.a
244
245%if %{with ss}
246install %{SOURCE100} $RPM_BUILD_ROOT/etc/rc.d/init.d/firebird
247install %{SOURCE101} $RPM_BUILD_ROOT/etc/sysconfig/firebird
248%else
249install %{SOURCE102} $RPM_BUILD_ROOT/etc/sysconfig/rc-inetd/firebird
250%endif
251
252%clean
253rm -rf $RPM_BUILD_ROOT
254
255%pre
256%groupadd -g 145 firebird
257%useradd -u 145 -d %{ibdir} -s /bin/sh -g firebird -c "Firebird Server" firebird
258
259%if %{with ss}
260%post
261/sbin/chkconfig --add firebird
262%service firebird restart
263
264%preun
265if [ "$1" = "0" ]; then
266 %service firebird stop
267 /sbin/chkconfig --del firebird
268fi
269%endif
270
271%postun
272if [ "$1" = "0" ]; then
273 %userremove firebird
274 %groupremove firebird
275fi
276
277%post lib -p /sbin/ldconfig
278%postun lib -p /sbin/ldconfig
279
280%files
281%defattr(644,root,root,755)
282%doc doc/{sql.extensions,Firebird_conf.txt,README.user*,WhatsNew,fb2-todo.txt}
283%attr(755,root,root) %{_libdir}/libib_util.so
284%dir %attr(770,root,firebird) %{ibdir}
285%attr(755,root,root) %{ibdir}/UDF
286%attr(755,root,root) %{ibdir}/bin
287%{ibdir}/help
288%dir %attr(770,root,firebird) %{ibdir}/intl
289%attr(755,root,root) %{ibdir}/intl/fbintl
290%{ibdir}/firebird.msg
291# following files should be in /var (*.fdb) and /etc (*.conf)?
292%attr(660,root,firebird) %config(noreplace) %verify(not md5 mtime size) %{ibdir}/security2.fdb
293%attr(640,root,firebird) %config(noreplace) %verify(not md5 mtime size) %{ibdir}/aliases.conf
294%attr(640,root,firebird) %config(noreplace) %verify(not md5 mtime size) %{ibdir}/firebird.conf
295%if %{with ss}
296%attr(754,root,root) /etc/rc.d/init.d/firebird
297%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/firebird
298%else
299%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/rc-inetd/firebird
300%endif
301
302%files lib
303%defattr(644,root,root,755)
304%attr(755,root,root) %{_libdir}/libfbclient.so.*.*.*
305%attr(755,root,root) %ghost %{_libdir}/libfbclient.so.[0-9]
306%attr(755,root,root) %{_libdir}/libfbembed.so.*.*.*
307%attr(755,root,root) %ghost %{_libdir}/libfbembed.so.[0-9]
308
309# InterBase/old Firebird compatibility symlinks
310%attr(755,root,root) %{_libdir}/libgds.so.0
311# needed here - original libgds.so.0 didn't have soname, so some old
312# (possibly not open-source) apps may be linked with libgds.so
313%attr(755,root,root) %{_libdir}/libgds.so
314
315%files devel
316%defattr(644,root,root,755)
317%attr(755,root,root) %{_libdir}/libfbclient.so
318%attr(755,root,root) %{_libdir}/libfbembed.so
319%{_includedir}/*.h
320%{_examplesdir}/%{name}-%{version}
321
322%files static
323%defattr(644,root,root,755)
324%{_libdir}/libfbcommon.a
325%{_libdir}/libfbstatic.a
326# compat link
327%{_libdir}/libgds.a
328
329%files doc
330%defattr(644,root,root,755)
331%doc docs/*
This page took 0.02991 seconds and 4 git commands to generate.