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