]> git.pld-linux.org Git - packages/Firebird.git/blob - Firebird.spec
- rel 6
[packages/Firebird.git] / Firebird.spec
1 # TODO:
2 # - kill unaligned accesses (create_db,gpre_current,gbak_static,isql_static) on alpha
3 # - create classic server/super server subpackages and drop bcond
4 #   (see firebird2 on debian how to do it)
5 %bcond_with     ss      # Super Server
6 Summary:        Firebird SQL Database Server and Client tools
7 Summary(de):    Firebird - relationalen Open-Source- Datenbankmanagementsystems
8 Summary(pl):    Firebird - serwer baz danych SQL oraz narzêdzia klienckie
9 Name:           Firebird
10 # FirebirdCS/FirebirdSS (Classic Server/Super Server)?
11 Version:        1.5.3.4870
12 Release:        6
13 License:        Interbase Public License 1.0
14 Group:          Applications/Databases
15 Source0:        http://dl.sourceforge.net/firebird/firebird-%{version}.tar.bz2
16 # Source0-md5:  559d005ab6622274f9448687f930393c
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
23 Source4:        firebird.init
24 Source5:        firebird.sysconfig
25 Source6:        firebird.inetd
26 Patch0:         %{name}-chmod.patch
27 Patch1:         %{name}-editline.patch
28 Patch2:         %{name}-va.patch
29 Patch3:         %{name}-morearchs.patch
30 Patch4:         %{name}-gcc4.patch
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
38 Patch12:        %{name}-ppc.patch
39 URL:            http://www.firebirdsql.org/
40 BuildRequires:  autoconf
41 BuildRequires:  automake
42 BuildRequires:  bison
43 BuildRequires:  libstdc++-devel
44 BuildRequires:  libtool
45 BuildRequires:  ncurses-devel
46 BuildRequires:  rpmbuild(macros) >= 1.268
47 BuildRequires:  unzip
48 Requires:       %{name}-lib = %{version}-%{release}
49 %if %{with ss}
50 Requires(post,preun):   /sbin/chkconfig
51 Requires:       rc-scripts
52 %endif
53 # official ports are x86, sparc and x86_64
54 # alpha and ppc added in morearchs patch
55 # see morearchs patch if you want to add support for more archs
56 ExclusiveArch:  %{ix86} %{x8664} sparc sparcv9 alpha ppc
57 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
58
59 %define         ibdir   %{_libdir}/interbase
60 %define         specflags       -fno-strict-aliasing
61 %define         debugcflags     -O1 -g -Wall -fno-strict-aliasing
62
63 %description
64 Firebird is a powerful, high-performance relational database designed
65 to be embedded into applications on multiple platforms.
66
67 %description -l pl
68 Firebird jest potê¿nym, wysoko wydajnym systemem relacyjnych baz
69 danych zaprojektowanym do osadzania w aplikacjach na wielu
70 platformach.
71
72 %description -l de
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
76 der Version 6 des kommerziellen Vorgängers Interbase bei Borland
77 ernsthafte Überlegungen im Gange waren, die Weiterentwicklung
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
83 auch Datenbankdateien über 2GB erzeugt werden können.
84
85 %package lib
86 Summary:        Firebird shared library
87 Summary(pl):    Biblioteka wspó³dzielona Firebird
88 Group:          Libraries
89
90 %description lib
91 Firebird shared library (libgds).
92
93 %description lib -l pl
94 Biblioteka wspó³dzielona Firebird (libgds).
95
96 %package devel
97 Summary:        Header files for Firebird library
98 Summary(pl):    Pliki nag³ówkowe biblioteki Firebird
99 Group:          Development/Libraries
100 Requires:       %{name}-lib = %{version}-%{release}
101 Requires:       libstdc++-devel
102
103 %description devel
104 Header files for Firebird library.
105
106 %description devel -l pl
107 Pliki nag³ówkowe biblioteki Firebird.
108
109 %package static
110 Summary:        Static Firebird library
111 Summary(pl):    Statyczna biblioteka Firebird
112 Group:          Development/Libraries
113 Requires:       %{name}-devel = %{version}-%{release}
114
115 %description static
116 Static Firebird library (libgds).
117
118 %description static -l pl
119 Statyczna biblioteka Firebird (libgds).
120
121 %package doc
122 Summary:        Extensive InterBase and Firebird documentation
123 Summary(pl):    Obszerna dokumentacja do baz InterBase i Firebird
124 Group:          Documentation
125
126 %description doc
127 Extensive InterBase and Firebird documentation.
128
129 %description doc -l pl
130 Obszerna dokumentacja do baz InterBase i Firebird.
131
132 %prep
133 %setup -q -n firebird-%{version}
134 %patch0 -p1
135 %patch1 -p1
136 %patch2 -p1
137 %patch3 -p1
138 %patch4 -p1
139 %patch5 -p1
140 %patch6 -p1
141 %patch7 -p1
142 %patch8 -p1
143 %patch9 -p1
144 %patch10 -p1
145 %patch11 -p1
146 %patch12 -p1
147 install -d docs/{IB3.0,IB4.0,IB6.0}
148 unzip -q %{SOURCE1} -d docs/IB6.0
149 tar xzf %{SOURCE2} -C docs/IB4.0
150 unzip -q %{SOURCE3} -d docs/IB3.0
151 # standardize extension, also avoids gzipping by compress-doc
152 mv -f docs/IB6.0/LANGREF.{PDF,pdf}
153
154 %build
155 cd src/extern/editline
156 cp -f /usr/share/automake/config.* .
157 %{__autoconf}
158 cd ../../..
159 %{__libtoolize}
160 %{__aclocal}
161 %{__autoconf}
162
163 %configure \
164         %{?with_ss:--enable-superserver} \
165         --prefix=%{ibdir} \
166         %{?debug:--enable-debug}
167
168 # OPTFLAGS for editline
169 export OPTFLAGS="%{rpmcflags}"
170 DARCH=""
171 %ifarch %{x8664}
172 DARCH="-DAMD64"
173 %endif
174 %ifarch sparc sparcv9
175 DARCH="-Dsparc"
176 %endif
177 %ifarch ppc
178 DARCH="-DPPC"
179 %endif
180
181 %{__make} -j1 \
182         CC="%{__cc}" \
183         CXX="%{__cxx}" \
184         PROD_FLAGS="%{rpmcflags} -DNDEBUG -DLINUX -pipe -MMD -fPIC $DARCH" \
185         DEV_FLAGS="%{rpmcflags} -DLINUX -DDEBUG_GDS_ALLOC -pipe -MMD -fPIC -Wall -Wno-switch $DARCH" \
186         LIB_LINK_RPATH_LINE= \
187         LIB_CLIENT_LINK_OPTIONS="-lpthread"
188
189 # my name is hack. dirty hack.
190 # why isn't that build in previous make call?
191 %{__make} -C src -f ../gen/Makefile.libfbembed libfbembed \
192         CC="%{__cc}" \
193         CXX="%{__cxx}" \
194         PROD_FLAGS="%{rpmcflags} -DNDEBUG -DLINUX -pipe -MMD -fPIC $DARCH" \
195         DEV_FLAGS="%{rpmcflags} -DLINUX -DDEBUG_GDS_ALLOC -pipe -MMD -fPIC -Wall -Wno-switch $DARCH" \
196         LIB_LINK_RPATH_LINE= \
197         LIB_CLIENT_LINK_OPTIONS="-lpthread"
198
199 # fb_lock_mgr is started during build - try to stop it (if /proc is mounted...)
200 /sbin/fuser -k gen/firebird/bin/fb_lock_mgr 2>/dev/null || :
201
202 %install
203 rm -rf $RPM_BUILD_ROOT
204
205 %{__make} -C src -f ../gen/Makefile.install buildImageDir
206
207 install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig/rc-inetd}
208 install -d $RPM_BUILD_ROOT{%{ibdir},%{_libdir},%{_includedir}} \
209         $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
210
211 install gen/firebird/lib/libfb*.a $RPM_BUILD_ROOT%{_libdir}
212 install gen/firebird/lib/libfbembed.so* $RPM_BUILD_ROOT%{_libdir}
213 cd gen/buildroot/%{ibdir}
214
215 cp -af UDF bin help intl aliases.conf firebird.conf firebird.msg security.fdb \
216         $RPM_BUILD_ROOT%{ibdir}
217 install include/* $RPM_BUILD_ROOT%{_includedir}
218 cp -df lib/* $RPM_BUILD_ROOT%{_libdir}
219 install examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
220
221 # or libfbembed?
222 ln -sf libfbclient.so.1 $RPM_BUILD_ROOT%{_libdir}/libgds.so.0
223 ln -sf libfbclient.so.1 $RPM_BUILD_ROOT%{_libdir}/libgds.so
224
225 ln -sf libfbstatic.a $RPM_BUILD_ROOT%{_libdir}/libgds.a
226
227 install %{SOURCE4}      $RPM_BUILD_ROOT/etc/rc.d/init.d/firebird
228 install %{SOURCE5}      $RPM_BUILD_ROOT/etc/sysconfig/firebird
229 install %{SOURCE6}      $RPM_BUILD_ROOT/etc/sysconfig/rc-inetd/firebird
230
231 %clean
232 rm -rf $RPM_BUILD_ROOT
233
234 %pre
235 %groupadd -g 145 firebird
236 %useradd -u 145 -d %{ibdir} -s /bin/sh -g firebird -c "Firebird Server" firebird
237
238 %if %{with ss}
239 %post
240 /sbin/chkconfig --add firebird
241 %service firebird restart
242
243 %preun
244 if [ "$1" = "0" ]; then
245         %service firebird stop
246         /sbin/chkconfig --del firebird
247 fi
248 %endif
249
250 %postun
251 if [ "$1" = "0" ]; then
252         %userremove firebird
253         %groupremove firebird
254 fi
255
256 %post   lib -p /sbin/ldconfig
257 %postun lib -p /sbin/ldconfig
258
259 %files
260 %defattr(644,root,root,755)
261 %doc doc/{sql.extensions,Firebird_conf.txt,README.user*,WhatsNew,fb2-todo.txt}
262 %attr(755,root,root) %{_libdir}/libib_util.so
263 %dir %attr(770,root,firebird) %{ibdir}
264 %attr(755,root,root) %{ibdir}/UDF
265 %attr(755,root,root) %{ibdir}/bin
266 %{ibdir}/help
267 %dir %attr(770,root,firebird) %{ibdir}/intl
268 %attr(755,root,root) %{ibdir}/intl/fbintl
269 %{ibdir}/firebird.msg
270 # following files should be in /var (*.fdb) and /etc (*.conf)?
271 %attr(660,root,firebird) %config(noreplace) %verify(not md5 mtime size) %{ibdir}/security.fdb
272 %attr(640,root,firebird) %config(noreplace) %verify(not md5 mtime size) %{ibdir}/aliases.conf
273 %attr(640,root,firebird) %config(noreplace) %verify(not md5 mtime size) %{ibdir}/firebird.conf
274 %if %{with ss}
275 %attr(754,root,root) /etc/rc.d/init.d/firebird
276 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/firebird
277 %else
278 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/rc-inetd/firebird
279 %endif
280
281 %files lib
282 %defattr(644,root,root,755)
283 %attr(755,root,root) %{_libdir}/libfbclient.so.*.*.*
284 %attr(755,root,root) %{_libdir}/libfbembed.so.*.*.*
285 # InterBase/old Firebird compatibility symlinks
286 %attr(755,root,root) %{_libdir}/libgds.so.0
287 # needed here - original libgds.so.0 didn't have soname, so some old
288 # (possibly not open-source) apps may be linked with libgds.so
289 %attr(755,root,root) %{_libdir}/libgds.so
290
291 %files devel
292 %defattr(644,root,root,755)
293 %attr(755,root,root) %{_libdir}/libfbclient.so
294 %attr(755,root,root) %{_libdir}/libfbembed.so
295 %{_includedir}/*.h
296 %{_examplesdir}/%{name}-%{version}
297
298 %files static
299 %defattr(644,root,root,755)
300 %{_libdir}/libfbcommon.a
301 %{_libdir}/libfbstatic.a
302 # compat link
303 %{_libdir}/libgds.a
304
305 %files doc
306 %defattr(644,root,root,755)
307 %doc docs/*
This page took 0.085641 seconds and 4 git commands to generate.