]>
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)? | |
734522b6 JB |
16 | Version: 2.5.6.27020 |
17 | Release: 1 | |
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 |
734522b6 | 21 | # Source0-md5: 5514798d5dca8c3525525c61cf35283e |
0a93a495 JB |
22 | Source1: http://www.firebirdsql.org/pdfmanual/%{name}-2.5-QuickStart.pdf |
23 | # Source1-md5: a7776f1eae45ba0b2543c203cd5271ae | |
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 | 46 | Patch2: %{name}-va.patch |
19f3deae JB |
47 | Patch3: %{name}-FHS.patch |
48 | Patch4: %{name}-opt.patch | |
49 | Patch5: %{name}-gcc-icu.patch | |
50 | Patch6: %{name}-rpath.patch | |
51 | Patch7: %{name}-noroot.patch | |
40c5ec59 | 52 | URL: http://www.firebirdsql.org/ |
19988721 | 53 | BuildRequires: autoconf >= 2.56 |
41daf6c3 | 54 | BuildRequires: automake |
c7da80e5 | 55 | BuildRequires: bison |
0a93a495 | 56 | BuildRequires: libatomic_ops |
6302c6a3 | 57 | BuildRequires: libedit-devel |
6246a616 | 58 | BuildRequires: libicu-devel |
3e30a275 | 59 | BuildRequires: libstdc++-devel |
f32247bb | 60 | BuildRequires: libtool |
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 | |
f220d6ad | 72 | ExclusiveArch: %{ix86} %{x8664} x32 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 | |
81ff2314 | 78 | %define Werror_cflags '' |
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 | |
27e76269 JR |
102 | %package dirs |
103 | Summary: Firebird SQL Database common directories | |
104 | Summary(pl.UTF-8): Firebird - wspólne katalogi | |
105 | Group: Applications/Databases | |
106 | ||
107 | %description dirs | |
108 | Firebird SQL Database common directories. | |
109 | ||
110 | %description dirs -l pl.UTF-8 | |
111 | Firebird - wspólne katalogi. | |
112 | ||
9fa49beb JB |
113 | %package lib |
114 | Summary: Firebird shared library | |
dc230623 | 115 | Summary(pl.UTF-8): Biblioteka współdzielona Firebird |
9fa49beb JB |
116 | Group: Libraries |
117 | ||
118 | %description lib | |
119 | Firebird shared library (libgds). | |
120 | ||
bc5f1efa JR |
121 | %description lib -l pl.UTF-8 |
122 | Biblioteka współdzielona Firebird (libgds). | |
9fa49beb JB |
123 | |
124 | %package devel | |
125 | Summary: Header files for Firebird library | |
dc230623 | 126 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki Firebird |
9fa49beb | 127 | Group: Development/Libraries |
27e76269 | 128 | Requires: %{name}-dirs = %{version}-%{release} |
ff19b114 | 129 | Requires: %{name}-lib = %{version}-%{release} |
3e30a275 | 130 | Requires: libstdc++-devel |
9fa49beb JB |
131 | |
132 | %description devel | |
133 | Header files for Firebird library. | |
134 | ||
bc5f1efa JR |
135 | %description devel -l pl.UTF-8 |
136 | Pliki nagłówkowe biblioteki Firebird. | |
9fa49beb JB |
137 | |
138 | %package static | |
139 | Summary: Static Firebird library | |
dc230623 | 140 | Summary(pl.UTF-8): Statyczna biblioteka Firebird |
9fa49beb | 141 | Group: Development/Libraries |
ff19b114 | 142 | Requires: %{name}-devel = %{version}-%{release} |
9fa49beb JB |
143 | |
144 | %description static | |
145 | Static Firebird library (libgds). | |
146 | ||
bc5f1efa | 147 | %description static -l pl.UTF-8 |
9fa49beb JB |
148 | Statyczna biblioteka Firebird (libgds). |
149 | ||
6d06b555 JB |
150 | %package doc |
151 | Summary: Extensive InterBase and Firebird documentation | |
dc230623 | 152 | Summary(pl.UTF-8): Obszerna dokumentacja do baz InterBase i Firebird |
6d06b555 JB |
153 | Group: Documentation |
154 | ||
155 | %description doc | |
156 | Extensive InterBase and Firebird documentation. | |
157 | ||
bc5f1efa | 158 | %description doc -l pl.UTF-8 |
6d06b555 JB |
159 | Obszerna dokumentacja do baz InterBase i Firebird. |
160 | ||
9fa49beb | 161 | %prep |
8fce9f85 | 162 | %setup -q -n %{name}-%{version}-0 |
9fa49beb | 163 | %patch0 -p1 |
6302c6a3 JB |
164 | %patch1 -p1 |
165 | %patch2 -p1 | |
19f3deae | 166 | %patch3 -p1 |
75e61db1 | 167 | %patch4 -p1 |
19f3deae JB |
168 | %patch5 -p0 |
169 | %patch6 -p1 | |
170 | %patch7 -p1 | |
41ed72e5 | 171 | |
6302c6a3 JB |
172 | mkdir docs |
173 | cp %{SOURCE1} %{SOURCE3} %{SOURCE4} %{SOURCE5} %{SOURCE6} %{SOURCE7} %{SOURCE8} %{SOURCE9} docs | |
174 | ||
6be40696 | 175 | # not processed by configure |
6299ab26 | 176 | %{__sed} -i -e 's/^CFLAGS.*$/& %{rpmcflags} %{rpmcppflags}/' extern/btyacc/Makefile |
a4b6cfeb | 177 | %{__sed} -i -e 's/^\(CC\|LINKER\)\(.*= \)gcc$/\1\2 %{__cc}/' extern/btyacc/Makefile |
6be40696 | 178 | |
9fa49beb | 179 | %build |
3e30a275 JB |
180 | %{__libtoolize} |
181 | %{__aclocal} | |
182 | %{__autoconf} | |
9fa49beb | 183 | |
3e30a275 | 184 | %configure \ |
afbf0830 | 185 | --with-editline \ |
0a93a495 JB |
186 | --with-fbconf=%{_sysconfdir}/firebird \ |
187 | --with-fblib=%{_libdir} \ | |
188 | --with-fblog=/var/log \ | |
189 | --with-fbsecure-db=/var/lib/firebird \ | |
75e61db1 KK |
190 | --with-gnu-ld \ |
191 | --with-gpre-pascal \ | |
afbf0830 AM |
192 | --with-system-editline \ |
193 | --with-system-icu \ | |
98517597 | 194 | %{?with_ss:--enable-superserver} \ |
3e30a275 JB |
195 | --prefix=%{ibdir} \ |
196 | %{?debug:--enable-debug} | |
9fa49beb | 197 | |
a4b6cfeb | 198 | %{__make} -j1 |
9fa49beb JB |
199 | |
200 | %install | |
201 | rm -rf $RPM_BUILD_ROOT | |
9fa49beb | 202 | |
3e30a275 | 203 | %{__make} -C src -f ../gen/Makefile.install buildImageDir |
9fa49beb | 204 | |
8fce9f85 KK |
205 | install -d $RPM_BUILD_ROOT%{_sysconfdir}/{firebird,rc.d/init.d,sysconfig/rc-inetd} |
206 | install -d $RPM_BUILD_ROOT{%{_bindir},%{ibdir},%{_libdir},%{_includedir}} \ | |
75e61db1 | 207 | install -d $RPM_BUILD_ROOT/var/{log,lib/firebird} \ |
9fa49beb | 208 | $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} |
98517597 | 209 | |
3e30a275 | 210 | install gen/firebird/lib/libfb*.a $RPM_BUILD_ROOT%{_libdir} |
75e61db1 | 211 | touch $RPM_BUILD_ROOT/var/log/firebird.log |
3e30a275 | 212 | |
0a93a495 JB |
213 | cd gen/buildroot |
214 | install var/lib/firebird/security2.fdb $RPM_BUILD_ROOT/var/lib/firebird | |
215 | install etc/firebird/*.conf $RPM_BUILD_ROOT%{_sysconfdir}/firebird | |
6299ab26 | 216 | cp -df usr/%{_lib}/*.so* $RPM_BUILD_ROOT%{_libdir} |
0a93a495 | 217 | cd .%{ibdir} |
9fa49beb | 218 | install include/* $RPM_BUILD_ROOT%{_includedir} |
0a93a495 | 219 | cp -af UDF bin help intl plugins firebird.msg de_DE.msg fr_FR.msg $RPM_BUILD_ROOT%{ibdir} |
894b33a3 | 220 | ln -s %{ibdir}/intl $RPM_BUILD_ROOT%{_sysconfdir}/firebird |
0a93a495 | 221 | chmod 755 examples examples/{api,dyn,include,stat,udf} # allow further cleaning |
6302c6a3 | 222 | cp -rf examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} |
9fa49beb | 223 | |
3e30a275 | 224 | # or libfbembed? |
6302c6a3 JB |
225 | ln -sf libfbclient.so.2 $RPM_BUILD_ROOT%{_libdir}/libgds.so.0 |
226 | ln -sf libfbclient.so.2 $RPM_BUILD_ROOT%{_libdir}/libgds.so | |
3e30a275 JB |
227 | |
228 | ln -sf libfbstatic.a $RPM_BUILD_ROOT%{_libdir}/libgds.a | |
229 | ||
0a93a495 JB |
230 | for f in bin/{fb_lock_print,gbak,gdef,gfix,gpre,gsec,gsplit,gstat,nbackup}; do |
231 | ln -sf %{ibdir}/$f $RPM_BUILD_ROOT%{_bindir}/${f#bin/} | |
8fce9f85 KK |
232 | done |
233 | ||
cf9b601b | 234 | %if %{with ss} |
afbf0830 AM |
235 | install %{SOURCE100} $RPM_BUILD_ROOT/etc/rc.d/init.d/firebird |
236 | install %{SOURCE101} $RPM_BUILD_ROOT/etc/sysconfig/firebird | |
cf9b601b | 237 | %else |
894b33a3 | 238 | sed -e 's|/usr/lib|%{_libdir}|' %{SOURCE102} >$RPM_BUILD_ROOT/etc/sysconfig/rc-inetd/firebird |
cf9b601b | 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 | ||
75e61db1 KK |
269 | %triggerpostun -- %{name} < 2.1.1.17910-2 |
270 | if [ -f %{ibdir}/aliases.conf.rpmsave ]; then | |
a82ae013 | 271 | mv -f %{ibdir}/aliases.conf.rpmsave %{_sysconfdir}/firebird/aliases.conf |
75e61db1 KK |
272 | fi |
273 | if [ -f %{ibdir}/firebird.conf.rpmsave ]; then | |
a82ae013 | 274 | mv -f %{ibdir}/firebird.conf.rpmsave %{_sysconfdir}/firebird/firebird.conf |
75e61db1 KK |
275 | fi |
276 | if [ -f %{ibdir}/security2.fdb.rpmsave ]; then | |
a82ae013 | 277 | mv -f %{ibdir}/security2.fdb.rpmsave /var/lib/firebird/security2.fdb |
75e61db1 KK |
278 | fi |
279 | ||
9fa49beb JB |
280 | %files |
281 | %defattr(644,root,root,755) | |
6302c6a3 | 282 | %doc doc/{license,sql.extensions,Firebird_conf.txt,README.user*,WhatsNew,fb2-todo.txt} |
75e61db1 | 283 | %dir %{_sysconfdir}/firebird |
0a93a495 JB |
284 | %attr(640,root,firebird) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/firebird/aliases.conf |
285 | %attr(640,root,firebird) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/firebird/fbtrace.conf | |
286 | %attr(640,root,firebird) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/firebird/firebird.conf | |
734522b6 | 287 | %{_sysconfdir}/firebird/intl |
8fce9f85 | 288 | %attr(755,root,root) %{_bindir}/fb_lock_print |
0a93a495 JB |
289 | %attr(755,root,root) %{_bindir}/gbak |
290 | %attr(755,root,root) %{_bindir}/gdef | |
291 | %attr(755,root,root) %{_bindir}/gfix | |
292 | %attr(755,root,root) %{_bindir}/gpre | |
293 | %attr(755,root,root) %{_bindir}/gsec | |
294 | %attr(755,root,root) %{_bindir}/gsplit | |
295 | %attr(755,root,root) %{_bindir}/gstat | |
8fce9f85 | 296 | %attr(755,root,root) %{_bindir}/nbackup |
9fa49beb | 297 | %attr(755,root,root) %{_libdir}/libib_util.so |
9fa49beb | 298 | %attr(755,root,root) %{ibdir}/UDF |
27e76269 | 299 | %attr(755,root,root) %{ibdir}/bin/* |
c6be0ab0 | 300 | %exclude %{ibdir}/bin/fb_config |
9fa49beb | 301 | %{ibdir}/help |
13aa50ef | 302 | %dir %attr(770,root,firebird) %{ibdir}/intl |
e3bc302b | 303 | %attr(755,root,root) %{ibdir}/intl/fbintl |
8fce9f85 | 304 | # should it be moved to %{_sysconfdir} and marked as config? |
6302c6a3 | 305 | %{ibdir}/intl/fbintl.conf |
0a93a495 JB |
306 | %dir %{ibdir}/plugins |
307 | %attr(755,root,root) %{ibdir}/plugins/libfbtrace.so | |
3e30a275 | 308 | %{ibdir}/firebird.msg |
0a93a495 JB |
309 | %lang(de) %{ibdir}/de_DE.msg |
310 | %lang(fr) %{ibdir}/fr_FR.msg | |
75e61db1 KK |
311 | %dir %attr(770,root,firebird) /var/lib/firebird |
312 | %attr(660,root,firebird) %config(noreplace) %verify(not md5 mtime size) /var/lib/firebird/security2.fdb | |
313 | %attr(660,root,firebird) %config(noreplace) %verify(not md5 mtime size) /var/log/firebird.log | |
314 | ||
98517597 | 315 | %if %{with ss} |
85eb4f4f AM |
316 | %attr(754,root,root) /etc/rc.d/init.d/firebird |
317 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/firebird | |
98517597 | 318 | %else |
d88756a7 | 319 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/rc-inetd/firebird |
98517597 | 320 | %endif |
9fa49beb | 321 | |
27e76269 JR |
322 | %files dirs |
323 | %defattr(644,root,root,755) | |
324 | %dir %{ibdir} | |
325 | %dir %{ibdir}/bin | |
326 | ||
9fa49beb JB |
327 | %files lib |
328 | %defattr(644,root,root,755) | |
3e30a275 | 329 | %attr(755,root,root) %{_libdir}/libfbclient.so.*.*.* |
6302c6a3 | 330 | %attr(755,root,root) %ghost %{_libdir}/libfbclient.so.2 |
3e30a275 | 331 | %attr(755,root,root) %{_libdir}/libfbembed.so.*.*.* |
0a93a495 | 332 | %attr(755,root,root) %ghost %{_libdir}/libfbembed.so.2.5 |
0c3071c2 | 333 | |
3e30a275 JB |
334 | # InterBase/old Firebird compatibility symlinks |
335 | %attr(755,root,root) %{_libdir}/libgds.so.0 | |
336 | # needed here - original libgds.so.0 didn't have soname, so some old | |
337 | # (possibly not open-source) apps may be linked with libgds.so | |
338 | %attr(755,root,root) %{_libdir}/libgds.so | |
9fa49beb JB |
339 | |
340 | %files devel | |
341 | %defattr(644,root,root,755) | |
3e30a275 JB |
342 | %attr(755,root,root) %{_libdir}/libfbclient.so |
343 | %attr(755,root,root) %{_libdir}/libfbembed.so | |
c6be0ab0 | 344 | %attr(755,root,root) %{ibdir}/bin/fb_config |
6302c6a3 JB |
345 | %{_includedir}/ib_util.h |
346 | %{_includedir}/ibase.h | |
347 | %{_includedir}/iberror.h | |
348 | %{_includedir}/perf.h | |
9fa49beb JB |
349 | %{_examplesdir}/%{name}-%{version} |
350 | ||
351 | %files static | |
352 | %defattr(644,root,root,755) | |
3e30a275 JB |
353 | %{_libdir}/libfbstatic.a |
354 | # compat link | |
9fa49beb | 355 | %{_libdir}/libgds.a |
6d06b555 JB |
356 | |
357 | %files doc | |
358 | %defattr(644,root,root,755) | |
359 | %doc docs/* |