]>
Commit | Line | Data |
---|---|---|
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 | # | |
9 | Summary: Firebird SQL Database Server and Client tools | |
10 | Summary(de.UTF-8): Firebird - relationalen Open-Source- Datenbankmanagementsystems | |
11 | Summary(pl.UTF-8): Firebird - serwer baz danych SQL oraz narzędzia klienckie | |
12 | Name: Firebird | |
13 | # FirebirdCS/FirebirdSS (Classic Server/Super Server)? | |
14 | Version: 2.1.0.17798 | |
15 | Release: 1 | |
16 | License: Interbase Public License 1.0 | |
17 | Group: Applications/Databases | |
18 | Source0: http://dl.sourceforge.net/firebird/Firebird-%{version}-0.tar.bz2 | |
19 | # Source0-md5: e663417416b4dc808d6ace991e6b783f | |
20 | Source1: http://www.firebirdsql.org/pdfmanual/Firebird-2.0-QuickStart.pdf | |
21 | # Source1-md5: d77105c5b24202fe7adbf2a011e71b35 | |
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: 4e195bc085dba520b0f7cd9dcd1f995c | |
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 | |
41 | Patch0: %{name}-chmod.patch | |
42 | Patch1: %{name}-editline.patch | |
43 | Patch2: %{name}-va.patch | |
44 | Patch3: %{name}-morearchs.patch | |
45 | Patch4: %{name}-gcc4.patch | |
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 | |
53 | Patch12: %{name}-ppc.patch | |
54 | Patch13: %{name}-64bit.patch | |
55 | URL: http://www.firebirdsql.org/ | |
56 | BuildRequires: autoconf | |
57 | BuildRequires: automake | |
58 | BuildRequires: bison | |
59 | BuildRequires: libicu-devel | |
60 | BuildRequires: libstdc++-devel | |
61 | BuildRequires: libtool | |
62 | BuildRequires: ncurses-devel | |
63 | BuildRequires: psmisc >= 22.5-2 | |
64 | BuildRequires: rpmbuild(macros) >= 1.268 | |
65 | Requires: %{name}-lib = %{version}-%{release} | |
66 | %if %{with ss} | |
67 | Requires(post,preun): /sbin/chkconfig | |
68 | Requires: 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 | |
73 | ExclusiveArch: %{ix86} %{x8664} sparc sparcv9 alpha ppc | |
74 | BuildRoot: %{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 | |
81 | Firebird is a powerful, high-performance relational database designed | |
82 | to be embedded into applications on multiple platforms. | |
83 | ||
84 | %description -l pl.UTF-8 | |
85 | Firebird jest potężnym, wysoko wydajnym systemem relacyjnych baz | |
86 | danych zaprojektowanym do osadzania w aplikacjach na wielu | |
87 | platformach. | |
88 | ||
89 | %description -l de.UTF-8 | |
90 | Firebird ist der Open-Source-Spin-Off des weiterhin kommerziell von | |
91 | Borland vertriebenen relationalen Datenbankmanagementsystemes | |
92 | InterBase. Die Abspaltung erfolgte im Jahre 2000 als kurz vor Freigabe | |
93 | der Version 6 des kommerziellen Vorgängers Interbase bei Borland | |
94 | ernsthafte Überlegungen im Gange waren, die Weiterentwicklung | |
95 | einzustellen. | |
96 | ||
97 | Aus Interbase 6.0 wurde Firebird 1.0, wobei dies als eine | |
98 | Bugfix-Version mit nur wenigen Erweiterungen angesehen werden kann. | |
99 | Eine Erweiterung von Firebird 1.0 ist der 64-Bit File I/O, so dass | |
100 | auch Datenbankdateien über 2GB erzeugt werden können. | |
101 | ||
102 | %package lib | |
103 | Summary: Firebird shared library | |
104 | Summary(pl.UTF-8): Biblioteka współdzielona Firebird | |
105 | Group: Libraries | |
106 | ||
107 | %description lib | |
108 | Firebird shared library (libgds). | |
109 | ||
110 | %description lib -l pl.UTF-8 | |
111 | Biblioteka współdzielona Firebird (libgds). | |
112 | ||
113 | %package devel | |
114 | Summary: Header files for Firebird library | |
115 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki Firebird | |
116 | Group: Development/Libraries | |
117 | Requires: %{name}-lib = %{version}-%{release} | |
118 | Requires: libstdc++-devel | |
119 | ||
120 | %description devel | |
121 | Header files for Firebird library. | |
122 | ||
123 | %description devel -l pl.UTF-8 | |
124 | Pliki nagłówkowe biblioteki Firebird. | |
125 | ||
126 | %package static | |
127 | Summary: Static Firebird library | |
128 | Summary(pl.UTF-8): Statyczna biblioteka Firebird | |
129 | Group: Development/Libraries | |
130 | Requires: %{name}-devel = %{version}-%{release} | |
131 | ||
132 | %description static | |
133 | Static Firebird library (libgds). | |
134 | ||
135 | %description static -l pl.UTF-8 | |
136 | Statyczna biblioteka Firebird (libgds). | |
137 | ||
138 | %package doc | |
139 | Summary: Extensive InterBase and Firebird documentation | |
140 | Summary(pl.UTF-8): Obszerna dokumentacja do baz InterBase i Firebird | |
141 | Group: Documentation | |
142 | ||
143 | %description doc | |
144 | Extensive InterBase and Firebird documentation. | |
145 | ||
146 | %description doc -l pl.UTF-8 | |
147 | Obszerna 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 | |
170 | rm -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 | |
187 | export OPTFLAGS="%{rpmcflags}" | |
188 | DARCH="" | |
189 | %ifarch %{x8664} | |
190 | DARCH="-DAMD64" | |
191 | %endif | |
192 | %ifarch sparc sparcv9 | |
193 | DARCH="-Dsparc" | |
194 | %endif | |
195 | %ifarch ppc | |
196 | DARCH="-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...) | |
218 | fuser -k gen/firebird/bin/fb_lock_mgr 2>/dev/null || : | |
219 | ||
220 | %install | |
221 | rm -rf $RPM_BUILD_ROOT | |
222 | ||
223 | %{__make} -C src -f ../gen/Makefile.install buildImageDir | |
224 | ||
225 | install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig/rc-inetd} | |
226 | install -d $RPM_BUILD_ROOT{%{ibdir},%{_libdir},%{_includedir}} \ | |
227 | $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} | |
228 | ||
229 | install gen/firebird/lib/libfb*.a $RPM_BUILD_ROOT%{_libdir} | |
230 | install gen/firebird/lib/libfbembed.so* $RPM_BUILD_ROOT%{_libdir} | |
231 | cd gen/buildroot/%{ibdir} | |
232 | ||
233 | cp -af UDF bin help intl aliases.conf firebird.conf firebird.msg security2.fdb \ | |
234 | $RPM_BUILD_ROOT%{ibdir} | |
235 | install include/* $RPM_BUILD_ROOT%{_includedir} | |
236 | cp -df lib/* $RPM_BUILD_ROOT%{_libdir} | |
237 | install examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} | |
238 | ||
239 | # or libfbembed? | |
240 | ln -sf libfbclient.so.1 $RPM_BUILD_ROOT%{_libdir}/libgds.so.0 | |
241 | ln -sf libfbclient.so.1 $RPM_BUILD_ROOT%{_libdir}/libgds.so | |
242 | ||
243 | ln -sf libfbstatic.a $RPM_BUILD_ROOT%{_libdir}/libgds.a | |
244 | ||
245 | %if %{with ss} | |
246 | install %{SOURCE100} $RPM_BUILD_ROOT/etc/rc.d/init.d/firebird | |
247 | install %{SOURCE101} $RPM_BUILD_ROOT/etc/sysconfig/firebird | |
248 | %else | |
249 | install %{SOURCE102} $RPM_BUILD_ROOT/etc/sysconfig/rc-inetd/firebird | |
250 | %endif | |
251 | ||
252 | %clean | |
253 | rm -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 | |
265 | if [ "$1" = "0" ]; then | |
266 | %service firebird stop | |
267 | /sbin/chkconfig --del firebird | |
268 | fi | |
269 | %endif | |
270 | ||
271 | %postun | |
272 | if [ "$1" = "0" ]; then | |
273 | %userremove firebird | |
274 | %groupremove firebird | |
275 | fi | |
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/* |