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