]> git.pld-linux.org Git - packages/Firebird.git/blob - Firebird.spec
4c8b0f3011930e7cc8141a55e1f070e7ad88089e
[packages/Firebird.git] / Firebird.spec
1 # TODO:
2 # - kill unaligned accesses (create_db,gpre_current,gbak_static,isql_static) on alpha
3 #   - check if it's fixed now (RISC_ALIGNMENT is defined)
4 # - create classic server/super server subpackages and drop bcond
5 #   (see firebird2 on debian how to do it)
6 # - logrotate script
7 #
8 # Conditional build:
9 %bcond_with     ss      # Super Server (standalone daemon instead of inetd service)
10 #
11 Summary:        Firebird SQL Database Server and Client tools
12 Summary(de.UTF-8):      Firebird - relationalen Open-Source- Datenbankmanagementsystems
13 Summary(pl.UTF-8):      Firebird - serwer baz danych SQL oraz narzędzia klienckie
14 Name:           Firebird
15 # FirebirdCS/FirebirdSS (Classic Server/Super Server)?
16 Version:        2.1.3.18185
17 Release:        3
18 License:        Interbase Public License 1.0, Initial Developer's Public License 1.0
19 Group:          Applications/Databases
20 Source0:        http://downloads.sourceforge.net/firebird/%{name}-%{version}-0.tar.bz2
21 # Source0-md5:  ec42bd5c85dc2f65baef185228bcc5ca
22 Source1:        http://www.firebirdsql.org/pdfmanual/%{name}-2.1-QuickStart.pdf
23 # Source1-md5:  46bb1af4b94e8c8acee1d6ef2055b2d3
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
27 Source3:        http://www.firebirdsql.org/pdfmanual/%{name}-Null-Guide.pdf
28 # Source3-md5:  d1f8ba75fe3bb9eb9d203ce3f82a1a1a
29 Source4:        http://www.firebirdsql.org/pdfmanual/%{name}-Generator-Guide.pdf
30 # Source4-md5:  44e7568ef477072a8ad5f381c3e12a75
31 Source5:        http://www.firebirdsql.org/pdfmanual/MSSQL-to-%{name}.pdf
32 # Source5-md5:  1bd4a168e550910fc899e2aa125d83a3
33 Source6:        http://www.firebirdsql.org/pdfmanual/%{name}-nbackup.pdf
34 # Source6-md5:  7ef8a8b9a899d06bec2a5da0bb5fea0e
35 Source7:        http://www.firebirdsql.org/pdfmanual/%{name}-Utils-WIP.pdf
36 # Source7-md5:  39b9a4f3c9d9e27d985e9277ae163ceb
37 Source8:        http://www.firebirdnews.org/docs/fb2min.pdf
38 # Source8-md5:  ebac312c0afbe97b1850bdc74c553c28
39 Source9:        http://www.firebirdsql.org/doc/contrib/fb_2_1_errorcodes.pdf
40 # Source9-md5:  9ab392dc349657dbcf9a9c35acd8e8db
41 Source100:      firebird.init
42 Source101:      firebird.sysconfig
43 Source102:      firebird.inetd
44 Patch0:         %{name}-chmod.patch
45 Patch1:         %{name}-editline.patch
46 Patch2:         %{name}-va.patch
47 Patch3:         %{name}-morearchs.patch
48 Patch4:         %{name}-FHS.patch
49 Patch5:         %{name}-64bit.patch
50 Patch6:         %{name}-gcc-icu.patch
51 Patch7:         %{name}-btyacc-segv.patch
52 Patch8:         %{name}-opt.patch
53 Patch9:         %{name}-rpath.patch
54 URL:            http://www.firebirdsql.org/
55 BuildRequires:  autoconf >= 2.56
56 BuildRequires:  automake
57 BuildRequires:  bison
58 BuildRequires:  libedit-devel
59 BuildRequires:  libicu-devel
60 BuildRequires:  libstdc++-devel
61 BuildRequires:  libtool
62 BuildRequires:  psmisc >= 22.5-2
63 BuildRequires:  rpmbuild(macros) >= 1.268
64 BuildRequires:  sed >= 4.0
65 Requires:       %{name}-dirs = %{version}-%{release}
66 Requires:       %{name}-lib = %{version}-%{release}
67 %if %{with ss}
68 Requires(post,preun):   /sbin/chkconfig
69 Requires:       rc-scripts
70 %endif
71 # official ports are x86, x86_64, ppc, sparc, arm, mips/mipsel, ia64
72 # alpha is added in morearchs patch
73 # see morearchs patch if you want more
74 ExclusiveArch:  %{ix86} %{x8664} arm ia64 mips mipsel ppc sparc sparcv9 alpha
75 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
76
77 %define         ibdir   %{_libdir}/interbase
78 %define         specflags       -fno-strict-aliasing
79 %define         debugcflags     -O1 -g -Wall -fno-strict-aliasing
80
81 %description
82 Firebird is a powerful, high-performance relational database designed
83 to be embedded into applications on multiple platforms.
84
85 %description -l pl.UTF-8
86 Firebird jest potężnym, wysoko wydajnym systemem relacyjnych baz
87 danych zaprojektowanym do osadzania w aplikacjach na wielu
88 platformach.
89
90 %description -l de.UTF-8
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
94 der Version 6 des kommerziellen Vorgängers Interbase bei Borland
95 ernsthafte Überlegungen im Gange waren, die Weiterentwicklung
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
101 auch Datenbankdateien über 2GB erzeugt werden können.
102
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
114 %package lib
115 Summary:        Firebird shared library
116 Summary(pl.UTF-8):      Biblioteka współdzielona Firebird
117 Group:          Libraries
118
119 %description lib
120 Firebird shared library (libgds).
121
122 %description lib -l pl.UTF-8
123 Biblioteka współdzielona Firebird (libgds).
124
125 %package devel
126 Summary:        Header files for Firebird library
127 Summary(pl.UTF-8):      Pliki nagłówkowe biblioteki Firebird
128 Group:          Development/Libraries
129 Requires:       %{name}-dirs = %{version}-%{release}
130 Requires:       %{name}-lib = %{version}-%{release}
131 Requires:       libstdc++-devel
132
133 %description devel
134 Header files for Firebird library.
135
136 %description devel -l pl.UTF-8
137 Pliki nagłówkowe biblioteki Firebird.
138
139 %package static
140 Summary:        Static Firebird library
141 Summary(pl.UTF-8):      Statyczna biblioteka Firebird
142 Group:          Development/Libraries
143 Requires:       %{name}-devel = %{version}-%{release}
144
145 %description static
146 Static Firebird library (libgds).
147
148 %description static -l pl.UTF-8
149 Statyczna biblioteka Firebird (libgds).
150
151 %package doc
152 Summary:        Extensive InterBase and Firebird documentation
153 Summary(pl.UTF-8):      Obszerna dokumentacja do baz InterBase i Firebird
154 Group:          Documentation
155
156 %description doc
157 Extensive InterBase and Firebird documentation.
158
159 %description doc -l pl.UTF-8
160 Obszerna dokumentacja do baz InterBase i Firebird.
161
162 %prep
163 %setup -q -n %{name}-%{version}-0
164 %patch0 -p1
165 %patch1 -p1
166 %patch2 -p1
167 %patch3 -p1
168 %patch4 -p1
169 %patch5 -p1
170 %patch6 -p0
171 %patch7 -p1
172 %patch8 -p1
173 %patch9 -p1
174
175 %{__sed} -i 's,@prefix@,%{_prefix},' builds/install/misc/fb_config.in
176
177 # force rebuild
178 rm -f src/dsql/parse.cpp
179
180 mkdir docs
181 cp %{SOURCE1} %{SOURCE3} %{SOURCE4} %{SOURCE5} %{SOURCE6} %{SOURCE7} %{SOURCE8} %{SOURCE9} docs
182
183 # not processed by configure
184 %{__sed} -i -e 's/^CFLAGS.*$/& %{rpmcflags}/' extern/btyacc/Makefile
185 %{__sed} -i -e 's/^\(CC\|LINKER\)\(.*= \)gcc$/\1\2 %{__cc}/' extern/btyacc/Makefile
186
187 %build
188 %{__libtoolize}
189 %{__aclocal}
190 %{__autoconf}
191
192 %configure \
193         --with-editline \
194         --with-gnu-ld \
195         --with-gpre-pascal \
196         --with-system-editline \
197         --with-system-icu \
198         %{?with_ss:--enable-superserver} \
199         --prefix=%{ibdir} \
200         %{?debug:--enable-debug}
201
202 %{__make} -j1
203
204 # fb_lock_mgr is started during build - try to stop it (if /proc is mounted...)
205 fuser -k gen/firebird/bin/fb_lock_mgr 2>/dev/null || :
206
207 %install
208 rm -rf $RPM_BUILD_ROOT
209
210 %{__make} -C src -f ../gen/Makefile.install buildImageDir
211
212 install -d $RPM_BUILD_ROOT%{_sysconfdir}/{firebird,rc.d/init.d,sysconfig/rc-inetd}
213 install -d $RPM_BUILD_ROOT{%{_bindir},%{ibdir},%{_libdir},%{_includedir}} \
214 install -d $RPM_BUILD_ROOT/var/{log,lib/firebird} \
215         $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
216
217 install gen/firebird/lib/libfb*.a $RPM_BUILD_ROOT%{_libdir}
218 install gen/firebird/lib/libfbembed.so* $RPM_BUILD_ROOT%{_libdir}
219 touch $RPM_BUILD_ROOT/var/log/firebird.log
220
221 cd gen/buildroot/%{ibdir}
222 install security2.fdb $RPM_BUILD_ROOT/var/lib/firebird
223 install *.conf $RPM_BUILD_ROOT%{_sysconfdir}/firebird
224 install include/* $RPM_BUILD_ROOT%{_includedir}
225 cp -af UDF bin help intl firebird.msg $RPM_BUILD_ROOT%{ibdir}
226 cp -df lib/* $RPM_BUILD_ROOT%{_libdir}
227 cp -rf examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
228
229 # or libfbembed?
230 ln -sf libfbclient.so.2 $RPM_BUILD_ROOT%{_libdir}/libgds.so.0
231 ln -sf libfbclient.so.2 $RPM_BUILD_ROOT%{_libdir}/libgds.so
232
233 ln -sf libfbstatic.a $RPM_BUILD_ROOT%{_libdir}/libgds.a
234
235 for f in bin/{fb_lock_print,gbak,gdef,gds_drop,gfix,gpre,gsec,gsplit,gstat,nbackup}; do
236         ln -sf %{ibdir}/$f $RPM_BUILD_ROOT%{_bindir}/$ff
237 done
238
239 %if %{with ss}
240 install %{SOURCE100} $RPM_BUILD_ROOT/etc/rc.d/init.d/firebird
241 install %{SOURCE101} $RPM_BUILD_ROOT/etc/sysconfig/firebird
242 %else
243 install %{SOURCE102} $RPM_BUILD_ROOT/etc/sysconfig/rc-inetd/firebird
244 %endif
245
246 %clean
247 rm -rf $RPM_BUILD_ROOT
248
249 %pre
250 %groupadd -g 145 firebird
251 %useradd -u 145 -d %{ibdir} -s /bin/sh -g firebird -c "Firebird Server" firebird
252
253 %if %{with ss}
254 %post
255 /sbin/chkconfig --add firebird
256 %service firebird restart
257
258 %preun
259 if [ "$1" = "0" ]; then
260         %service firebird stop
261         /sbin/chkconfig --del firebird
262 fi
263 %endif
264
265 %postun
266 if [ "$1" = "0" ]; then
267         %userremove firebird
268         %groupremove firebird
269 fi
270
271 %post   lib -p /sbin/ldconfig
272 %postun lib -p /sbin/ldconfig
273
274 %triggerpostun -- %{name} < 2.1.1.17910-2
275 if [ -f %{ibdir}/aliases.conf.rpmsave ]; then
276         mv -f %{ibdir}/aliases.conf.rpmsave %{_sysconfdir}/firebird/aliases.conf
277 fi
278 if [ -f %{ibdir}/firebird.conf.rpmsave ]; then
279         mv -f %{ibdir}/firebird.conf.rpmsave %{_sysconfdir}/firebird/firebird.conf
280 fi
281 if [ -f %{ibdir}/security2.fdb.rpmsave ]; then
282         mv -f %{ibdir}/security2.fdb.rpmsave /var/lib/firebird/security2.fdb
283 fi
284
285 %files
286 %defattr(644,root,root,755)
287 %doc doc/{license,sql.extensions,Firebird_conf.txt,README.user*,WhatsNew,fb2-todo.txt}
288 %dir %{_sysconfdir}/firebird
289 %attr(640,root,firebird) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/firebird/*.conf
290 %attr(755,root,root) %{_bindir}/fb_lock_print
291 %attr(755,root,root) %{_bindir}/g*
292 %attr(755,root,root) %{_bindir}/nbackup
293 %attr(755,root,root) %{_libdir}/libib_util.so
294 %attr(755,root,root) %{ibdir}/UDF
295 %attr(755,root,root) %{ibdir}/bin/*
296 %exclude %{ibdir}/bin/fb_config
297 %{ibdir}/help
298 %dir %attr(770,root,firebird) %{ibdir}/intl
299 %attr(755,root,root) %{ibdir}/intl/fbintl
300 # should it be moved to %{_sysconfdir} and marked as config?
301 %{ibdir}/intl/fbintl.conf
302 %{ibdir}/firebird.msg
303 %dir %attr(770,root,firebird) /var/lib/firebird
304 %attr(660,root,firebird) %config(noreplace) %verify(not md5 mtime size) /var/lib/firebird/security2.fdb
305 %attr(660,root,firebird) %config(noreplace) %verify(not md5 mtime size) /var/log/firebird.log
306
307 %if %{with ss}
308 %attr(754,root,root) /etc/rc.d/init.d/firebird
309 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/firebird
310 %else
311 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/rc-inetd/firebird
312 %endif
313
314 %files dirs
315 %defattr(644,root,root,755)
316 %dir %{ibdir}
317 %dir %{ibdir}/bin
318
319 %files lib
320 %defattr(644,root,root,755)
321 %attr(755,root,root) %{_libdir}/libfbclient.so.*.*.*
322 %attr(755,root,root) %ghost %{_libdir}/libfbclient.so.2
323 %attr(755,root,root) %{_libdir}/libfbembed.so.*.*.*
324 %attr(755,root,root) %ghost %{_libdir}/libfbembed.so.2.1
325
326 # InterBase/old Firebird compatibility symlinks
327 %attr(755,root,root) %{_libdir}/libgds.so.0
328 # needed here - original libgds.so.0 didn't have soname, so some old
329 # (possibly not open-source) apps may be linked with libgds.so
330 %attr(755,root,root) %{_libdir}/libgds.so
331
332 %files devel
333 %defattr(644,root,root,755)
334 %attr(755,root,root) %{_libdir}/libfbclient.so
335 %attr(755,root,root) %{_libdir}/libfbembed.so
336 %attr(755,root,root) %{ibdir}/bin/fb_config
337 %{_includedir}/ib_util.h
338 %{_includedir}/ibase.h
339 %{_includedir}/iberror.h
340 %{_includedir}/perf.h
341 %{_examplesdir}/%{name}-%{version}
342
343 %files static
344 %defattr(644,root,root,755)
345 %{_libdir}/libfbstatic.a
346 # compat link
347 %{_libdir}/libgds.a
348
349 %files doc
350 %defattr(644,root,root,755)
351 %doc docs/*
This page took 0.088077 seconds and 2 git commands to generate.