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