]>
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)? | |
81ff2314 AM |
16 | Version: 2.5.1.26351 |
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 |
81ff2314 | 21 | # Source0-md5: 1772fba4f09c8fc84d989282405f90fd |
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 |
81ff2314 | 47 | Patch3: Firebird-fix-CORE-3388.patch |
75e61db1 | 48 | Patch4: %{name}-FHS.patch |
81ff2314 | 49 | |
02d31faa | 50 | Patch6: %{name}-gcc-icu.patch |
81ff2314 | 51 | |
a4b6cfeb | 52 | Patch9: %{name}-rpath.patch |
0a93a495 | 53 | Patch10: %{name}-noroot.patch |
40c5ec59 | 54 | URL: http://www.firebirdsql.org/ |
19988721 | 55 | BuildRequires: autoconf >= 2.56 |
41daf6c3 | 56 | BuildRequires: automake |
c7da80e5 | 57 | BuildRequires: bison |
0a93a495 | 58 | BuildRequires: libatomic_ops |
6302c6a3 | 59 | BuildRequires: libedit-devel |
6246a616 | 60 | BuildRequires: libicu-devel |
3e30a275 | 61 | BuildRequires: libstdc++-devel |
f32247bb | 62 | BuildRequires: libtool |
6f50770c | 63 | BuildRequires: psmisc >= 22.5-2 |
f32247bb | 64 | BuildRequires: rpmbuild(macros) >= 1.268 |
f09ba703 | 65 | BuildRequires: sed >= 4.0 |
27e76269 | 66 | Requires: %{name}-dirs = %{version}-%{release} |
ff19b114 | 67 | Requires: %{name}-lib = %{version}-%{release} |
bf15fb73 ER |
68 | %if %{with ss} |
69 | Requires(post,preun): /sbin/chkconfig | |
70 | Requires: rc-scripts | |
71 | %endif | |
19988721 JB |
72 | # official ports are x86, x86_64, ppc, sparc, arm, mips/mipsel, ia64 |
73 | # alpha is added in morearchs patch | |
74 | # see morearchs patch if you want more | |
75 | ExclusiveArch: %{ix86} %{x8664} arm ia64 mips mipsel ppc sparc sparcv9 alpha | |
9fa49beb JB |
76 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
77 | ||
78 | %define ibdir %{_libdir}/interbase | |
3e30a275 JB |
79 | %define specflags -fno-strict-aliasing |
80 | %define debugcflags -O1 -g -Wall -fno-strict-aliasing | |
81ff2314 | 81 | %define Werror_cflags '' |
9fa49beb JB |
82 | |
83 | %description | |
84 | Firebird is a powerful, high-performance relational database designed | |
85 | to be embedded into applications on multiple platforms. | |
86 | ||
bc5f1efa JR |
87 | %description -l pl.UTF-8 |
88 | Firebird jest potężnym, wysoko wydajnym systemem relacyjnych baz | |
9fa49beb JB |
89 | danych zaprojektowanym do osadzania w aplikacjach na wielu |
90 | platformach. | |
91 | ||
bc5f1efa | 92 | %description -l de.UTF-8 |
d88756a7 | 93 | Firebird ist der Open-Source-Spin-Off des weiterhin kommerziell von |
94 | Borland vertriebenen relationalen Datenbankmanagementsystemes | |
95 | InterBase. Die Abspaltung erfolgte im Jahre 2000 als kurz vor Freigabe | |
bc5f1efa JR |
96 | der Version 6 des kommerziellen Vorgängers Interbase bei Borland |
97 | ernsthafte Überlegungen im Gange waren, die Weiterentwicklung | |
d88756a7 | 98 | einzustellen. |
99 | ||
100 | Aus Interbase 6.0 wurde Firebird 1.0, wobei dies als eine | |
101 | Bugfix-Version mit nur wenigen Erweiterungen angesehen werden kann. | |
102 | Eine Erweiterung von Firebird 1.0 ist der 64-Bit File I/O, so dass | |
bc5f1efa | 103 | auch Datenbankdateien über 2GB erzeugt werden können. |
d88756a7 | 104 | |
27e76269 JR |
105 | %package dirs |
106 | Summary: Firebird SQL Database common directories | |
107 | Summary(pl.UTF-8): Firebird - wspólne katalogi | |
108 | Group: Applications/Databases | |
109 | ||
110 | %description dirs | |
111 | Firebird SQL Database common directories. | |
112 | ||
113 | %description dirs -l pl.UTF-8 | |
114 | Firebird - wspólne katalogi. | |
115 | ||
9fa49beb JB |
116 | %package lib |
117 | Summary: Firebird shared library | |
dc230623 | 118 | Summary(pl.UTF-8): Biblioteka współdzielona Firebird |
9fa49beb JB |
119 | Group: Libraries |
120 | ||
121 | %description lib | |
122 | Firebird shared library (libgds). | |
123 | ||
bc5f1efa JR |
124 | %description lib -l pl.UTF-8 |
125 | Biblioteka współdzielona Firebird (libgds). | |
9fa49beb JB |
126 | |
127 | %package devel | |
128 | Summary: Header files for Firebird library | |
dc230623 | 129 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki Firebird |
9fa49beb | 130 | Group: Development/Libraries |
27e76269 | 131 | Requires: %{name}-dirs = %{version}-%{release} |
ff19b114 | 132 | Requires: %{name}-lib = %{version}-%{release} |
3e30a275 | 133 | Requires: libstdc++-devel |
9fa49beb JB |
134 | |
135 | %description devel | |
136 | Header files for Firebird library. | |
137 | ||
bc5f1efa JR |
138 | %description devel -l pl.UTF-8 |
139 | Pliki nagłówkowe biblioteki Firebird. | |
9fa49beb JB |
140 | |
141 | %package static | |
142 | Summary: Static Firebird library | |
dc230623 | 143 | Summary(pl.UTF-8): Statyczna biblioteka Firebird |
9fa49beb | 144 | Group: Development/Libraries |
ff19b114 | 145 | Requires: %{name}-devel = %{version}-%{release} |
9fa49beb JB |
146 | |
147 | %description static | |
148 | Static Firebird library (libgds). | |
149 | ||
bc5f1efa | 150 | %description static -l pl.UTF-8 |
9fa49beb JB |
151 | Statyczna biblioteka Firebird (libgds). |
152 | ||
6d06b555 JB |
153 | %package doc |
154 | Summary: Extensive InterBase and Firebird documentation | |
dc230623 | 155 | Summary(pl.UTF-8): Obszerna dokumentacja do baz InterBase i Firebird |
6d06b555 JB |
156 | Group: Documentation |
157 | ||
158 | %description doc | |
159 | Extensive InterBase and Firebird documentation. | |
160 | ||
bc5f1efa | 161 | %description doc -l pl.UTF-8 |
6d06b555 JB |
162 | Obszerna dokumentacja do baz InterBase i Firebird. |
163 | ||
9fa49beb | 164 | %prep |
8fce9f85 | 165 | %setup -q -n %{name}-%{version}-0 |
9fa49beb | 166 | %patch0 -p1 |
6302c6a3 JB |
167 | %patch1 -p1 |
168 | %patch2 -p1 | |
169 | %patch3 -p1 | |
75e61db1 | 170 | %patch4 -p1 |
81ff2314 | 171 | |
02d31faa | 172 | %patch6 -p0 |
81ff2314 | 173 | |
a4b6cfeb | 174 | %patch9 -p1 |
0a93a495 | 175 | %patch10 -p1 |
41ed72e5 | 176 | |
6302c6a3 JB |
177 | mkdir docs |
178 | cp %{SOURCE1} %{SOURCE3} %{SOURCE4} %{SOURCE5} %{SOURCE6} %{SOURCE7} %{SOURCE8} %{SOURCE9} docs | |
179 | ||
6be40696 | 180 | # not processed by configure |
6299ab26 | 181 | %{__sed} -i -e 's/^CFLAGS.*$/& %{rpmcflags} %{rpmcppflags}/' extern/btyacc/Makefile |
a4b6cfeb | 182 | %{__sed} -i -e 's/^\(CC\|LINKER\)\(.*= \)gcc$/\1\2 %{__cc}/' extern/btyacc/Makefile |
6be40696 | 183 | |
9fa49beb | 184 | %build |
3e30a275 JB |
185 | %{__libtoolize} |
186 | %{__aclocal} | |
187 | %{__autoconf} | |
9fa49beb | 188 | |
3e30a275 | 189 | %configure \ |
afbf0830 | 190 | --with-editline \ |
0a93a495 JB |
191 | --with-fbconf=%{_sysconfdir}/firebird \ |
192 | --with-fblib=%{_libdir} \ | |
193 | --with-fblog=/var/log \ | |
194 | --with-fbsecure-db=/var/lib/firebird \ | |
75e61db1 KK |
195 | --with-gnu-ld \ |
196 | --with-gpre-pascal \ | |
afbf0830 AM |
197 | --with-system-editline \ |
198 | --with-system-icu \ | |
98517597 | 199 | %{?with_ss:--enable-superserver} \ |
3e30a275 JB |
200 | --prefix=%{ibdir} \ |
201 | %{?debug:--enable-debug} | |
9fa49beb | 202 | |
a4b6cfeb | 203 | %{__make} -j1 |
9fa49beb | 204 | |
85bfee62 | 205 | # fb_lock_mgr is started during build - try to stop it (if /proc is mounted...) |
6f50770c | 206 | fuser -k gen/firebird/bin/fb_lock_mgr 2>/dev/null || : |
85bfee62 | 207 | |
9fa49beb JB |
208 | %install |
209 | rm -rf $RPM_BUILD_ROOT | |
9fa49beb | 210 | |
3e30a275 | 211 | %{__make} -C src -f ../gen/Makefile.install buildImageDir |
9fa49beb | 212 | |
8fce9f85 KK |
213 | install -d $RPM_BUILD_ROOT%{_sysconfdir}/{firebird,rc.d/init.d,sysconfig/rc-inetd} |
214 | install -d $RPM_BUILD_ROOT{%{_bindir},%{ibdir},%{_libdir},%{_includedir}} \ | |
75e61db1 | 215 | install -d $RPM_BUILD_ROOT/var/{log,lib/firebird} \ |
9fa49beb | 216 | $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} |
98517597 | 217 | |
3e30a275 | 218 | install gen/firebird/lib/libfb*.a $RPM_BUILD_ROOT%{_libdir} |
75e61db1 | 219 | touch $RPM_BUILD_ROOT/var/log/firebird.log |
3e30a275 | 220 | |
0a93a495 JB |
221 | cd gen/buildroot |
222 | install var/lib/firebird/security2.fdb $RPM_BUILD_ROOT/var/lib/firebird | |
223 | install etc/firebird/*.conf $RPM_BUILD_ROOT%{_sysconfdir}/firebird | |
6299ab26 | 224 | cp -df usr/%{_lib}/*.so* $RPM_BUILD_ROOT%{_libdir} |
0a93a495 | 225 | cd .%{ibdir} |
9fa49beb | 226 | install include/* $RPM_BUILD_ROOT%{_includedir} |
0a93a495 JB |
227 | cp -af UDF bin help intl plugins firebird.msg de_DE.msg fr_FR.msg $RPM_BUILD_ROOT%{ibdir} |
228 | chmod 755 examples examples/{api,dyn,include,stat,udf} # allow further cleaning | |
6302c6a3 | 229 | cp -rf examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} |
9fa49beb | 230 | |
3e30a275 | 231 | # or libfbembed? |
6302c6a3 JB |
232 | ln -sf libfbclient.so.2 $RPM_BUILD_ROOT%{_libdir}/libgds.so.0 |
233 | ln -sf libfbclient.so.2 $RPM_BUILD_ROOT%{_libdir}/libgds.so | |
3e30a275 JB |
234 | |
235 | ln -sf libfbstatic.a $RPM_BUILD_ROOT%{_libdir}/libgds.a | |
236 | ||
0a93a495 JB |
237 | for f in bin/{fb_lock_print,gbak,gdef,gfix,gpre,gsec,gsplit,gstat,nbackup}; do |
238 | ln -sf %{ibdir}/$f $RPM_BUILD_ROOT%{_bindir}/${f#bin/} | |
8fce9f85 KK |
239 | done |
240 | ||
cf9b601b | 241 | %if %{with ss} |
afbf0830 AM |
242 | install %{SOURCE100} $RPM_BUILD_ROOT/etc/rc.d/init.d/firebird |
243 | install %{SOURCE101} $RPM_BUILD_ROOT/etc/sysconfig/firebird | |
cf9b601b | 244 | %else |
afbf0830 | 245 | install %{SOURCE102} $RPM_BUILD_ROOT/etc/sysconfig/rc-inetd/firebird |
cf9b601b | 246 | %endif |
59aa3c60 | 247 | |
9fa49beb JB |
248 | %clean |
249 | rm -rf $RPM_BUILD_ROOT | |
250 | ||
85eb4f4f | 251 | %pre |
6ad2f94a ER |
252 | %groupadd -g 145 firebird |
253 | %useradd -u 145 -d %{ibdir} -s /bin/sh -g firebird -c "Firebird Server" firebird | |
85eb4f4f | 254 | |
98517597 | 255 | %if %{with ss} |
85eb4f4f AM |
256 | %post |
257 | /sbin/chkconfig --add firebird | |
f32247bb | 258 | %service firebird restart |
85eb4f4f AM |
259 | |
260 | %preun | |
261 | if [ "$1" = "0" ]; then | |
f32247bb | 262 | %service firebird stop |
6ad2f94a | 263 | /sbin/chkconfig --del firebird |
85eb4f4f | 264 | fi |
98517597 | 265 | %endif |
85eb4f4f AM |
266 | |
267 | %postun | |
268 | if [ "$1" = "0" ]; then | |
6ad2f94a ER |
269 | %userremove firebird |
270 | %groupremove firebird | |
85eb4f4f AM |
271 | fi |
272 | ||
3e30a275 JB |
273 | %post lib -p /sbin/ldconfig |
274 | %postun lib -p /sbin/ldconfig | |
275 | ||
75e61db1 KK |
276 | %triggerpostun -- %{name} < 2.1.1.17910-2 |
277 | if [ -f %{ibdir}/aliases.conf.rpmsave ]; then | |
a82ae013 | 278 | mv -f %{ibdir}/aliases.conf.rpmsave %{_sysconfdir}/firebird/aliases.conf |
75e61db1 KK |
279 | fi |
280 | if [ -f %{ibdir}/firebird.conf.rpmsave ]; then | |
a82ae013 | 281 | mv -f %{ibdir}/firebird.conf.rpmsave %{_sysconfdir}/firebird/firebird.conf |
75e61db1 KK |
282 | fi |
283 | if [ -f %{ibdir}/security2.fdb.rpmsave ]; then | |
a82ae013 | 284 | mv -f %{ibdir}/security2.fdb.rpmsave /var/lib/firebird/security2.fdb |
75e61db1 KK |
285 | fi |
286 | ||
9fa49beb JB |
287 | %files |
288 | %defattr(644,root,root,755) | |
6302c6a3 | 289 | %doc doc/{license,sql.extensions,Firebird_conf.txt,README.user*,WhatsNew,fb2-todo.txt} |
75e61db1 | 290 | %dir %{_sysconfdir}/firebird |
0a93a495 JB |
291 | %attr(640,root,firebird) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/firebird/aliases.conf |
292 | %attr(640,root,firebird) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/firebird/fbtrace.conf | |
293 | %attr(640,root,firebird) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/firebird/firebird.conf | |
8fce9f85 | 294 | %attr(755,root,root) %{_bindir}/fb_lock_print |
0a93a495 JB |
295 | %attr(755,root,root) %{_bindir}/gbak |
296 | %attr(755,root,root) %{_bindir}/gdef | |
297 | %attr(755,root,root) %{_bindir}/gfix | |
298 | %attr(755,root,root) %{_bindir}/gpre | |
299 | %attr(755,root,root) %{_bindir}/gsec | |
300 | %attr(755,root,root) %{_bindir}/gsplit | |
301 | %attr(755,root,root) %{_bindir}/gstat | |
8fce9f85 | 302 | %attr(755,root,root) %{_bindir}/nbackup |
9fa49beb | 303 | %attr(755,root,root) %{_libdir}/libib_util.so |
9fa49beb | 304 | %attr(755,root,root) %{ibdir}/UDF |
27e76269 | 305 | %attr(755,root,root) %{ibdir}/bin/* |
c6be0ab0 | 306 | %exclude %{ibdir}/bin/fb_config |
9fa49beb | 307 | %{ibdir}/help |
13aa50ef | 308 | %dir %attr(770,root,firebird) %{ibdir}/intl |
e3bc302b | 309 | %attr(755,root,root) %{ibdir}/intl/fbintl |
8fce9f85 | 310 | # should it be moved to %{_sysconfdir} and marked as config? |
6302c6a3 | 311 | %{ibdir}/intl/fbintl.conf |
0a93a495 JB |
312 | %dir %{ibdir}/plugins |
313 | %attr(755,root,root) %{ibdir}/plugins/libfbtrace.so | |
3e30a275 | 314 | %{ibdir}/firebird.msg |
0a93a495 JB |
315 | %lang(de) %{ibdir}/de_DE.msg |
316 | %lang(fr) %{ibdir}/fr_FR.msg | |
75e61db1 KK |
317 | %dir %attr(770,root,firebird) /var/lib/firebird |
318 | %attr(660,root,firebird) %config(noreplace) %verify(not md5 mtime size) /var/lib/firebird/security2.fdb | |
319 | %attr(660,root,firebird) %config(noreplace) %verify(not md5 mtime size) /var/log/firebird.log | |
320 | ||
98517597 | 321 | %if %{with ss} |
85eb4f4f AM |
322 | %attr(754,root,root) /etc/rc.d/init.d/firebird |
323 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/firebird | |
98517597 | 324 | %else |
d88756a7 | 325 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/rc-inetd/firebird |
98517597 | 326 | %endif |
9fa49beb | 327 | |
27e76269 JR |
328 | %files dirs |
329 | %defattr(644,root,root,755) | |
330 | %dir %{ibdir} | |
331 | %dir %{ibdir}/bin | |
332 | ||
9fa49beb JB |
333 | %files lib |
334 | %defattr(644,root,root,755) | |
3e30a275 | 335 | %attr(755,root,root) %{_libdir}/libfbclient.so.*.*.* |
6302c6a3 | 336 | %attr(755,root,root) %ghost %{_libdir}/libfbclient.so.2 |
3e30a275 | 337 | %attr(755,root,root) %{_libdir}/libfbembed.so.*.*.* |
0a93a495 | 338 | %attr(755,root,root) %ghost %{_libdir}/libfbembed.so.2.5 |
0c3071c2 | 339 | |
3e30a275 JB |
340 | # InterBase/old Firebird compatibility symlinks |
341 | %attr(755,root,root) %{_libdir}/libgds.so.0 | |
342 | # needed here - original libgds.so.0 didn't have soname, so some old | |
343 | # (possibly not open-source) apps may be linked with libgds.so | |
344 | %attr(755,root,root) %{_libdir}/libgds.so | |
9fa49beb JB |
345 | |
346 | %files devel | |
347 | %defattr(644,root,root,755) | |
3e30a275 JB |
348 | %attr(755,root,root) %{_libdir}/libfbclient.so |
349 | %attr(755,root,root) %{_libdir}/libfbembed.so | |
c6be0ab0 | 350 | %attr(755,root,root) %{ibdir}/bin/fb_config |
6302c6a3 JB |
351 | %{_includedir}/ib_util.h |
352 | %{_includedir}/ibase.h | |
353 | %{_includedir}/iberror.h | |
354 | %{_includedir}/perf.h | |
9fa49beb JB |
355 | %{_examplesdir}/%{name}-%{version} |
356 | ||
357 | %files static | |
358 | %defattr(644,root,root,755) | |
3e30a275 JB |
359 | %{_libdir}/libfbstatic.a |
360 | # compat link | |
9fa49beb | 361 | %{_libdir}/libgds.a |
6d06b555 JB |
362 | |
363 | %files doc | |
364 | %defattr(644,root,root,755) | |
365 | %doc docs/* |