]> git.pld-linux.org Git - packages/Firebird.git/blob - Firebird.spec
- updated EA and ac version
[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 #
7 # Conditional build:
8 %bcond_with     ss      # Super Server (standalone daemon instead of inetd service)
9 #
10 Summary:        Firebird SQL Database Server and Client tools
11 Summary(de.UTF-8):      Firebird - relationalen Open-Source- Datenbankmanagementsystems
12 Summary(pl.UTF-8):      Firebird - serwer baz danych SQL oraz narzędzia klienckie
13 Name:           Firebird
14 # FirebirdCS/FirebirdSS (Classic Server/Super Server)?
15 Version:        2.1.1.17910
16 Release:        1
17 License:        Interbase Public License 1.0, Initial Developer's Public License 1.0
18 Group:          Applications/Databases
19 Source0:        http://dl.sourceforge.net/firebird/Firebird-%{version}-0.tar.bz2
20 # Source0-md5:  c8bed24245440cb21b9c4fe16aae70bb
21 Source1:        http://www.firebirdsql.org/pdfmanual/Firebird-2.1-QuickStart.pdf
22 # Source1-md5:  676e5b294a04e3cd12b9298a776e19eb
23 # distfiles refuses this, would require some audit to allow '('/')' chars
24 #Source2:       http://www.firebirdsql.org/pdfmanual/Using-Firebird_(wip).pdf
25 ## Source2-md5: 9eb90583c200bdd7292a80ecc1df1178
26 Source3:        http://www.firebirdsql.org/pdfmanual/Firebird-Null-Guide.pdf
27 # Source3-md5:  d1f8ba75fe3bb9eb9d203ce3f82a1a1a
28 Source4:        http://www.firebirdsql.org/pdfmanual/Firebird-Generator-Guide.pdf
29 # Source4-md5:  44e7568ef477072a8ad5f381c3e12a75
30 Source5:        http://www.firebirdsql.org/pdfmanual/MSSQL-to-Firebird.pdf
31 # Source5-md5:  1bd4a168e550910fc899e2aa125d83a3
32 Source6:        http://www.firebirdsql.org/pdfmanual/Firebird-nbackup.pdf
33 # Source6-md5:  7ef8a8b9a899d06bec2a5da0bb5fea0e
34 Source7:        http://www.firebirdsql.org/pdfmanual/Firebird-Utils-WIP.pdf
35 # Source7-md5:  39b9a4f3c9d9e27d985e9277ae163ceb
36 Source8:        http://www.firebirdnews.org/docs/fb2min.pdf
37 # Source8-md5:  ebac312c0afbe97b1850bdc74c553c28
38 Source9:        http://www.firebirdsql.org/doc/contrib/fb_2_0_errorcodes.pdf
39 # Source9-md5:  2acf2ff63c4ba3a1c590989e19bb253e
40 Source100:      firebird.init
41 Source101:      firebird.sysconfig
42 Source102:      firebird.inetd
43 Patch0:         %{name}-chmod.patch
44 Patch1:         %{name}-editline.patch
45 Patch2:         %{name}-va.patch
46 Patch3:         %{name}-morearchs.patch
47 URL:            http://www.firebirdsql.org/
48 BuildRequires:  autoconf >= 2.56
49 BuildRequires:  automake
50 BuildRequires:  bison
51 BuildRequires:  libedit-devel
52 BuildRequires:  libicu-devel
53 BuildRequires:  libstdc++-devel
54 BuildRequires:  libtool
55 BuildRequires:  ncurses-devel
56 BuildRequires:  psmisc >= 22.5-2
57 BuildRequires:  rpmbuild(macros) >= 1.268
58 Requires:       %{name}-lib = %{version}-%{release}
59 %if %{with ss}
60 Requires(post,preun):   /sbin/chkconfig
61 Requires:       rc-scripts
62 %endif
63 # official ports are x86, x86_64, ppc, sparc, arm, mips/mipsel, ia64
64 # alpha is added in morearchs patch
65 # see morearchs patch if you want more
66 ExclusiveArch:  %{ix86} %{x8664} arm ia64 mips mipsel ppc sparc sparcv9 alpha
67 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
68
69 %define         ibdir   %{_libdir}/interbase
70 %define         specflags       -fno-strict-aliasing
71 %define         debugcflags     -O1 -g -Wall -fno-strict-aliasing
72
73 %description
74 Firebird is a powerful, high-performance relational database designed
75 to be embedded into applications on multiple platforms.
76
77 %description -l pl.UTF-8
78 Firebird jest potężnym, wysoko wydajnym systemem relacyjnych baz
79 danych zaprojektowanym do osadzania w aplikacjach na wielu
80 platformach.
81
82 %description -l de.UTF-8
83 Firebird ist der Open-Source-Spin-Off des weiterhin kommerziell von
84 Borland vertriebenen relationalen Datenbankmanagementsystemes
85 InterBase. Die Abspaltung erfolgte im Jahre 2000 als kurz vor Freigabe
86 der Version 6 des kommerziellen Vorgängers Interbase bei Borland
87 ernsthafte Überlegungen im Gange waren, die Weiterentwicklung
88 einzustellen.
89
90 Aus Interbase 6.0 wurde Firebird 1.0, wobei dies als eine
91 Bugfix-Version mit nur wenigen Erweiterungen angesehen werden kann.
92 Eine Erweiterung von Firebird 1.0 ist der 64-Bit File I/O, so dass
93 auch Datenbankdateien über 2GB erzeugt werden können.
94
95 %package lib
96 Summary:        Firebird shared library
97 Summary(pl.UTF-8):      Biblioteka współdzielona Firebird
98 Group:          Libraries
99
100 %description lib
101 Firebird shared library (libgds).
102
103 %description lib -l pl.UTF-8
104 Biblioteka współdzielona Firebird (libgds).
105
106 %package devel
107 Summary:        Header files for Firebird library
108 Summary(pl.UTF-8):      Pliki nagłówkowe biblioteki Firebird
109 Group:          Development/Libraries
110 Requires:       %{name}-lib = %{version}-%{release}
111 Requires:       libstdc++-devel
112
113 %description devel
114 Header files for Firebird library.
115
116 %description devel -l pl.UTF-8
117 Pliki nagłówkowe biblioteki Firebird.
118
119 %package static
120 Summary:        Static Firebird library
121 Summary(pl.UTF-8):      Statyczna biblioteka Firebird
122 Group:          Development/Libraries
123 Requires:       %{name}-devel = %{version}-%{release}
124
125 %description static
126 Static Firebird library (libgds).
127
128 %description static -l pl.UTF-8
129 Statyczna biblioteka Firebird (libgds).
130
131 %package doc
132 Summary:        Extensive InterBase and Firebird documentation
133 Summary(pl.UTF-8):      Obszerna dokumentacja do baz InterBase i Firebird
134 Group:          Documentation
135
136 %description doc
137 Extensive InterBase and Firebird documentation.
138
139 %description doc -l pl.UTF-8
140 Obszerna dokumentacja do baz InterBase i Firebird.
141
142 %prep
143 %setup -q -n Firebird-%{version}-0
144 %patch0 -p1
145 %patch1 -p1
146 %patch2 -p1
147 %patch3 -p1
148
149 # force rebuild
150 rm -f src/dsql/parse.cpp
151
152 mkdir docs
153 cp %{SOURCE1} %{SOURCE3} %{SOURCE4} %{SOURCE5} %{SOURCE6} %{SOURCE7} %{SOURCE8} %{SOURCE9} docs
154
155 %build
156 %{__libtoolize}
157 %{__aclocal}
158 %{__autoconf}
159
160 %configure \
161         --with-editline \
162         --with-system-editline \
163         --with-system-icu \
164         --with-gnu-ld \
165         %{?with_ss:--enable-superserver} \
166         --prefix=%{ibdir} \
167         %{?debug:--enable-debug}
168
169 DARCH=""
170 %ifarch %{x8664}
171 DARCH="-DAMD64"
172 %endif
173 %ifarch sparc sparcv9
174 DARCH="-Dsparc"
175 %endif
176 %ifarch ppc
177 DARCH="-DPPC"
178 %endif
179
180 %{__make} -j1 \
181         CC="%{__cc}" \
182         CXX="%{__cxx}" \
183         PROD_FLAGS="%{rpmcflags} -DNDEBUG -DLINUX -pipe -MMD -fPIC $DARCH" \
184         DEV_FLAGS="%{rpmcflags} -DLINUX -DDEBUG_GDS_ALLOC -pipe -MMD -fPIC -Wall -Wno-switch $DARCH" \
185         LIB_LINK_RPATH_LINE= \
186         LIB_CLIENT_LINK_OPTIONS="-lpthread"
187
188 # fb_lock_mgr is started during build - try to stop it (if /proc is mounted...)
189 fuser -k gen/firebird/bin/fb_lock_mgr 2>/dev/null || :
190
191 %install
192 rm -rf $RPM_BUILD_ROOT
193
194 %{__make} -C src -f ../gen/Makefile.install buildImageDir
195
196 install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig/rc-inetd}
197 install -d $RPM_BUILD_ROOT{%{ibdir},%{_libdir},%{_includedir}} \
198         $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
199
200 install gen/firebird/lib/libfb*.a $RPM_BUILD_ROOT%{_libdir}
201 install gen/firebird/lib/libfbembed.so* $RPM_BUILD_ROOT%{_libdir}
202 cd gen/buildroot/%{ibdir}
203
204 cp -af UDF bin help intl aliases.conf firebird.conf firebird.msg security2.fdb \
205         $RPM_BUILD_ROOT%{ibdir}
206 install include/* $RPM_BUILD_ROOT%{_includedir}
207 cp -df lib/* $RPM_BUILD_ROOT%{_libdir}
208 cp -rf examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
209
210 # or libfbembed?
211 ln -sf libfbclient.so.2 $RPM_BUILD_ROOT%{_libdir}/libgds.so.0
212 ln -sf libfbclient.so.2 $RPM_BUILD_ROOT%{_libdir}/libgds.so
213
214 ln -sf libfbstatic.a $RPM_BUILD_ROOT%{_libdir}/libgds.a
215
216 %if %{with ss}
217 install %{SOURCE100} $RPM_BUILD_ROOT/etc/rc.d/init.d/firebird
218 install %{SOURCE101} $RPM_BUILD_ROOT/etc/sysconfig/firebird
219 %else
220 install %{SOURCE102} $RPM_BUILD_ROOT/etc/sysconfig/rc-inetd/firebird
221 %endif
222
223 %clean
224 rm -rf $RPM_BUILD_ROOT
225
226 %pre
227 %groupadd -g 145 firebird
228 %useradd -u 145 -d %{ibdir} -s /bin/sh -g firebird -c "Firebird Server" firebird
229
230 %if %{with ss}
231 %post
232 /sbin/chkconfig --add firebird
233 %service firebird restart
234
235 %preun
236 if [ "$1" = "0" ]; then
237         %service firebird stop
238         /sbin/chkconfig --del firebird
239 fi
240 %endif
241
242 %postun
243 if [ "$1" = "0" ]; then
244         %userremove firebird
245         %groupremove firebird
246 fi
247
248 %post   lib -p /sbin/ldconfig
249 %postun lib -p /sbin/ldconfig
250
251 %files
252 %defattr(644,root,root,755)
253 %doc doc/{license,sql.extensions,Firebird_conf.txt,README.user*,WhatsNew,fb2-todo.txt}
254 %attr(755,root,root) %{_libdir}/libib_util.so
255 %dir %attr(770,root,firebird) %{ibdir}
256 %attr(755,root,root) %{ibdir}/UDF
257 %attr(755,root,root) %{ibdir}/bin
258 %{ibdir}/help
259 %dir %attr(770,root,firebird) %{ibdir}/intl
260 %attr(755,root,root) %{ibdir}/intl/fbintl
261 # should it be moved to /etc and marked as config?
262 %{ibdir}/intl/fbintl.conf
263 %{ibdir}/firebird.msg
264 # following files should be in /var (*.fdb) and /etc (*.conf)?
265 %attr(660,root,firebird) %config(noreplace) %verify(not md5 mtime size) %{ibdir}/security2.fdb
266 %attr(640,root,firebird) %config(noreplace) %verify(not md5 mtime size) %{ibdir}/aliases.conf
267 %attr(640,root,firebird) %config(noreplace) %verify(not md5 mtime size) %{ibdir}/firebird.conf
268 %if %{with ss}
269 %attr(754,root,root) /etc/rc.d/init.d/firebird
270 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/firebird
271 %else
272 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/rc-inetd/firebird
273 %endif
274
275 %files lib
276 %defattr(644,root,root,755)
277 %attr(755,root,root) %{_libdir}/libfbclient.so.*.*.*
278 %attr(755,root,root) %ghost %{_libdir}/libfbclient.so.2
279 %attr(755,root,root) %{_libdir}/libfbembed.so.*.*.*
280 %attr(755,root,root) %ghost %{_libdir}/libfbembed.so.2.1
281
282 # InterBase/old Firebird compatibility symlinks
283 %attr(755,root,root) %{_libdir}/libgds.so.0
284 # needed here - original libgds.so.0 didn't have soname, so some old
285 # (possibly not open-source) apps may be linked with libgds.so
286 %attr(755,root,root) %{_libdir}/libgds.so
287
288 %files devel
289 %defattr(644,root,root,755)
290 %attr(755,root,root) %{_libdir}/libfbclient.so
291 %attr(755,root,root) %{_libdir}/libfbembed.so
292 %{_includedir}/ib_util.h
293 %{_includedir}/ibase.h
294 %{_includedir}/iberror.h
295 %{_includedir}/perf.h
296 %{_examplesdir}/%{name}-%{version}
297
298 %files static
299 %defattr(644,root,root,755)
300 %{_libdir}/libfbstatic.a
301 # compat link
302 %{_libdir}/libgds.a
303
304 %files doc
305 %defattr(644,root,root,755)
306 %doc docs/*
This page took 0.045185 seconds and 3 git commands to generate.