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