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