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