]>
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) |
5c17f9d1 JB |
6 | # |
7 | # Conditional build: | |
8 | %bcond_with ss # Super Server (standalone daemon instead of inetd service) | |
9 | # | |
9fa49beb | 10 | Summary: Firebird SQL Database Server and Client tools |
dc230623 ER |
11 | Summary(de.UTF-8): Firebird - relationalen Open-Source- Datenbankmanagementsystems |
12 | Summary(pl.UTF-8): Firebird - serwer baz danych SQL oraz narzędzia klienckie | |
9fa49beb JB |
13 | Name: Firebird |
14 | # FirebirdCS/FirebirdSS (Classic Server/Super Server)? | |
6302c6a3 | 15 | Version: 2.1.1.17910 |
34cec9e1 | 16 | Release: 1 |
6302c6a3 | 17 | License: Interbase Public License 1.0, Initial Developer's Public License 1.0 |
9fa49beb | 18 | Group: Applications/Databases |
34cec9e1 | 19 | Source0: http://dl.sourceforge.net/firebird/Firebird-%{version}-0.tar.bz2 |
6302c6a3 JB |
20 | # Source0-md5: c8bed24245440cb21b9c4fe16aae70bb |
21 | Source1: http://www.firebirdsql.org/pdfmanual/Firebird-2.1-QuickStart.pdf | |
d82d8ed3 | 22 | # Source1-md5: 676e5b294a04e3cd12b9298a776e19eb |
6302c6a3 JB |
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 | |
afbf0830 AM |
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 | |
d82d8ed3 | 33 | # Source6-md5: 7ef8a8b9a899d06bec2a5da0bb5fea0e |
afbf0830 AM |
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 | |
3e30a275 | 43 | Patch0: %{name}-chmod.patch |
e3bc302b | 44 | Patch1: %{name}-editline.patch |
3657cd88 JB |
45 | Patch2: %{name}-va.patch |
46 | Patch3: %{name}-morearchs.patch | |
40c5ec59 | 47 | URL: http://www.firebirdsql.org/ |
19988721 | 48 | BuildRequires: autoconf >= 2.56 |
41daf6c3 | 49 | BuildRequires: automake |
c7da80e5 | 50 | BuildRequires: bison |
6302c6a3 | 51 | BuildRequires: libedit-devel |
6246a616 | 52 | BuildRequires: libicu-devel |
3e30a275 | 53 | BuildRequires: libstdc++-devel |
f32247bb | 54 | BuildRequires: libtool |
3e30a275 | 55 | BuildRequires: ncurses-devel |
6f50770c | 56 | BuildRequires: psmisc >= 22.5-2 |
f32247bb | 57 | BuildRequires: rpmbuild(macros) >= 1.268 |
ff19b114 | 58 | Requires: %{name}-lib = %{version}-%{release} |
bf15fb73 ER |
59 | %if %{with ss} |
60 | Requires(post,preun): /sbin/chkconfig | |
61 | Requires: rc-scripts | |
62 | %endif | |
19988721 JB |
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 | |
9fa49beb JB |
67 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
68 | ||
69 | %define ibdir %{_libdir}/interbase | |
3e30a275 JB |
70 | %define specflags -fno-strict-aliasing |
71 | %define debugcflags -O1 -g -Wall -fno-strict-aliasing | |
9fa49beb JB |
72 | |
73 | %description | |
74 | Firebird is a powerful, high-performance relational database designed | |
75 | to be embedded into applications on multiple platforms. | |
76 | ||
bc5f1efa JR |
77 | %description -l pl.UTF-8 |
78 | Firebird jest potężnym, wysoko wydajnym systemem relacyjnych baz | |
9fa49beb JB |
79 | danych zaprojektowanym do osadzania w aplikacjach na wielu |
80 | platformach. | |
81 | ||
bc5f1efa | 82 | %description -l de.UTF-8 |
d88756a7 | 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 | |
bc5f1efa JR |
86 | der Version 6 des kommerziellen Vorgängers Interbase bei Borland |
87 | ernsthafte Überlegungen im Gange waren, die Weiterentwicklung | |
d88756a7 | 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 | |
bc5f1efa | 93 | auch Datenbankdateien über 2GB erzeugt werden können. |
d88756a7 | 94 | |
9fa49beb JB |
95 | %package lib |
96 | Summary: Firebird shared library | |
dc230623 | 97 | Summary(pl.UTF-8): Biblioteka współdzielona Firebird |
9fa49beb JB |
98 | Group: Libraries |
99 | ||
100 | %description lib | |
101 | Firebird shared library (libgds). | |
102 | ||
bc5f1efa JR |
103 | %description lib -l pl.UTF-8 |
104 | Biblioteka współdzielona Firebird (libgds). | |
9fa49beb JB |
105 | |
106 | %package devel | |
107 | Summary: Header files for Firebird library | |
dc230623 | 108 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki Firebird |
9fa49beb | 109 | Group: Development/Libraries |
ff19b114 | 110 | Requires: %{name}-lib = %{version}-%{release} |
3e30a275 | 111 | Requires: libstdc++-devel |
9fa49beb JB |
112 | |
113 | %description devel | |
114 | Header files for Firebird library. | |
115 | ||
bc5f1efa JR |
116 | %description devel -l pl.UTF-8 |
117 | Pliki nagłówkowe biblioteki Firebird. | |
9fa49beb JB |
118 | |
119 | %package static | |
120 | Summary: Static Firebird library | |
dc230623 | 121 | Summary(pl.UTF-8): Statyczna biblioteka Firebird |
9fa49beb | 122 | Group: Development/Libraries |
ff19b114 | 123 | Requires: %{name}-devel = %{version}-%{release} |
9fa49beb JB |
124 | |
125 | %description static | |
126 | Static Firebird library (libgds). | |
127 | ||
bc5f1efa | 128 | %description static -l pl.UTF-8 |
9fa49beb JB |
129 | Statyczna biblioteka Firebird (libgds). |
130 | ||
6d06b555 JB |
131 | %package doc |
132 | Summary: Extensive InterBase and Firebird documentation | |
dc230623 | 133 | Summary(pl.UTF-8): Obszerna dokumentacja do baz InterBase i Firebird |
6d06b555 JB |
134 | Group: Documentation |
135 | ||
136 | %description doc | |
137 | Extensive InterBase and Firebird documentation. | |
138 | ||
bc5f1efa | 139 | %description doc -l pl.UTF-8 |
6d06b555 JB |
140 | Obszerna dokumentacja do baz InterBase i Firebird. |
141 | ||
9fa49beb | 142 | %prep |
cc466a1c | 143 | %setup -q -n Firebird-%{version}-0 |
9fa49beb | 144 | %patch0 -p1 |
6302c6a3 JB |
145 | %patch1 -p1 |
146 | %patch2 -p1 | |
147 | %patch3 -p1 | |
9fa49beb | 148 | |
41ed72e5 AM |
149 | # force rebuild |
150 | rm -f src/dsql/parse.cpp | |
151 | ||
6302c6a3 JB |
152 | mkdir docs |
153 | cp %{SOURCE1} %{SOURCE3} %{SOURCE4} %{SOURCE5} %{SOURCE6} %{SOURCE7} %{SOURCE8} %{SOURCE9} docs | |
154 | ||
9fa49beb | 155 | %build |
3e30a275 JB |
156 | %{__libtoolize} |
157 | %{__aclocal} | |
158 | %{__autoconf} | |
9fa49beb | 159 | |
3e30a275 | 160 | %configure \ |
afbf0830 AM |
161 | --with-editline \ |
162 | --with-system-editline \ | |
163 | --with-system-icu \ | |
164 | --with-gnu-ld \ | |
98517597 | 165 | %{?with_ss:--enable-superserver} \ |
3e30a275 JB |
166 | --prefix=%{ibdir} \ |
167 | %{?debug:--enable-debug} | |
9fa49beb | 168 | |
490cb53f | 169 | DARCH="" |
94aa4dfa | 170 | %ifarch %{x8664} |
57758f31 | 171 | DARCH="-DAMD64" |
490cb53f | 172 | %endif |
57758f31 JB |
173 | %ifarch sparc sparcv9 |
174 | DARCH="-Dsparc" | |
57758f31 | 175 | %endif |
490cb53f AM |
176 | %ifarch ppc |
177 | DARCH="-DPPC" | |
57758f31 | 178 | %endif |
59aa3c60 | 179 | |
3e30a275 | 180 | %{__make} -j1 \ |
cc2f8e3e AM |
181 | CC="%{__cc}" \ |
182 | CXX="%{__cxx}" \ | |
57758f31 JB |
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" \ | |
3e30a275 JB |
185 | LIB_LINK_RPATH_LINE= \ |
186 | LIB_CLIENT_LINK_OPTIONS="-lpthread" | |
9fa49beb | 187 | |
85bfee62 | 188 | # fb_lock_mgr is started during build - try to stop it (if /proc is mounted...) |
6f50770c | 189 | fuser -k gen/firebird/bin/fb_lock_mgr 2>/dev/null || : |
85bfee62 | 190 | |
9fa49beb JB |
191 | %install |
192 | rm -rf $RPM_BUILD_ROOT | |
9fa49beb | 193 | |
3e30a275 | 194 | %{__make} -C src -f ../gen/Makefile.install buildImageDir |
9fa49beb | 195 | |
98517597 | 196 | install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig/rc-inetd} |
9fa49beb JB |
197 | install -d $RPM_BUILD_ROOT{%{ibdir},%{_libdir},%{_includedir}} \ |
198 | $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} | |
98517597 | 199 | |
3e30a275 | 200 | install gen/firebird/lib/libfb*.a $RPM_BUILD_ROOT%{_libdir} |
59aa3c60 | 201 | install gen/firebird/lib/libfbembed.so* $RPM_BUILD_ROOT%{_libdir} |
3e30a275 JB |
202 | cd gen/buildroot/%{ibdir} |
203 | ||
c39c9a7a | 204 | cp -af UDF bin help intl aliases.conf firebird.conf firebird.msg security2.fdb \ |
9fa49beb JB |
205 | $RPM_BUILD_ROOT%{ibdir} |
206 | install include/* $RPM_BUILD_ROOT%{_includedir} | |
3e30a275 | 207 | cp -df lib/* $RPM_BUILD_ROOT%{_libdir} |
6302c6a3 | 208 | cp -rf examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} |
9fa49beb | 209 | |
3e30a275 | 210 | # or libfbembed? |
6302c6a3 JB |
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 | |
3e30a275 JB |
213 | |
214 | ln -sf libfbstatic.a $RPM_BUILD_ROOT%{_libdir}/libgds.a | |
215 | ||
cf9b601b | 216 | %if %{with ss} |
afbf0830 AM |
217 | install %{SOURCE100} $RPM_BUILD_ROOT/etc/rc.d/init.d/firebird |
218 | install %{SOURCE101} $RPM_BUILD_ROOT/etc/sysconfig/firebird | |
cf9b601b | 219 | %else |
afbf0830 | 220 | install %{SOURCE102} $RPM_BUILD_ROOT/etc/sysconfig/rc-inetd/firebird |
cf9b601b | 221 | %endif |
59aa3c60 | 222 | |
9fa49beb JB |
223 | %clean |
224 | rm -rf $RPM_BUILD_ROOT | |
225 | ||
85eb4f4f | 226 | %pre |
6ad2f94a ER |
227 | %groupadd -g 145 firebird |
228 | %useradd -u 145 -d %{ibdir} -s /bin/sh -g firebird -c "Firebird Server" firebird | |
85eb4f4f | 229 | |
98517597 | 230 | %if %{with ss} |
85eb4f4f AM |
231 | %post |
232 | /sbin/chkconfig --add firebird | |
f32247bb | 233 | %service firebird restart |
85eb4f4f AM |
234 | |
235 | %preun | |
236 | if [ "$1" = "0" ]; then | |
f32247bb | 237 | %service firebird stop |
6ad2f94a | 238 | /sbin/chkconfig --del firebird |
85eb4f4f | 239 | fi |
98517597 | 240 | %endif |
85eb4f4f AM |
241 | |
242 | %postun | |
243 | if [ "$1" = "0" ]; then | |
6ad2f94a ER |
244 | %userremove firebird |
245 | %groupremove firebird | |
85eb4f4f AM |
246 | fi |
247 | ||
3e30a275 JB |
248 | %post lib -p /sbin/ldconfig |
249 | %postun lib -p /sbin/ldconfig | |
250 | ||
9fa49beb JB |
251 | %files |
252 | %defattr(644,root,root,755) | |
6302c6a3 | 253 | %doc doc/{license,sql.extensions,Firebird_conf.txt,README.user*,WhatsNew,fb2-todo.txt} |
9fa49beb | 254 | %attr(755,root,root) %{_libdir}/libib_util.so |
13aa50ef | 255 | %dir %attr(770,root,firebird) %{ibdir} |
9fa49beb JB |
256 | %attr(755,root,root) %{ibdir}/UDF |
257 | %attr(755,root,root) %{ibdir}/bin | |
258 | %{ibdir}/help | |
13aa50ef | 259 | %dir %attr(770,root,firebird) %{ibdir}/intl |
e3bc302b | 260 | %attr(755,root,root) %{ibdir}/intl/fbintl |
6302c6a3 JB |
261 | # should it be moved to /etc and marked as config? |
262 | %{ibdir}/intl/fbintl.conf | |
3e30a275 JB |
263 | %{ibdir}/firebird.msg |
264 | # following files should be in /var (*.fdb) and /etc (*.conf)? | |
c39c9a7a | 265 | %attr(660,root,firebird) %config(noreplace) %verify(not md5 mtime size) %{ibdir}/security2.fdb |
13aa50ef MWP |
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 | |
98517597 | 268 | %if %{with ss} |
85eb4f4f AM |
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 | |
98517597 | 271 | %else |
d88756a7 | 272 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/rc-inetd/firebird |
98517597 | 273 | %endif |
9fa49beb JB |
274 | |
275 | %files lib | |
276 | %defattr(644,root,root,755) | |
3e30a275 | 277 | %attr(755,root,root) %{_libdir}/libfbclient.so.*.*.* |
6302c6a3 | 278 | %attr(755,root,root) %ghost %{_libdir}/libfbclient.so.2 |
3e30a275 | 279 | %attr(755,root,root) %{_libdir}/libfbembed.so.*.*.* |
6302c6a3 | 280 | %attr(755,root,root) %ghost %{_libdir}/libfbembed.so.2.1 |
0c3071c2 | 281 | |
3e30a275 JB |
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 | |
9fa49beb JB |
287 | |
288 | %files devel | |
289 | %defattr(644,root,root,755) | |
3e30a275 JB |
290 | %attr(755,root,root) %{_libdir}/libfbclient.so |
291 | %attr(755,root,root) %{_libdir}/libfbembed.so | |
6302c6a3 JB |
292 | %{_includedir}/ib_util.h |
293 | %{_includedir}/ibase.h | |
294 | %{_includedir}/iberror.h | |
295 | %{_includedir}/perf.h | |
9fa49beb JB |
296 | %{_examplesdir}/%{name}-%{version} |
297 | ||
298 | %files static | |
299 | %defattr(644,root,root,755) | |
3e30a275 JB |
300 | %{_libdir}/libfbstatic.a |
301 | # compat link | |
9fa49beb | 302 | %{_libdir}/libgds.a |
6d06b555 JB |
303 | |
304 | %files doc | |
305 | %defattr(644,root,root,755) | |
306 | %doc docs/* |