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