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