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