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