]>
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)? | |
afbf0830 AM |
14 | Version: 2.1.0.17735 |
15 | Release: 0.1 | |
9fa49beb JB |
16 | License: Interbase Public License 1.0 |
17 | Group: Applications/Databases | |
afbf0830 AM |
18 | Source0: http://dl.sourceforge.net/firebird/Firebird-%{version}-ReleaseCandidate1.tar.bz2 |
19 | # Source0-md5: 69c0fff7c4022e430df6e1eb842e5aaa | |
20 | Source1: http://www.firebirdsql.org/pdfmanual/Firebird-2.0-QuickStart.pdf | |
21 | # Source1-md5: 1ded6a5f6c1ec36a2b8a8b06370afc1a | |
22 | Source2: http://www.firebirdsql.org/pdfmanual/Using-Firebird_(wip).pdf | |
23 | # Source2-md5: 9eb90583c200bdd7292a80ecc1df1178 | |
24 | Source3: http://www.firebirdsql.org/pdfmanual/Firebird-Null-Guide.pdf | |
25 | # Source3-md5: d1f8ba75fe3bb9eb9d203ce3f82a1a1a | |
26 | Source4: http://www.firebirdsql.org/pdfmanual/Firebird-Generator-Guide.pdf | |
27 | # Source4-md5: 44e7568ef477072a8ad5f381c3e12a75 | |
28 | Source5: http://www.firebirdsql.org/pdfmanual/MSSQL-to-Firebird.pdf | |
29 | # Source5-md5: 1bd4a168e550910fc899e2aa125d83a3 | |
30 | Source6: http://www.firebirdsql.org/pdfmanual/Firebird-nbackup.pdf | |
31 | # Source6-md5: 7883243a5685560330430d8b423d2eba | |
32 | Source7: http://www.firebirdsql.org/pdfmanual/Firebird-Utils-WIP.pdf | |
33 | # Source7-md5: 39b9a4f3c9d9e27d985e9277ae163ceb | |
34 | Source8: http://www.firebirdnews.org/docs/fb2min.pdf | |
35 | # Source8-md5: ebac312c0afbe97b1850bdc74c553c28 | |
36 | Source9: http://www.firebirdsql.org/doc/contrib/fb_2_0_errorcodes.pdf | |
37 | # Source9-md5: 2acf2ff63c4ba3a1c590989e19bb253e | |
38 | Source100: firebird.init | |
39 | Source101: firebird.sysconfig | |
40 | Source102: firebird.inetd | |
3e30a275 | 41 | Patch0: %{name}-chmod.patch |
e3bc302b | 42 | Patch1: %{name}-editline.patch |
3657cd88 JB |
43 | Patch2: %{name}-va.patch |
44 | Patch3: %{name}-morearchs.patch | |
45 | Patch4: %{name}-gcc4.patch | |
94571817 AM |
46 | Patch5: %{name}-fix-os-detection.dpatch |
47 | Patch6: %{name}-fix-pthreads-detect.dpatch | |
48 | Patch7: %{name}-link-with-g++.dpatch | |
49 | Patch8: %{name}-no-custom-errno-and-sys_XXerrXX.dpatch | |
50 | Patch9: %{name}-opt-bypass-redundant-sort.dpatch | |
51 | Patch10: %{name}-security-remote-preauth-crash.dpatch | |
52 | Patch11: %{name}-separate-file-and-sem-perms.dpatch | |
490cb53f | 53 | Patch12: %{name}-ppc.patch |
7d87f9e0 | 54 | Patch13: %{name}-64bit.patch |
40c5ec59 | 55 | URL: http://www.firebirdsql.org/ |
41daf6c3 | 56 | BuildRequires: autoconf |
57 | BuildRequires: automake | |
c7da80e5 | 58 | BuildRequires: bison |
3e30a275 | 59 | BuildRequires: libstdc++-devel |
f32247bb | 60 | BuildRequires: libtool |
3e30a275 | 61 | BuildRequires: ncurses-devel |
6f50770c | 62 | BuildRequires: psmisc >= 22.5-2 |
f32247bb | 63 | BuildRequires: rpmbuild(macros) >= 1.268 |
ff19b114 | 64 | Requires: %{name}-lib = %{version}-%{release} |
bf15fb73 ER |
65 | %if %{with ss} |
66 | Requires(post,preun): /sbin/chkconfig | |
67 | Requires: 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 | 72 | ExclusiveArch: %{ix86} %{x8664} sparc sparcv9 alpha ppc |
9fa49beb JB |
73 | BuildRoot: %{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 | |
80 | Firebird is a powerful, high-performance relational database designed | |
81 | to be embedded into applications on multiple platforms. | |
82 | ||
bc5f1efa JR |
83 | %description -l pl.UTF-8 |
84 | Firebird jest potężnym, wysoko wydajnym systemem relacyjnych baz | |
9fa49beb JB |
85 | danych zaprojektowanym do osadzania w aplikacjach na wielu |
86 | platformach. | |
87 | ||
bc5f1efa | 88 | %description -l de.UTF-8 |
d88756a7 | 89 | Firebird ist der Open-Source-Spin-Off des weiterhin kommerziell von |
90 | Borland vertriebenen relationalen Datenbankmanagementsystemes | |
91 | InterBase. Die Abspaltung erfolgte im Jahre 2000 als kurz vor Freigabe | |
bc5f1efa JR |
92 | der Version 6 des kommerziellen Vorgängers Interbase bei Borland |
93 | ernsthafte Überlegungen im Gange waren, die Weiterentwicklung | |
d88756a7 | 94 | einzustellen. |
95 | ||
96 | Aus Interbase 6.0 wurde Firebird 1.0, wobei dies als eine | |
97 | Bugfix-Version mit nur wenigen Erweiterungen angesehen werden kann. | |
98 | Eine Erweiterung von Firebird 1.0 ist der 64-Bit File I/O, so dass | |
bc5f1efa | 99 | auch Datenbankdateien über 2GB erzeugt werden können. |
d88756a7 | 100 | |
9fa49beb JB |
101 | %package lib |
102 | Summary: Firebird shared library | |
dc230623 | 103 | Summary(pl.UTF-8): Biblioteka współdzielona Firebird |
9fa49beb JB |
104 | Group: Libraries |
105 | ||
106 | %description lib | |
107 | Firebird shared library (libgds). | |
108 | ||
bc5f1efa JR |
109 | %description lib -l pl.UTF-8 |
110 | Biblioteka współdzielona Firebird (libgds). | |
9fa49beb JB |
111 | |
112 | %package devel | |
113 | Summary: Header files for Firebird library | |
dc230623 | 114 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki Firebird |
9fa49beb | 115 | Group: Development/Libraries |
ff19b114 | 116 | Requires: %{name}-lib = %{version}-%{release} |
3e30a275 | 117 | Requires: libstdc++-devel |
9fa49beb JB |
118 | |
119 | %description devel | |
120 | Header files for Firebird library. | |
121 | ||
bc5f1efa JR |
122 | %description devel -l pl.UTF-8 |
123 | Pliki nagłówkowe biblioteki Firebird. | |
9fa49beb JB |
124 | |
125 | %package static | |
126 | Summary: Static Firebird library | |
dc230623 | 127 | Summary(pl.UTF-8): Statyczna biblioteka Firebird |
9fa49beb | 128 | Group: Development/Libraries |
ff19b114 | 129 | Requires: %{name}-devel = %{version}-%{release} |
9fa49beb JB |
130 | |
131 | %description static | |
132 | Static Firebird library (libgds). | |
133 | ||
bc5f1efa | 134 | %description static -l pl.UTF-8 |
9fa49beb JB |
135 | Statyczna biblioteka Firebird (libgds). |
136 | ||
6d06b555 JB |
137 | %package doc |
138 | Summary: Extensive InterBase and Firebird documentation | |
dc230623 | 139 | Summary(pl.UTF-8): Obszerna dokumentacja do baz InterBase i Firebird |
6d06b555 JB |
140 | Group: Documentation |
141 | ||
142 | %description doc | |
143 | Extensive InterBase and Firebird documentation. | |
144 | ||
bc5f1efa | 145 | %description doc -l pl.UTF-8 |
6d06b555 JB |
146 | Obszerna 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 |
169 | rm -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 |
186 | export OPTFLAGS="%{rpmcflags}" | |
490cb53f | 187 | DARCH="" |
94aa4dfa | 188 | %ifarch %{x8664} |
57758f31 | 189 | DARCH="-DAMD64" |
490cb53f | 190 | %endif |
57758f31 JB |
191 | %ifarch sparc sparcv9 |
192 | DARCH="-Dsparc" | |
57758f31 | 193 | %endif |
490cb53f AM |
194 | %ifarch ppc |
195 | DARCH="-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 | 217 | fuser -k gen/firebird/bin/fb_lock_mgr 2>/dev/null || : |
85bfee62 | 218 | |
9fa49beb JB |
219 | %install |
220 | rm -rf $RPM_BUILD_ROOT | |
9fa49beb | 221 | |
3e30a275 | 222 | %{__make} -C src -f ../gen/Makefile.install buildImageDir |
9fa49beb | 223 | |
98517597 | 224 | install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig/rc-inetd} |
9fa49beb JB |
225 | install -d $RPM_BUILD_ROOT{%{ibdir},%{_libdir},%{_includedir}} \ |
226 | $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} | |
98517597 | 227 | |
3e30a275 | 228 | install gen/firebird/lib/libfb*.a $RPM_BUILD_ROOT%{_libdir} |
59aa3c60 | 229 | install gen/firebird/lib/libfbembed.so* $RPM_BUILD_ROOT%{_libdir} |
3e30a275 JB |
230 | cd gen/buildroot/%{ibdir} |
231 | ||
232 | cp -af UDF bin help intl aliases.conf firebird.conf firebird.msg security.fdb \ | |
9fa49beb JB |
233 | $RPM_BUILD_ROOT%{ibdir} |
234 | install include/* $RPM_BUILD_ROOT%{_includedir} | |
3e30a275 | 235 | cp -df lib/* $RPM_BUILD_ROOT%{_libdir} |
9fa49beb JB |
236 | install examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} |
237 | ||
3e30a275 | 238 | # or libfbembed? |
63943f48 | 239 | ln -sf libfbclient.so.1 $RPM_BUILD_ROOT%{_libdir}/libgds.so.0 |
3e30a275 JB |
240 | ln -sf libfbclient.so.1 $RPM_BUILD_ROOT%{_libdir}/libgds.so |
241 | ||
242 | ln -sf libfbstatic.a $RPM_BUILD_ROOT%{_libdir}/libgds.a | |
243 | ||
cf9b601b | 244 | %if %{with ss} |
afbf0830 AM |
245 | install %{SOURCE100} $RPM_BUILD_ROOT/etc/rc.d/init.d/firebird |
246 | install %{SOURCE101} $RPM_BUILD_ROOT/etc/sysconfig/firebird | |
cf9b601b | 247 | %else |
afbf0830 | 248 | install %{SOURCE102} $RPM_BUILD_ROOT/etc/sysconfig/rc-inetd/firebird |
cf9b601b | 249 | %endif |
59aa3c60 | 250 | |
9fa49beb JB |
251 | %clean |
252 | rm -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 | |
264 | if [ "$1" = "0" ]; then | |
f32247bb | 265 | %service firebird stop |
6ad2f94a | 266 | /sbin/chkconfig --del firebird |
85eb4f4f | 267 | fi |
98517597 | 268 | %endif |
85eb4f4f AM |
269 | |
270 | %postun | |
271 | if [ "$1" = "0" ]; then | |
6ad2f94a ER |
272 | %userremove firebird |
273 | %groupremove firebird | |
85eb4f4f AM |
274 | fi |
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/* |