]>
Commit | Line | Data |
---|---|---|
98517597 AM |
1 | # TODO: |
2 | # - kill unaligned accesses (create_db,gpre_current,gbak_static,isql_static) on alpha | |
3657cd88 | 3 | # - create classic server/super server subpackages and drop bcond |
98517597 AM |
4 | # (see firebird2 on debian how to do it) |
5 | %bcond_with ss # Super Server | |
9fa49beb | 6 | Summary: Firebird SQL Database Server and Client tools |
dc230623 ER |
7 | Summary(de.UTF-8): Firebird - relationalen Open-Source- Datenbankmanagementsystems |
8 | Summary(pl.UTF-8): Firebird - serwer baz danych SQL oraz narzędzia klienckie | |
9fa49beb JB |
9 | Name: Firebird |
10 | # FirebirdCS/FirebirdSS (Classic Server/Super Server)? | |
27781b8b JB |
11 | Version: 1.5.4.4910 |
12 | Release: 1 | |
9fa49beb JB |
13 | License: Interbase Public License 1.0 |
14 | Group: Applications/Databases | |
3e30a275 | 15 | Source0: http://dl.sourceforge.net/firebird/firebird-%{version}.tar.bz2 |
27781b8b | 16 | # Source0-md5: 6655190f760217845623a75001b6ddd4 |
e3bc302b JB |
17 | Source1: http://www.ibphoenix.com/downloads/60All.zip |
18 | # Source1-md5: f86a132012361cd4ae88563105741a4c | |
19 | Source2: http://www.ibphoenix.com/downloads/ib_4_0_docs.tar.gz | |
20 | # Source2-md5: f4176d5dec952ee774bb8ee74c1f715d | |
21 | Source3: http://www.ibphoenix.com/downloads/isc_docs.zip | |
22 | # Source3-md5: 66eef71c188215d10988788282c014a7 | |
98517597 AM |
23 | Source4: firebird.init |
24 | Source5: firebird.sysconfig | |
25 | Source6: firebird.inetd | |
3e30a275 | 26 | Patch0: %{name}-chmod.patch |
e3bc302b | 27 | Patch1: %{name}-editline.patch |
3657cd88 JB |
28 | Patch2: %{name}-va.patch |
29 | Patch3: %{name}-morearchs.patch | |
30 | Patch4: %{name}-gcc4.patch | |
94571817 AM |
31 | Patch5: %{name}-fix-os-detection.dpatch |
32 | Patch6: %{name}-fix-pthreads-detect.dpatch | |
33 | Patch7: %{name}-link-with-g++.dpatch | |
34 | Patch8: %{name}-no-custom-errno-and-sys_XXerrXX.dpatch | |
35 | Patch9: %{name}-opt-bypass-redundant-sort.dpatch | |
36 | Patch10: %{name}-security-remote-preauth-crash.dpatch | |
37 | Patch11: %{name}-separate-file-and-sem-perms.dpatch | |
490cb53f | 38 | Patch12: %{name}-ppc.patch |
40c5ec59 | 39 | URL: http://www.firebirdsql.org/ |
41daf6c3 | 40 | BuildRequires: autoconf |
41 | BuildRequires: automake | |
c7da80e5 | 42 | BuildRequires: bison |
3e30a275 | 43 | BuildRequires: libstdc++-devel |
f32247bb | 44 | BuildRequires: libtool |
3e30a275 | 45 | BuildRequires: ncurses-devel |
f32247bb | 46 | BuildRequires: rpmbuild(macros) >= 1.268 |
6d06b555 | 47 | BuildRequires: unzip |
ff19b114 | 48 | Requires: %{name}-lib = %{version}-%{release} |
bf15fb73 ER |
49 | %if %{with ss} |
50 | Requires(post,preun): /sbin/chkconfig | |
51 | Requires: rc-scripts | |
52 | %endif | |
94aa4dfa | 53 | # official ports are x86, sparc and x86_64 |
9edd8ca8 | 54 | # alpha and ppc added in morearchs patch |
57758f31 | 55 | # see morearchs patch if you want to add support for more archs |
94aa4dfa | 56 | ExclusiveArch: %{ix86} %{x8664} sparc sparcv9 alpha ppc |
9fa49beb JB |
57 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
58 | ||
59 | %define ibdir %{_libdir}/interbase | |
3e30a275 JB |
60 | %define specflags -fno-strict-aliasing |
61 | %define debugcflags -O1 -g -Wall -fno-strict-aliasing | |
9fa49beb JB |
62 | |
63 | %description | |
64 | Firebird is a powerful, high-performance relational database designed | |
65 | to be embedded into applications on multiple platforms. | |
66 | ||
bc5f1efa JR |
67 | %description -l pl.UTF-8 |
68 | Firebird jest potężnym, wysoko wydajnym systemem relacyjnych baz | |
9fa49beb JB |
69 | danych zaprojektowanym do osadzania w aplikacjach na wielu |
70 | platformach. | |
71 | ||
bc5f1efa | 72 | %description -l de.UTF-8 |
d88756a7 | 73 | Firebird ist der Open-Source-Spin-Off des weiterhin kommerziell von |
74 | Borland vertriebenen relationalen Datenbankmanagementsystemes | |
75 | InterBase. Die Abspaltung erfolgte im Jahre 2000 als kurz vor Freigabe | |
bc5f1efa JR |
76 | der Version 6 des kommerziellen Vorgängers Interbase bei Borland |
77 | ernsthafte Überlegungen im Gange waren, die Weiterentwicklung | |
d88756a7 | 78 | einzustellen. |
79 | ||
80 | Aus Interbase 6.0 wurde Firebird 1.0, wobei dies als eine | |
81 | Bugfix-Version mit nur wenigen Erweiterungen angesehen werden kann. | |
82 | Eine Erweiterung von Firebird 1.0 ist der 64-Bit File I/O, so dass | |
bc5f1efa | 83 | auch Datenbankdateien über 2GB erzeugt werden können. |
d88756a7 | 84 | |
9fa49beb JB |
85 | %package lib |
86 | Summary: Firebird shared library | |
dc230623 | 87 | Summary(pl.UTF-8): Biblioteka współdzielona Firebird |
9fa49beb JB |
88 | Group: Libraries |
89 | ||
90 | %description lib | |
91 | Firebird shared library (libgds). | |
92 | ||
bc5f1efa JR |
93 | %description lib -l pl.UTF-8 |
94 | Biblioteka współdzielona Firebird (libgds). | |
9fa49beb JB |
95 | |
96 | %package devel | |
97 | Summary: Header files for Firebird library | |
dc230623 | 98 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki Firebird |
9fa49beb | 99 | Group: Development/Libraries |
ff19b114 | 100 | Requires: %{name}-lib = %{version}-%{release} |
3e30a275 | 101 | Requires: libstdc++-devel |
9fa49beb JB |
102 | |
103 | %description devel | |
104 | Header files for Firebird library. | |
105 | ||
bc5f1efa JR |
106 | %description devel -l pl.UTF-8 |
107 | Pliki nagłówkowe biblioteki Firebird. | |
9fa49beb JB |
108 | |
109 | %package static | |
110 | Summary: Static Firebird library | |
dc230623 | 111 | Summary(pl.UTF-8): Statyczna biblioteka Firebird |
9fa49beb | 112 | Group: Development/Libraries |
ff19b114 | 113 | Requires: %{name}-devel = %{version}-%{release} |
9fa49beb JB |
114 | |
115 | %description static | |
116 | Static Firebird library (libgds). | |
117 | ||
bc5f1efa | 118 | %description static -l pl.UTF-8 |
9fa49beb JB |
119 | Statyczna biblioteka Firebird (libgds). |
120 | ||
6d06b555 JB |
121 | %package doc |
122 | Summary: Extensive InterBase and Firebird documentation | |
dc230623 | 123 | Summary(pl.UTF-8): Obszerna dokumentacja do baz InterBase i Firebird |
6d06b555 JB |
124 | Group: Documentation |
125 | ||
126 | %description doc | |
127 | Extensive InterBase and Firebird documentation. | |
128 | ||
bc5f1efa | 129 | %description doc -l pl.UTF-8 |
6d06b555 JB |
130 | Obszerna dokumentacja do baz InterBase i Firebird. |
131 | ||
9fa49beb | 132 | %prep |
3e30a275 | 133 | %setup -q -n firebird-%{version} |
9fa49beb | 134 | %patch0 -p1 |
51f5552e | 135 | %patch1 -p1 |
ff19b114 JB |
136 | %patch2 -p1 |
137 | %patch3 -p1 | |
138 | %patch4 -p1 | |
94571817 AM |
139 | %patch5 -p1 |
140 | %patch6 -p1 | |
141 | %patch7 -p1 | |
142 | %patch8 -p1 | |
143 | %patch9 -p1 | |
144 | %patch10 -p1 | |
145 | %patch11 -p1 | |
490cb53f | 146 | %patch12 -p1 |
6d06b555 | 147 | install -d docs/{IB3.0,IB4.0,IB6.0} |
e3bc302b JB |
148 | unzip -q %{SOURCE1} -d docs/IB6.0 |
149 | tar xzf %{SOURCE2} -C docs/IB4.0 | |
150 | unzip -q %{SOURCE3} -d docs/IB3.0 | |
6d06b555 JB |
151 | # standardize extension, also avoids gzipping by compress-doc |
152 | mv -f docs/IB6.0/LANGREF.{PDF,pdf} | |
9fa49beb | 153 | |
41ed72e5 AM |
154 | # force rebuild |
155 | rm -f src/dsql/parse.cpp | |
156 | ||
9fa49beb | 157 | %build |
e3bc302b JB |
158 | cd src/extern/editline |
159 | cp -f /usr/share/automake/config.* . | |
160 | %{__autoconf} | |
161 | cd ../../.. | |
3e30a275 JB |
162 | %{__libtoolize} |
163 | %{__aclocal} | |
164 | %{__autoconf} | |
9fa49beb | 165 | |
3e30a275 | 166 | %configure \ |
98517597 | 167 | %{?with_ss:--enable-superserver} \ |
3e30a275 JB |
168 | --prefix=%{ibdir} \ |
169 | %{?debug:--enable-debug} | |
9fa49beb | 170 | |
e3bc302b JB |
171 | # OPTFLAGS for editline |
172 | export OPTFLAGS="%{rpmcflags}" | |
490cb53f | 173 | DARCH="" |
94aa4dfa | 174 | %ifarch %{x8664} |
57758f31 | 175 | DARCH="-DAMD64" |
490cb53f | 176 | %endif |
57758f31 JB |
177 | %ifarch sparc sparcv9 |
178 | DARCH="-Dsparc" | |
57758f31 | 179 | %endif |
490cb53f AM |
180 | %ifarch ppc |
181 | DARCH="-DPPC" | |
57758f31 | 182 | %endif |
59aa3c60 | 183 | |
3e30a275 | 184 | %{__make} -j1 \ |
cc2f8e3e AM |
185 | CC="%{__cc}" \ |
186 | CXX="%{__cxx}" \ | |
57758f31 JB |
187 | PROD_FLAGS="%{rpmcflags} -DNDEBUG -DLINUX -pipe -MMD -fPIC $DARCH" \ |
188 | DEV_FLAGS="%{rpmcflags} -DLINUX -DDEBUG_GDS_ALLOC -pipe -MMD -fPIC -Wall -Wno-switch $DARCH" \ | |
3e30a275 JB |
189 | LIB_LINK_RPATH_LINE= \ |
190 | LIB_CLIENT_LINK_OPTIONS="-lpthread" | |
9fa49beb | 191 | |
59aa3c60 AG |
192 | # my name is hack. dirty hack. |
193 | # why isn't that build in previous make call? | |
194 | %{__make} -C src -f ../gen/Makefile.libfbembed libfbembed \ | |
195 | CC="%{__cc}" \ | |
196 | CXX="%{__cxx}" \ | |
197 | PROD_FLAGS="%{rpmcflags} -DNDEBUG -DLINUX -pipe -MMD -fPIC $DARCH" \ | |
198 | DEV_FLAGS="%{rpmcflags} -DLINUX -DDEBUG_GDS_ALLOC -pipe -MMD -fPIC -Wall -Wno-switch $DARCH" \ | |
199 | LIB_LINK_RPATH_LINE= \ | |
200 | LIB_CLIENT_LINK_OPTIONS="-lpthread" | |
201 | ||
85bfee62 JB |
202 | # fb_lock_mgr is started during build - try to stop it (if /proc is mounted...) |
203 | /sbin/fuser -k gen/firebird/bin/fb_lock_mgr 2>/dev/null || : | |
204 | ||
9fa49beb JB |
205 | %install |
206 | rm -rf $RPM_BUILD_ROOT | |
9fa49beb | 207 | |
3e30a275 | 208 | %{__make} -C src -f ../gen/Makefile.install buildImageDir |
9fa49beb | 209 | |
98517597 | 210 | install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig/rc-inetd} |
9fa49beb JB |
211 | install -d $RPM_BUILD_ROOT{%{ibdir},%{_libdir},%{_includedir}} \ |
212 | $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} | |
98517597 | 213 | |
3e30a275 | 214 | install gen/firebird/lib/libfb*.a $RPM_BUILD_ROOT%{_libdir} |
59aa3c60 | 215 | install gen/firebird/lib/libfbembed.so* $RPM_BUILD_ROOT%{_libdir} |
3e30a275 JB |
216 | cd gen/buildroot/%{ibdir} |
217 | ||
218 | cp -af UDF bin help intl aliases.conf firebird.conf firebird.msg security.fdb \ | |
9fa49beb JB |
219 | $RPM_BUILD_ROOT%{ibdir} |
220 | install include/* $RPM_BUILD_ROOT%{_includedir} | |
3e30a275 | 221 | cp -df lib/* $RPM_BUILD_ROOT%{_libdir} |
9fa49beb JB |
222 | install examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} |
223 | ||
3e30a275 | 224 | # or libfbembed? |
63943f48 | 225 | ln -sf libfbclient.so.1 $RPM_BUILD_ROOT%{_libdir}/libgds.so.0 |
3e30a275 JB |
226 | ln -sf libfbclient.so.1 $RPM_BUILD_ROOT%{_libdir}/libgds.so |
227 | ||
228 | ln -sf libfbstatic.a $RPM_BUILD_ROOT%{_libdir}/libgds.a | |
229 | ||
98517597 AM |
230 | install %{SOURCE4} $RPM_BUILD_ROOT/etc/rc.d/init.d/firebird |
231 | install %{SOURCE5} $RPM_BUILD_ROOT/etc/sysconfig/firebird | |
232 | install %{SOURCE6} $RPM_BUILD_ROOT/etc/sysconfig/rc-inetd/firebird | |
59aa3c60 | 233 | |
9fa49beb JB |
234 | %clean |
235 | rm -rf $RPM_BUILD_ROOT | |
236 | ||
85eb4f4f | 237 | %pre |
6ad2f94a ER |
238 | %groupadd -g 145 firebird |
239 | %useradd -u 145 -d %{ibdir} -s /bin/sh -g firebird -c "Firebird Server" firebird | |
85eb4f4f | 240 | |
98517597 | 241 | %if %{with ss} |
85eb4f4f AM |
242 | %post |
243 | /sbin/chkconfig --add firebird | |
f32247bb | 244 | %service firebird restart |
85eb4f4f AM |
245 | |
246 | %preun | |
247 | if [ "$1" = "0" ]; then | |
f32247bb | 248 | %service firebird stop |
6ad2f94a | 249 | /sbin/chkconfig --del firebird |
85eb4f4f | 250 | fi |
98517597 | 251 | %endif |
85eb4f4f AM |
252 | |
253 | %postun | |
254 | if [ "$1" = "0" ]; then | |
6ad2f94a ER |
255 | %userremove firebird |
256 | %groupremove firebird | |
85eb4f4f AM |
257 | fi |
258 | ||
3e30a275 JB |
259 | %post lib -p /sbin/ldconfig |
260 | %postun lib -p /sbin/ldconfig | |
261 | ||
9fa49beb JB |
262 | %files |
263 | %defattr(644,root,root,755) | |
3e30a275 | 264 | %doc doc/{sql.extensions,Firebird_conf.txt,README.user*,WhatsNew,fb2-todo.txt} |
9fa49beb | 265 | %attr(755,root,root) %{_libdir}/libib_util.so |
13aa50ef | 266 | %dir %attr(770,root,firebird) %{ibdir} |
9fa49beb JB |
267 | %attr(755,root,root) %{ibdir}/UDF |
268 | %attr(755,root,root) %{ibdir}/bin | |
269 | %{ibdir}/help | |
13aa50ef | 270 | %dir %attr(770,root,firebird) %{ibdir}/intl |
e3bc302b | 271 | %attr(755,root,root) %{ibdir}/intl/fbintl |
3e30a275 JB |
272 | %{ibdir}/firebird.msg |
273 | # following files should be in /var (*.fdb) and /etc (*.conf)? | |
13aa50ef MWP |
274 | %attr(660,root,firebird) %config(noreplace) %verify(not md5 mtime size) %{ibdir}/security.fdb |
275 | %attr(640,root,firebird) %config(noreplace) %verify(not md5 mtime size) %{ibdir}/aliases.conf | |
276 | %attr(640,root,firebird) %config(noreplace) %verify(not md5 mtime size) %{ibdir}/firebird.conf | |
98517597 | 277 | %if %{with ss} |
85eb4f4f AM |
278 | %attr(754,root,root) /etc/rc.d/init.d/firebird |
279 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/firebird | |
98517597 | 280 | %else |
d88756a7 | 281 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/rc-inetd/firebird |
98517597 | 282 | %endif |
9fa49beb JB |
283 | |
284 | %files lib | |
285 | %defattr(644,root,root,755) | |
3e30a275 | 286 | %attr(755,root,root) %{_libdir}/libfbclient.so.*.*.* |
557aa31b | 287 | %attr(755,root,root) %ghost %{_libdir}/libfbclient.so.[0-9] |
3e30a275 | 288 | %attr(755,root,root) %{_libdir}/libfbembed.so.*.*.* |
557aa31b | 289 | %attr(755,root,root) %ghost %{_libdir}/libfbembed.so.[0-9] |
0c3071c2 | 290 | |
3e30a275 JB |
291 | # InterBase/old Firebird compatibility symlinks |
292 | %attr(755,root,root) %{_libdir}/libgds.so.0 | |
293 | # needed here - original libgds.so.0 didn't have soname, so some old | |
294 | # (possibly not open-source) apps may be linked with libgds.so | |
295 | %attr(755,root,root) %{_libdir}/libgds.so | |
9fa49beb JB |
296 | |
297 | %files devel | |
298 | %defattr(644,root,root,755) | |
3e30a275 JB |
299 | %attr(755,root,root) %{_libdir}/libfbclient.so |
300 | %attr(755,root,root) %{_libdir}/libfbembed.so | |
301 | %{_includedir}/*.h | |
9fa49beb JB |
302 | %{_examplesdir}/%{name}-%{version} |
303 | ||
304 | %files static | |
305 | %defattr(644,root,root,755) | |
3e30a275 JB |
306 | %{_libdir}/libfbcommon.a |
307 | %{_libdir}/libfbstatic.a | |
308 | # compat link | |
9fa49beb | 309 | %{_libdir}/libgds.a |
6d06b555 JB |
310 | |
311 | %files doc | |
312 | %defattr(644,root,root,755) | |
313 | %doc docs/* |