]>
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)? | |
34cec9e1 | 14 | Version: 2.1.0.17798 |
15 | Release: 1 | |
9fa49beb JB |
16 | License: Interbase Public License 1.0 |
17 | Group: Applications/Databases | |
34cec9e1 | 18 | Source0: http://dl.sourceforge.net/firebird/Firebird-%{version}-0.tar.bz2 |
19 | # Source0-md5: e663417416b4dc808d6ace991e6b783f | |
afbf0830 | 20 | Source1: http://www.firebirdsql.org/pdfmanual/Firebird-2.0-QuickStart.pdf |
34cec9e1 | 21 | # Source1-md5: d77105c5b24202fe7adbf2a011e71b35 |
afbf0830 AM |
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 | |
34cec9e1 | 31 | # Source6-md5: 4e195bc085dba520b0f7cd9dcd1f995c |
afbf0830 AM |
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 |
6246a616 | 59 | BuildRequires: libicu-devel |
3e30a275 | 60 | BuildRequires: libstdc++-devel |
f32247bb | 61 | BuildRequires: libtool |
3e30a275 | 62 | BuildRequires: ncurses-devel |
6f50770c | 63 | BuildRequires: psmisc >= 22.5-2 |
f32247bb | 64 | BuildRequires: rpmbuild(macros) >= 1.268 |
ff19b114 | 65 | Requires: %{name}-lib = %{version}-%{release} |
bf15fb73 ER |
66 | %if %{with ss} |
67 | Requires(post,preun): /sbin/chkconfig | |
68 | Requires: rc-scripts | |
69 | %endif | |
94aa4dfa | 70 | # official ports are x86, sparc and x86_64 |
9edd8ca8 | 71 | # alpha and ppc added in morearchs patch |
57758f31 | 72 | # see morearchs patch if you want to add support for more archs |
94aa4dfa | 73 | ExclusiveArch: %{ix86} %{x8664} sparc sparcv9 alpha ppc |
9fa49beb JB |
74 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
75 | ||
76 | %define ibdir %{_libdir}/interbase | |
3e30a275 JB |
77 | %define specflags -fno-strict-aliasing |
78 | %define debugcflags -O1 -g -Wall -fno-strict-aliasing | |
9fa49beb JB |
79 | |
80 | %description | |
81 | Firebird is a powerful, high-performance relational database designed | |
82 | to be embedded into applications on multiple platforms. | |
83 | ||
bc5f1efa JR |
84 | %description -l pl.UTF-8 |
85 | Firebird jest potężnym, wysoko wydajnym systemem relacyjnych baz | |
9fa49beb JB |
86 | danych zaprojektowanym do osadzania w aplikacjach na wielu |
87 | platformach. | |
88 | ||
bc5f1efa | 89 | %description -l de.UTF-8 |
d88756a7 | 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 | |
bc5f1efa JR |
93 | der Version 6 des kommerziellen Vorgängers Interbase bei Borland |
94 | ernsthafte Überlegungen im Gange waren, die Weiterentwicklung | |
d88756a7 | 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 | |
bc5f1efa | 100 | auch Datenbankdateien über 2GB erzeugt werden können. |
d88756a7 | 101 | |
9fa49beb JB |
102 | %package lib |
103 | Summary: Firebird shared library | |
dc230623 | 104 | Summary(pl.UTF-8): Biblioteka współdzielona Firebird |
9fa49beb JB |
105 | Group: Libraries |
106 | ||
107 | %description lib | |
108 | Firebird shared library (libgds). | |
109 | ||
bc5f1efa JR |
110 | %description lib -l pl.UTF-8 |
111 | Biblioteka współdzielona Firebird (libgds). | |
9fa49beb JB |
112 | |
113 | %package devel | |
114 | Summary: Header files for Firebird library | |
dc230623 | 115 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki Firebird |
9fa49beb | 116 | Group: Development/Libraries |
ff19b114 | 117 | Requires: %{name}-lib = %{version}-%{release} |
3e30a275 | 118 | Requires: libstdc++-devel |
9fa49beb JB |
119 | |
120 | %description devel | |
121 | Header files for Firebird library. | |
122 | ||
bc5f1efa JR |
123 | %description devel -l pl.UTF-8 |
124 | Pliki nagłówkowe biblioteki Firebird. | |
9fa49beb JB |
125 | |
126 | %package static | |
127 | Summary: Static Firebird library | |
dc230623 | 128 | Summary(pl.UTF-8): Statyczna biblioteka Firebird |
9fa49beb | 129 | Group: Development/Libraries |
ff19b114 | 130 | Requires: %{name}-devel = %{version}-%{release} |
9fa49beb JB |
131 | |
132 | %description static | |
133 | Static Firebird library (libgds). | |
134 | ||
bc5f1efa | 135 | %description static -l pl.UTF-8 |
9fa49beb JB |
136 | Statyczna biblioteka Firebird (libgds). |
137 | ||
6d06b555 JB |
138 | %package doc |
139 | Summary: Extensive InterBase and Firebird documentation | |
dc230623 | 140 | Summary(pl.UTF-8): Obszerna dokumentacja do baz InterBase i Firebird |
6d06b555 JB |
141 | Group: Documentation |
142 | ||
143 | %description doc | |
144 | Extensive InterBase and Firebird documentation. | |
145 | ||
bc5f1efa | 146 | %description doc -l pl.UTF-8 |
6d06b555 JB |
147 | Obszerna dokumentacja do baz InterBase i Firebird. |
148 | ||
9fa49beb | 149 | %prep |
cc466a1c | 150 | %setup -q -n Firebird-%{version}-0 |
9fa49beb | 151 | %patch0 -p1 |
afbf0830 AM |
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 | |
9fa49beb | 168 | |
41ed72e5 AM |
169 | # force rebuild |
170 | rm -f src/dsql/parse.cpp | |
171 | ||
9fa49beb | 172 | %build |
3e30a275 JB |
173 | %{__libtoolize} |
174 | %{__aclocal} | |
175 | %{__autoconf} | |
9fa49beb | 176 | |
3e30a275 | 177 | %configure \ |
afbf0830 AM |
178 | --with-editline \ |
179 | --with-system-editline \ | |
180 | --with-system-icu \ | |
181 | --with-gnu-ld \ | |
98517597 | 182 | %{?with_ss:--enable-superserver} \ |
3e30a275 JB |
183 | --prefix=%{ibdir} \ |
184 | %{?debug:--enable-debug} | |
9fa49beb | 185 | |
e3bc302b JB |
186 | # OPTFLAGS for editline |
187 | export OPTFLAGS="%{rpmcflags}" | |
490cb53f | 188 | DARCH="" |
94aa4dfa | 189 | %ifarch %{x8664} |
57758f31 | 190 | DARCH="-DAMD64" |
490cb53f | 191 | %endif |
57758f31 JB |
192 | %ifarch sparc sparcv9 |
193 | DARCH="-Dsparc" | |
57758f31 | 194 | %endif |
490cb53f AM |
195 | %ifarch ppc |
196 | DARCH="-DPPC" | |
57758f31 | 197 | %endif |
59aa3c60 | 198 | |
3e30a275 | 199 | %{__make} -j1 \ |
cc2f8e3e AM |
200 | CC="%{__cc}" \ |
201 | CXX="%{__cxx}" \ | |
57758f31 JB |
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" \ | |
3e30a275 JB |
204 | LIB_LINK_RPATH_LINE= \ |
205 | LIB_CLIENT_LINK_OPTIONS="-lpthread" | |
9fa49beb | 206 | |
59aa3c60 AG |
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 | ||
85bfee62 | 217 | # fb_lock_mgr is started during build - try to stop it (if /proc is mounted...) |
6f50770c | 218 | fuser -k gen/firebird/bin/fb_lock_mgr 2>/dev/null || : |
85bfee62 | 219 | |
9fa49beb JB |
220 | %install |
221 | rm -rf $RPM_BUILD_ROOT | |
9fa49beb | 222 | |
3e30a275 | 223 | %{__make} -C src -f ../gen/Makefile.install buildImageDir |
9fa49beb | 224 | |
98517597 | 225 | install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig/rc-inetd} |
9fa49beb JB |
226 | install -d $RPM_BUILD_ROOT{%{ibdir},%{_libdir},%{_includedir}} \ |
227 | $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} | |
98517597 | 228 | |
3e30a275 | 229 | install gen/firebird/lib/libfb*.a $RPM_BUILD_ROOT%{_libdir} |
59aa3c60 | 230 | install gen/firebird/lib/libfbembed.so* $RPM_BUILD_ROOT%{_libdir} |
3e30a275 JB |
231 | cd gen/buildroot/%{ibdir} |
232 | ||
c39c9a7a | 233 | cp -af UDF bin help intl aliases.conf firebird.conf firebird.msg security2.fdb \ |
9fa49beb JB |
234 | $RPM_BUILD_ROOT%{ibdir} |
235 | install include/* $RPM_BUILD_ROOT%{_includedir} | |
3e30a275 | 236 | cp -df lib/* $RPM_BUILD_ROOT%{_libdir} |
9fa49beb JB |
237 | install examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} |
238 | ||
3e30a275 | 239 | # or libfbembed? |
63943f48 | 240 | ln -sf libfbclient.so.1 $RPM_BUILD_ROOT%{_libdir}/libgds.so.0 |
3e30a275 JB |
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 | ||
cf9b601b | 245 | %if %{with ss} |
afbf0830 AM |
246 | install %{SOURCE100} $RPM_BUILD_ROOT/etc/rc.d/init.d/firebird |
247 | install %{SOURCE101} $RPM_BUILD_ROOT/etc/sysconfig/firebird | |
cf9b601b | 248 | %else |
afbf0830 | 249 | install %{SOURCE102} $RPM_BUILD_ROOT/etc/sysconfig/rc-inetd/firebird |
cf9b601b | 250 | %endif |
59aa3c60 | 251 | |
9fa49beb JB |
252 | %clean |
253 | rm -rf $RPM_BUILD_ROOT | |
254 | ||
85eb4f4f | 255 | %pre |
6ad2f94a ER |
256 | %groupadd -g 145 firebird |
257 | %useradd -u 145 -d %{ibdir} -s /bin/sh -g firebird -c "Firebird Server" firebird | |
85eb4f4f | 258 | |
98517597 | 259 | %if %{with ss} |
85eb4f4f AM |
260 | %post |
261 | /sbin/chkconfig --add firebird | |
f32247bb | 262 | %service firebird restart |
85eb4f4f AM |
263 | |
264 | %preun | |
265 | if [ "$1" = "0" ]; then | |
f32247bb | 266 | %service firebird stop |
6ad2f94a | 267 | /sbin/chkconfig --del firebird |
85eb4f4f | 268 | fi |
98517597 | 269 | %endif |
85eb4f4f AM |
270 | |
271 | %postun | |
272 | if [ "$1" = "0" ]; then | |
6ad2f94a ER |
273 | %userremove firebird |
274 | %groupremove firebird | |
85eb4f4f AM |
275 | fi |
276 | ||
3e30a275 JB |
277 | %post lib -p /sbin/ldconfig |
278 | %postun lib -p /sbin/ldconfig | |
279 | ||
9fa49beb JB |
280 | %files |
281 | %defattr(644,root,root,755) | |
3e30a275 | 282 | %doc doc/{sql.extensions,Firebird_conf.txt,README.user*,WhatsNew,fb2-todo.txt} |
9fa49beb | 283 | %attr(755,root,root) %{_libdir}/libib_util.so |
13aa50ef | 284 | %dir %attr(770,root,firebird) %{ibdir} |
9fa49beb JB |
285 | %attr(755,root,root) %{ibdir}/UDF |
286 | %attr(755,root,root) %{ibdir}/bin | |
287 | %{ibdir}/help | |
13aa50ef | 288 | %dir %attr(770,root,firebird) %{ibdir}/intl |
e3bc302b | 289 | %attr(755,root,root) %{ibdir}/intl/fbintl |
3e30a275 JB |
290 | %{ibdir}/firebird.msg |
291 | # following files should be in /var (*.fdb) and /etc (*.conf)? | |
c39c9a7a | 292 | %attr(660,root,firebird) %config(noreplace) %verify(not md5 mtime size) %{ibdir}/security2.fdb |
13aa50ef MWP |
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 | |
98517597 | 295 | %if %{with ss} |
85eb4f4f AM |
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 | |
98517597 | 298 | %else |
d88756a7 | 299 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/rc-inetd/firebird |
98517597 | 300 | %endif |
9fa49beb JB |
301 | |
302 | %files lib | |
303 | %defattr(644,root,root,755) | |
3e30a275 | 304 | %attr(755,root,root) %{_libdir}/libfbclient.so.*.*.* |
557aa31b | 305 | %attr(755,root,root) %ghost %{_libdir}/libfbclient.so.[0-9] |
3e30a275 | 306 | %attr(755,root,root) %{_libdir}/libfbembed.so.*.*.* |
557aa31b | 307 | %attr(755,root,root) %ghost %{_libdir}/libfbembed.so.[0-9] |
0c3071c2 | 308 | |
3e30a275 JB |
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 | |
9fa49beb JB |
314 | |
315 | %files devel | |
316 | %defattr(644,root,root,755) | |
3e30a275 JB |
317 | %attr(755,root,root) %{_libdir}/libfbclient.so |
318 | %attr(755,root,root) %{_libdir}/libfbembed.so | |
319 | %{_includedir}/*.h | |
9fa49beb JB |
320 | %{_examplesdir}/%{name}-%{version} |
321 | ||
322 | %files static | |
323 | %defattr(644,root,root,755) | |
3e30a275 JB |
324 | %{_libdir}/libfbcommon.a |
325 | %{_libdir}/libfbstatic.a | |
326 | # compat link | |
9fa49beb | 327 | %{_libdir}/libgds.a |
6d06b555 JB |
328 | |
329 | %files doc | |
330 | %defattr(644,root,root,755) | |
331 | %doc docs/* |