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