]> git.pld-linux.org Git - packages/Firebird.git/blob - Firebird.spec
- release 3
[packages/Firebird.git] / Firebird.spec
1 # TODO: kill unaligned accesses (create_db,gpre_current,gbak_static,isql_static) on alpha
2 Summary:        Firebird SQL Database Server and Client tools
3 Summary(pl):    Firebird - serwer baz danych SQL oraz narzêdzia klienckie
4 Name:           Firebird
5 # FirebirdCS/FirebirdSS (Classic Server/Super Server)?
6 Version:        1.5.1.4500
7 Release:        3
8 License:        Interbase Public License 1.0
9 Group:          Applications/Databases
10 Source0:        http://dl.sourceforge.net/firebird/firebird-%{version}.tar.bz2
11 # Source0-md5:  d4594415a3615dd06192abdad57ae04d
12 Source1:        http://www.ibphoenix.com/downloads/60All.zip
13 # Source1-md5:  f86a132012361cd4ae88563105741a4c
14 Source2:        http://www.ibphoenix.com/downloads/ib_4_0_docs.tar.gz
15 # Source2-md5:  f4176d5dec952ee774bb8ee74c1f715d
16 Source3:        http://www.ibphoenix.com/downloads/isc_docs.zip
17 # Source3-md5:  66eef71c188215d10988788282c014a7
18 Patch0:         %{name}-chmod.patch
19 Patch1:         %{name}-editline.patch
20 Patch2:         %{name}-env-overflows.patch
21 Patch3:         %{name}-va.patch
22 Patch4:         %{name}-morearchs.patch
23 URL:            http://firebird.sourceforge.net/
24 BuildRequires:  autoconf
25 BuildRequires:  automake
26 BuildRequires:  libtool
27 BuildRequires:  libstdc++-devel
28 BuildRequires:  ncurses-devel
29 BuildRequires:  unzip
30 Requires:       %{name}-lib = %{version}-%{release}
31 # official ports are x86, sparc and amd64
32 # alpha and ppc added in morearchs patch
33 # see morearchs patch if you want to add support for more archs
34 ExclusiveArch:  %{ix86} amd64 sparc sparcv9 alpha ppc
35 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
36
37 %define         ibdir   %{_libdir}/interbase
38 %define         specflags       -fno-strict-aliasing
39 %define         debugcflags     -O1 -g -Wall -fno-strict-aliasing
40
41 %description
42 Firebird is a powerful, high-performance relational database designed
43 to be embedded into applications on multiple platforms.
44
45 %description -l pl
46 Firebird jest potê¿nym, wysoko wydajnym systemem relacyjnych baz
47 danych zaprojektowanym do osadzania w aplikacjach na wielu
48 platformach.
49
50 %package lib
51 Summary:        Firebird shared library
52 Summary(pl):    Biblioteka wspó³dzielona Firebird
53 Group:          Libraries
54
55 %description lib
56 Firebird shared library (libgds).
57
58 %description lib -l pl
59 Biblioteka wspó³dzielona Firebird (libgds).
60
61 %package devel
62 Summary:        Header files for Firebird library
63 Summary(pl):    Pliki nag³ówkowe biblioteki Firebird
64 Group:          Development/Libraries
65 Requires:       %{name}-lib = %{version}-%{release}
66 Requires:       libstdc++-devel
67
68 %description devel
69 Header files for Firebird library.
70
71 %description devel -l pl
72 Pliki nag³ówkowe biblioteki Firebird.
73
74 %package static
75 Summary:        Static Firebird library
76 Summary(pl):    Statyczna biblioteka Firebird
77 Group:          Development/Libraries
78 Requires:       %{name}-devel = %{version}-%{release}
79
80 %description static
81 Static Firebird library (libgds).
82
83 %description static -l pl
84 Statyczna biblioteka Firebird (libgds).
85
86 %package doc
87 Summary:        Extensive InterBase and Firebird documentation
88 Summary(pl):    Obszerna dokumentacja do baz InterBase i Firebird
89 Group:          Documentation
90
91 %description doc
92 Extensive InterBase and Firebird documentation.
93
94 %description doc -l pl
95 Obszerna dokumentacja do baz InterBase i Firebird.
96
97 %prep
98 %setup -q -n firebird-%{version}
99 %patch0 -p1
100 %patch1 -p1
101 %patch2 -p1
102 %patch3 -p1
103 %patch4 -p1
104
105 install -d docs/{IB3.0,IB4.0,IB6.0}
106 unzip -q %{SOURCE1} -d docs/IB6.0
107 tar xzf %{SOURCE2} -C docs/IB4.0
108 unzip -q %{SOURCE3} -d docs/IB3.0
109 # standardize extension, also avoids gzipping by compress-doc
110 mv -f docs/IB6.0/LANGREF.{PDF,pdf}
111
112 %build
113 cd src/extern/editline
114 cp -f /usr/share/automake/config.* .
115 %{__autoconf}
116 cd ../../..
117 %{__libtoolize}
118 %{__aclocal}
119 %{__autoconf}
120
121 %configure \
122         --prefix=%{ibdir} \
123         %{?debug:--enable-debug}
124 # --enable-superserver
125
126 # OPTFLAGS for editline
127 export OPTFLAGS="%{rpmcflags}"
128 %ifarch amd64
129 DARCH="-DAMD64"
130 %else
131 %ifarch sparc sparcv9
132 DARCH="-Dsparc"
133 %else
134 DARCH=""
135 %endif
136 %endif
137 %{__make} -j1 \
138         PROD_FLAGS="%{rpmcflags} -DNDEBUG -DLINUX -pipe -MMD -fPIC $DARCH" \
139         DEV_FLAGS="%{rpmcflags} -DLINUX -DDEBUG_GDS_ALLOC -pipe -MMD -fPIC -Wall -Wno-switch $DARCH" \
140         LIB_LINK_RPATH_LINE= \
141         LIB_CLIENT_LINK_OPTIONS="-lpthread"
142
143 # fb_lock_mgr is started during build - try to stop it (if /proc is mounted...)
144 /sbin/fuser -k gen/firebird/bin/fb_lock_mgr 2>/dev/null || :
145
146 %install
147 rm -rf $RPM_BUILD_ROOT
148
149 %{__make} -C src -f ../gen/Makefile.install buildImageDir
150
151 install -d $RPM_BUILD_ROOT{%{ibdir},%{_libdir},%{_includedir}} \
152         $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
153 install gen/firebird/lib/libfb*.a $RPM_BUILD_ROOT%{_libdir}
154 cd gen/buildroot/%{ibdir}
155
156 cp -af UDF bin help intl aliases.conf firebird.conf firebird.msg security.fdb \
157         $RPM_BUILD_ROOT%{ibdir}
158 install include/* $RPM_BUILD_ROOT%{_includedir}
159 cp -df lib/* $RPM_BUILD_ROOT%{_libdir}
160 install examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
161
162 # or libfbembed?
163 ln -sf libfbclient.so.1.5.0 $RPM_BUILD_ROOT%{_libdir}/libgds.so.0
164 ln -sf libfbclient.so.1 $RPM_BUILD_ROOT%{_libdir}/libgds.so
165
166 ln -sf libfbstatic.a $RPM_BUILD_ROOT%{_libdir}/libgds.a
167
168 %clean
169 rm -rf $RPM_BUILD_ROOT
170
171 %post   lib -p /sbin/ldconfig
172 %postun lib -p /sbin/ldconfig
173
174 %files
175 %defattr(644,root,root,755)
176 %doc doc/{sql.extensions,Firebird_conf.txt,README.user*,WhatsNew,fb2-todo.txt}
177 %attr(755,root,root) %{_libdir}/libib_util.so
178 %dir %{ibdir}
179 %attr(755,root,root) %{ibdir}/UDF
180 %attr(755,root,root) %{ibdir}/bin
181 %{ibdir}/help
182 %dir %{ibdir}/intl
183 %attr(755,root,root) %{ibdir}/intl/fbintl
184 %{ibdir}/firebird.msg
185 # following files should be in /var (*.fdb) and /etc (*.conf)?
186 %{ibdir}/security.fdb
187 %{ibdir}/aliases.conf
188 %{ibdir}/firebird.conf
189
190 %files lib
191 %defattr(644,root,root,755)
192 %attr(755,root,root) %{_libdir}/libfbclient.so.*.*.*
193 %attr(755,root,root) %{_libdir}/libfbembed.so.*.*.*
194 # InterBase/old Firebird compatibility symlinks
195 %attr(755,root,root) %{_libdir}/libgds.so.0
196 # needed here - original libgds.so.0 didn't have soname, so some old
197 # (possibly not open-source) apps may be linked with libgds.so
198 %attr(755,root,root) %{_libdir}/libgds.so
199
200 %files devel
201 %defattr(644,root,root,755)
202 %attr(755,root,root) %{_libdir}/libfbclient.so
203 %attr(755,root,root) %{_libdir}/libfbembed.so
204 %{_includedir}/*.h
205 %{_examplesdir}/%{name}-%{version}
206
207 %files static
208 %defattr(644,root,root,755)
209 %{_libdir}/libfbcommon.a
210 %{_libdir}/libfbstatic.a
211 # compat link
212 %{_libdir}/libgds.a
213
214 %files doc
215 %defattr(644,root,root,755)
216 %doc docs/*
This page took 0.034626 seconds and 3 git commands to generate.