]>
Commit | Line | Data |
---|---|---|
98517597 AM |
1 | # TODO: |
2 | # - kill unaligned accesses (create_db,gpre_current,gbak_static,isql_static) on alpha | |
6302c6a3 | 3 | # - check if it's fixed now (RISC_ALIGNMENT is defined) |
3657cd88 | 4 | # - create classic server/super server subpackages and drop bcond |
98517597 | 5 | # (see firebird2 on debian how to do it) |
75e61db1 | 6 | # - logrotate script |
5c17f9d1 JB |
7 | # |
8 | # Conditional build: | |
9 | %bcond_with ss # Super Server (standalone daemon instead of inetd service) | |
10 | # | |
9fa49beb | 11 | Summary: Firebird SQL Database Server and Client tools |
dc230623 ER |
12 | Summary(de.UTF-8): Firebird - relationalen Open-Source- Datenbankmanagementsystems |
13 | Summary(pl.UTF-8): Firebird - serwer baz danych SQL oraz narzędzia klienckie | |
9fa49beb JB |
14 | Name: Firebird |
15 | # FirebirdCS/FirebirdSS (Classic Server/Super Server)? | |
f09ba703 | 16 | Version: 2.1.3.18185 |
262189e4 | 17 | Release: 3 |
6302c6a3 | 18 | License: Interbase Public License 1.0, Initial Developer's Public License 1.0 |
9fa49beb | 19 | Group: Applications/Databases |
8fce9f85 | 20 | Source0: http://downloads.sourceforge.net/firebird/%{name}-%{version}-0.tar.bz2 |
f09ba703 | 21 | # Source0-md5: ec42bd5c85dc2f65baef185228bcc5ca |
8fce9f85 | 22 | Source1: http://www.firebirdsql.org/pdfmanual/%{name}-2.1-QuickStart.pdf |
27e76269 | 23 | # Source1-md5: 46bb1af4b94e8c8acee1d6ef2055b2d3 |
6302c6a3 JB |
24 | # distfiles refuses this, would require some audit to allow '('/')' chars |
25 | #Source2: http://www.firebirdsql.org/pdfmanual/Using-Firebird_(wip).pdf | |
26 | ## Source2-md5: 9eb90583c200bdd7292a80ecc1df1178 | |
8fce9f85 | 27 | Source3: http://www.firebirdsql.org/pdfmanual/%{name}-Null-Guide.pdf |
afbf0830 | 28 | # Source3-md5: d1f8ba75fe3bb9eb9d203ce3f82a1a1a |
8fce9f85 | 29 | Source4: http://www.firebirdsql.org/pdfmanual/%{name}-Generator-Guide.pdf |
afbf0830 | 30 | # Source4-md5: 44e7568ef477072a8ad5f381c3e12a75 |
8fce9f85 | 31 | Source5: http://www.firebirdsql.org/pdfmanual/MSSQL-to-%{name}.pdf |
afbf0830 | 32 | # Source5-md5: 1bd4a168e550910fc899e2aa125d83a3 |
8fce9f85 | 33 | Source6: http://www.firebirdsql.org/pdfmanual/%{name}-nbackup.pdf |
d82d8ed3 | 34 | # Source6-md5: 7ef8a8b9a899d06bec2a5da0bb5fea0e |
8fce9f85 | 35 | Source7: http://www.firebirdsql.org/pdfmanual/%{name}-Utils-WIP.pdf |
afbf0830 AM |
36 | # Source7-md5: 39b9a4f3c9d9e27d985e9277ae163ceb |
37 | Source8: http://www.firebirdnews.org/docs/fb2min.pdf | |
38 | # Source8-md5: ebac312c0afbe97b1850bdc74c553c28 | |
f09ba703 KK |
39 | Source9: http://www.firebirdsql.org/doc/contrib/fb_2_1_errorcodes.pdf |
40 | # Source9-md5: 9ab392dc349657dbcf9a9c35acd8e8db | |
afbf0830 AM |
41 | Source100: firebird.init |
42 | Source101: firebird.sysconfig | |
43 | Source102: firebird.inetd | |
3e30a275 | 44 | Patch0: %{name}-chmod.patch |
e3bc302b | 45 | Patch1: %{name}-editline.patch |
3657cd88 JB |
46 | Patch2: %{name}-va.patch |
47 | Patch3: %{name}-morearchs.patch | |
75e61db1 | 48 | Patch4: %{name}-FHS.patch |
27e76269 | 49 | Patch5: %{name}-64bit.patch |
02d31faa | 50 | Patch6: %{name}-gcc-icu.patch |
4415348b | 51 | Patch7: %{name}-btyacc-segv.patch |
40c5ec59 | 52 | URL: http://www.firebirdsql.org/ |
19988721 | 53 | BuildRequires: autoconf >= 2.56 |
41daf6c3 | 54 | BuildRequires: automake |
c7da80e5 | 55 | BuildRequires: bison |
6302c6a3 | 56 | BuildRequires: libedit-devel |
6246a616 | 57 | BuildRequires: libicu-devel |
3e30a275 | 58 | BuildRequires: libstdc++-devel |
f32247bb | 59 | BuildRequires: libtool |
6f50770c | 60 | BuildRequires: psmisc >= 22.5-2 |
f32247bb | 61 | BuildRequires: rpmbuild(macros) >= 1.268 |
f09ba703 | 62 | BuildRequires: sed >= 4.0 |
27e76269 | 63 | Requires: %{name}-dirs = %{version}-%{release} |
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 | |
19988721 JB |
69 | # official ports are x86, x86_64, ppc, sparc, arm, mips/mipsel, ia64 |
70 | # alpha is added in morearchs patch | |
71 | # see morearchs patch if you want more | |
72 | ExclusiveArch: %{ix86} %{x8664} arm ia64 mips mipsel ppc sparc sparcv9 alpha | |
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 | |
27e76269 JR |
101 | %package dirs |
102 | Summary: Firebird SQL Database common directories | |
103 | Summary(pl.UTF-8): Firebird - wspólne katalogi | |
104 | Group: Applications/Databases | |
105 | ||
106 | %description dirs | |
107 | Firebird SQL Database common directories. | |
108 | ||
109 | %description dirs -l pl.UTF-8 | |
110 | Firebird - wspólne katalogi. | |
111 | ||
9fa49beb JB |
112 | %package lib |
113 | Summary: Firebird shared library | |
dc230623 | 114 | Summary(pl.UTF-8): Biblioteka współdzielona Firebird |
9fa49beb JB |
115 | Group: Libraries |
116 | ||
117 | %description lib | |
118 | Firebird shared library (libgds). | |
119 | ||
bc5f1efa JR |
120 | %description lib -l pl.UTF-8 |
121 | Biblioteka współdzielona Firebird (libgds). | |
9fa49beb JB |
122 | |
123 | %package devel | |
124 | Summary: Header files for Firebird library | |
dc230623 | 125 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki Firebird |
9fa49beb | 126 | Group: Development/Libraries |
27e76269 | 127 | Requires: %{name}-dirs = %{version}-%{release} |
ff19b114 | 128 | Requires: %{name}-lib = %{version}-%{release} |
3e30a275 | 129 | Requires: libstdc++-devel |
9fa49beb JB |
130 | |
131 | %description devel | |
132 | Header files for Firebird library. | |
133 | ||
bc5f1efa JR |
134 | %description devel -l pl.UTF-8 |
135 | Pliki nagłówkowe biblioteki Firebird. | |
9fa49beb JB |
136 | |
137 | %package static | |
138 | Summary: Static Firebird library | |
dc230623 | 139 | Summary(pl.UTF-8): Statyczna biblioteka Firebird |
9fa49beb | 140 | Group: Development/Libraries |
ff19b114 | 141 | Requires: %{name}-devel = %{version}-%{release} |
9fa49beb JB |
142 | |
143 | %description static | |
144 | Static Firebird library (libgds). | |
145 | ||
bc5f1efa | 146 | %description static -l pl.UTF-8 |
9fa49beb JB |
147 | Statyczna biblioteka Firebird (libgds). |
148 | ||
6d06b555 JB |
149 | %package doc |
150 | Summary: Extensive InterBase and Firebird documentation | |
dc230623 | 151 | Summary(pl.UTF-8): Obszerna dokumentacja do baz InterBase i Firebird |
6d06b555 JB |
152 | Group: Documentation |
153 | ||
154 | %description doc | |
155 | Extensive InterBase and Firebird documentation. | |
156 | ||
bc5f1efa | 157 | %description doc -l pl.UTF-8 |
6d06b555 JB |
158 | Obszerna dokumentacja do baz InterBase i Firebird. |
159 | ||
9fa49beb | 160 | %prep |
8fce9f85 | 161 | %setup -q -n %{name}-%{version}-0 |
9fa49beb | 162 | %patch0 -p1 |
6302c6a3 JB |
163 | %patch1 -p1 |
164 | %patch2 -p1 | |
165 | %patch3 -p1 | |
75e61db1 | 166 | %patch4 -p1 |
27e76269 | 167 | %patch5 -p1 |
02d31faa | 168 | %patch6 -p0 |
4415348b | 169 | %patch7 -p1 |
9fa49beb | 170 | |
f09ba703 KK |
171 | %{__sed} -i 's,@prefix@,%{_prefix},' builds/install/misc/fb_config.in |
172 | ||
41ed72e5 AM |
173 | # force rebuild |
174 | rm -f src/dsql/parse.cpp | |
175 | ||
6302c6a3 JB |
176 | mkdir docs |
177 | cp %{SOURCE1} %{SOURCE3} %{SOURCE4} %{SOURCE5} %{SOURCE6} %{SOURCE7} %{SOURCE8} %{SOURCE9} docs | |
178 | ||
9fa49beb | 179 | %build |
3e30a275 JB |
180 | %{__libtoolize} |
181 | %{__aclocal} | |
182 | %{__autoconf} | |
9fa49beb | 183 | |
3e30a275 | 184 | %configure \ |
afbf0830 | 185 | --with-editline \ |
75e61db1 KK |
186 | --with-gnu-ld \ |
187 | --with-gpre-pascal \ | |
afbf0830 AM |
188 | --with-system-editline \ |
189 | --with-system-icu \ | |
98517597 | 190 | %{?with_ss:--enable-superserver} \ |
3e30a275 JB |
191 | --prefix=%{ibdir} \ |
192 | %{?debug:--enable-debug} | |
9fa49beb | 193 | |
490cb53f | 194 | DARCH="" |
94aa4dfa | 195 | %ifarch %{x8664} |
57758f31 | 196 | DARCH="-DAMD64" |
490cb53f | 197 | %endif |
57758f31 JB |
198 | %ifarch sparc sparcv9 |
199 | DARCH="-Dsparc" | |
57758f31 | 200 | %endif |
490cb53f AM |
201 | %ifarch ppc |
202 | DARCH="-DPPC" | |
57758f31 | 203 | %endif |
59aa3c60 | 204 | |
3e30a275 | 205 | %{__make} -j1 \ |
cc2f8e3e AM |
206 | CC="%{__cc}" \ |
207 | CXX="%{__cxx}" \ | |
57758f31 JB |
208 | PROD_FLAGS="%{rpmcflags} -DNDEBUG -DLINUX -pipe -MMD -fPIC $DARCH" \ |
209 | DEV_FLAGS="%{rpmcflags} -DLINUX -DDEBUG_GDS_ALLOC -pipe -MMD -fPIC -Wall -Wno-switch $DARCH" \ | |
3e30a275 JB |
210 | LIB_LINK_RPATH_LINE= \ |
211 | LIB_CLIENT_LINK_OPTIONS="-lpthread" | |
9fa49beb | 212 | |
85bfee62 | 213 | # fb_lock_mgr is started during build - try to stop it (if /proc is mounted...) |
6f50770c | 214 | fuser -k gen/firebird/bin/fb_lock_mgr 2>/dev/null || : |
85bfee62 | 215 | |
9fa49beb JB |
216 | %install |
217 | rm -rf $RPM_BUILD_ROOT | |
9fa49beb | 218 | |
3e30a275 | 219 | %{__make} -C src -f ../gen/Makefile.install buildImageDir |
9fa49beb | 220 | |
8fce9f85 KK |
221 | install -d $RPM_BUILD_ROOT%{_sysconfdir}/{firebird,rc.d/init.d,sysconfig/rc-inetd} |
222 | install -d $RPM_BUILD_ROOT{%{_bindir},%{ibdir},%{_libdir},%{_includedir}} \ | |
75e61db1 | 223 | install -d $RPM_BUILD_ROOT/var/{log,lib/firebird} \ |
9fa49beb | 224 | $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} |
98517597 | 225 | |
3e30a275 | 226 | install gen/firebird/lib/libfb*.a $RPM_BUILD_ROOT%{_libdir} |
59aa3c60 | 227 | install gen/firebird/lib/libfbembed.so* $RPM_BUILD_ROOT%{_libdir} |
75e61db1 | 228 | touch $RPM_BUILD_ROOT/var/log/firebird.log |
3e30a275 | 229 | |
75e61db1 KK |
230 | cd gen/buildroot/%{ibdir} |
231 | install security2.fdb $RPM_BUILD_ROOT/var/lib/firebird | |
232 | install *.conf $RPM_BUILD_ROOT%{_sysconfdir}/firebird | |
9fa49beb | 233 | install include/* $RPM_BUILD_ROOT%{_includedir} |
75e61db1 | 234 | cp -af UDF bin help intl firebird.msg $RPM_BUILD_ROOT%{ibdir} |
3e30a275 | 235 | cp -df lib/* $RPM_BUILD_ROOT%{_libdir} |
6302c6a3 | 236 | cp -rf examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} |
9fa49beb | 237 | |
3e30a275 | 238 | # or libfbembed? |
6302c6a3 JB |
239 | ln -sf libfbclient.so.2 $RPM_BUILD_ROOT%{_libdir}/libgds.so.0 |
240 | ln -sf libfbclient.so.2 $RPM_BUILD_ROOT%{_libdir}/libgds.so | |
3e30a275 JB |
241 | |
242 | ln -sf libfbstatic.a $RPM_BUILD_ROOT%{_libdir}/libgds.a | |
243 | ||
8fce9f85 KK |
244 | for f in bin/{fb_lock_print,gbak,gdef,gds_drop,gfix,gpre,gsec,gsplit,gstat,nbackup}; do |
245 | ln -sf %{ibdir}/$f $RPM_BUILD_ROOT%{_bindir}/$ff | |
246 | done | |
247 | ||
cf9b601b | 248 | %if %{with ss} |
afbf0830 AM |
249 | install %{SOURCE100} $RPM_BUILD_ROOT/etc/rc.d/init.d/firebird |
250 | install %{SOURCE101} $RPM_BUILD_ROOT/etc/sysconfig/firebird | |
cf9b601b | 251 | %else |
afbf0830 | 252 | install %{SOURCE102} $RPM_BUILD_ROOT/etc/sysconfig/rc-inetd/firebird |
cf9b601b | 253 | %endif |
59aa3c60 | 254 | |
9fa49beb JB |
255 | %clean |
256 | rm -rf $RPM_BUILD_ROOT | |
257 | ||
85eb4f4f | 258 | %pre |
6ad2f94a ER |
259 | %groupadd -g 145 firebird |
260 | %useradd -u 145 -d %{ibdir} -s /bin/sh -g firebird -c "Firebird Server" firebird | |
85eb4f4f | 261 | |
98517597 | 262 | %if %{with ss} |
85eb4f4f AM |
263 | %post |
264 | /sbin/chkconfig --add firebird | |
f32247bb | 265 | %service firebird restart |
85eb4f4f AM |
266 | |
267 | %preun | |
268 | if [ "$1" = "0" ]; then | |
f32247bb | 269 | %service firebird stop |
6ad2f94a | 270 | /sbin/chkconfig --del firebird |
85eb4f4f | 271 | fi |
98517597 | 272 | %endif |
85eb4f4f AM |
273 | |
274 | %postun | |
275 | if [ "$1" = "0" ]; then | |
6ad2f94a ER |
276 | %userremove firebird |
277 | %groupremove firebird | |
85eb4f4f AM |
278 | fi |
279 | ||
3e30a275 JB |
280 | %post lib -p /sbin/ldconfig |
281 | %postun lib -p /sbin/ldconfig | |
282 | ||
75e61db1 KK |
283 | %triggerpostun -- %{name} < 2.1.1.17910-2 |
284 | if [ -f %{ibdir}/aliases.conf.rpmsave ]; then | |
a82ae013 | 285 | mv -f %{ibdir}/aliases.conf.rpmsave %{_sysconfdir}/firebird/aliases.conf |
75e61db1 KK |
286 | fi |
287 | if [ -f %{ibdir}/firebird.conf.rpmsave ]; then | |
a82ae013 | 288 | mv -f %{ibdir}/firebird.conf.rpmsave %{_sysconfdir}/firebird/firebird.conf |
75e61db1 KK |
289 | fi |
290 | if [ -f %{ibdir}/security2.fdb.rpmsave ]; then | |
a82ae013 | 291 | mv -f %{ibdir}/security2.fdb.rpmsave /var/lib/firebird/security2.fdb |
75e61db1 KK |
292 | fi |
293 | ||
9fa49beb JB |
294 | %files |
295 | %defattr(644,root,root,755) | |
6302c6a3 | 296 | %doc doc/{license,sql.extensions,Firebird_conf.txt,README.user*,WhatsNew,fb2-todo.txt} |
75e61db1 KK |
297 | %dir %{_sysconfdir}/firebird |
298 | %attr(640,root,firebird) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/firebird/*.conf | |
8fce9f85 KK |
299 | %attr(755,root,root) %{_bindir}/fb_lock_print |
300 | %attr(755,root,root) %{_bindir}/g* | |
301 | %attr(755,root,root) %{_bindir}/nbackup | |
9fa49beb | 302 | %attr(755,root,root) %{_libdir}/libib_util.so |
9fa49beb | 303 | %attr(755,root,root) %{ibdir}/UDF |
27e76269 | 304 | %attr(755,root,root) %{ibdir}/bin/* |
c6be0ab0 | 305 | %exclude %{ibdir}/bin/fb_config |
9fa49beb | 306 | %{ibdir}/help |
13aa50ef | 307 | %dir %attr(770,root,firebird) %{ibdir}/intl |
e3bc302b | 308 | %attr(755,root,root) %{ibdir}/intl/fbintl |
8fce9f85 | 309 | # should it be moved to %{_sysconfdir} and marked as config? |
6302c6a3 | 310 | %{ibdir}/intl/fbintl.conf |
3e30a275 | 311 | %{ibdir}/firebird.msg |
75e61db1 KK |
312 | %dir %attr(770,root,firebird) /var/lib/firebird |
313 | %attr(660,root,firebird) %config(noreplace) %verify(not md5 mtime size) /var/lib/firebird/security2.fdb | |
314 | %attr(660,root,firebird) %config(noreplace) %verify(not md5 mtime size) /var/log/firebird.log | |
315 | ||
98517597 | 316 | %if %{with ss} |
85eb4f4f AM |
317 | %attr(754,root,root) /etc/rc.d/init.d/firebird |
318 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/firebird | |
98517597 | 319 | %else |
d88756a7 | 320 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/rc-inetd/firebird |
98517597 | 321 | %endif |
9fa49beb | 322 | |
27e76269 JR |
323 | %files dirs |
324 | %defattr(644,root,root,755) | |
325 | %dir %{ibdir} | |
326 | %dir %{ibdir}/bin | |
327 | ||
9fa49beb JB |
328 | %files lib |
329 | %defattr(644,root,root,755) | |
3e30a275 | 330 | %attr(755,root,root) %{_libdir}/libfbclient.so.*.*.* |
6302c6a3 | 331 | %attr(755,root,root) %ghost %{_libdir}/libfbclient.so.2 |
3e30a275 | 332 | %attr(755,root,root) %{_libdir}/libfbembed.so.*.*.* |
6302c6a3 | 333 | %attr(755,root,root) %ghost %{_libdir}/libfbembed.so.2.1 |
0c3071c2 | 334 | |
3e30a275 JB |
335 | # InterBase/old Firebird compatibility symlinks |
336 | %attr(755,root,root) %{_libdir}/libgds.so.0 | |
337 | # needed here - original libgds.so.0 didn't have soname, so some old | |
338 | # (possibly not open-source) apps may be linked with libgds.so | |
339 | %attr(755,root,root) %{_libdir}/libgds.so | |
9fa49beb JB |
340 | |
341 | %files devel | |
342 | %defattr(644,root,root,755) | |
3e30a275 JB |
343 | %attr(755,root,root) %{_libdir}/libfbclient.so |
344 | %attr(755,root,root) %{_libdir}/libfbembed.so | |
c6be0ab0 | 345 | %attr(755,root,root) %{ibdir}/bin/fb_config |
6302c6a3 JB |
346 | %{_includedir}/ib_util.h |
347 | %{_includedir}/ibase.h | |
348 | %{_includedir}/iberror.h | |
349 | %{_includedir}/perf.h | |
9fa49beb JB |
350 | %{_examplesdir}/%{name}-%{version} |
351 | ||
352 | %files static | |
353 | %defattr(644,root,root,755) | |
3e30a275 JB |
354 | %{_libdir}/libfbstatic.a |
355 | # compat link | |
9fa49beb | 356 | %{_libdir}/libgds.a |
6d06b555 JB |
357 | |
358 | %files doc | |
359 | %defattr(644,root,root,755) | |
360 | %doc docs/* |