]>
Commit | Line | Data |
---|---|---|
1 | # | |
2 | # Conditional build: | |
3 | %bcond_with static_gcc # linkg libgcc* statically into libstlport. | |
4 | # | |
5 | Summary: C++ standard library | |
6 | Summary(pl.UTF-8): Biblioteki standardowe C++ | |
7 | Name: STLport | |
8 | Version: 5.1.6 | |
9 | Release: 1 | |
10 | Epoch: 2 | |
11 | License: distributable (see README.gz) | |
12 | Group: Libraries | |
13 | Source0: http://dl.sourceforge.net/stlport/%{name}-%{version}.tar.bz2 | |
14 | # Source0-md5: 1f718b6c8f892927754a6b5c05b4ccc8 | |
15 | Source1: stlport-config.in | |
16 | Source2: stlport.pc.in | |
17 | Source3: stlport-debug.pc.in | |
18 | Patch0: %{name}-endianness.patch | |
19 | Patch1: %{name}-alpha.patch | |
20 | Patch2: %{name}-valarray-copy-constructor.patch | |
21 | Patch3: %{name}-vendor_gcc_detection.patch | |
22 | Patch4: %{name}-fstream.patch | |
23 | URL: http://stlport.sourceforge.net/ | |
24 | BuildRequires: libstdc++-devel >= 6:4.2.0-1 | |
25 | BuildRequires: sed >= 4.0 | |
26 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
27 | ||
28 | %description | |
29 | STLport is a multiplatform implementation of C++ Standard Template | |
30 | Library based on SGI STL. It's used by e.g. OpenOffice. | |
31 | ||
32 | %description -l pl.UTF-8 | |
33 | STLport to wieloplatformowa implementacja standardowej biblioteki | |
34 | szablonów (Standard Template Library) C++ oparta na SGI STL. Jest | |
35 | używana m.in. przez OpenOffice. | |
36 | ||
37 | %package devel | |
38 | Summary: STLport heades files, documentation | |
39 | Summary(pl.UTF-8): Pliki nagłówkowe i dokumentacja do STLport | |
40 | Group: Development/Libraries | |
41 | Requires: %{name} = %{epoch}:%{version}-%{release} | |
42 | ||
43 | %description devel | |
44 | Header files and development documentation for STLport. | |
45 | ||
46 | %description devel -l pl.UTF-8 | |
47 | Pliki nagłówkowe i dokumentacja dla STLport. | |
48 | ||
49 | %package static | |
50 | Summary: Static STLport libraries | |
51 | Summary(pl.UTF-8): Biblioteki statyczne do STLport | |
52 | Group: Development/Libraries | |
53 | Requires: %{name}-devel = %{epoch}:%{version}-%{release} | |
54 | ||
55 | %description static | |
56 | Static STLport libraries. | |
57 | ||
58 | %description static -l pl.UTF-8 | |
59 | Biblioteki statyczne do STLport. | |
60 | ||
61 | %package dbg | |
62 | Summary: Debug version of STLport library | |
63 | Summary(pl.UTF-8): Wersja diagnostyczna biblioteki STLport | |
64 | Group: Libraries | |
65 | ||
66 | %description dbg | |
67 | Debug version of STLport library. | |
68 | ||
69 | %description dbg -l pl.UTF-8 | |
70 | Wersja diagnostyczna biblioteki STLport. | |
71 | ||
72 | %package dbg-devel | |
73 | Summary: Debug version of STLport library - development files | |
74 | Summary(pl.UTF-8): Wersja diagnostyczna biblioteki STLport - pliki programistyczne | |
75 | Group: Development/Libraries | |
76 | Requires: %{name}-dbg = %{epoch}:%{version}-%{release} | |
77 | Requires: %{name}-devel = %{epoch}:%{version}-%{release} | |
78 | ||
79 | %description dbg-devel | |
80 | Debug version of STLport library - development files. | |
81 | ||
82 | %description dbg-devel -l pl.UTF-8 | |
83 | Wersja diagnostyczna biblioteki STLport - pliki programistyczne. | |
84 | ||
85 | %package dbg-static | |
86 | Summary: Static debug version of STLport library | |
87 | Summary(pl.UTF-8): Statyczna wersja diagnostyczna biblioteki STLport | |
88 | Group: Development/Libraries | |
89 | Requires: %{name}-dbg-devel = %{epoch}:%{version}-%{release} | |
90 | ||
91 | %description dbg-static | |
92 | Static debug version of STLport library. | |
93 | ||
94 | %description dbg-static -l pl.UTF-8 | |
95 | Statyczna wersja diagnostyczna biblioteki STLport. | |
96 | ||
97 | %prep | |
98 | %setup -q | |
99 | %patch0 -p1 | |
100 | %patch1 -p1 | |
101 | %patch2 -p1 | |
102 | %patch3 -p1 | |
103 | %patch4 -p1 | |
104 | ||
105 | sed -i -e 's/= -O2$/= %{rpmcflags}/' build/Makefiles/gmake/gcc.mak | |
106 | ||
107 | cp -a %{SOURCE1} stlport-config.in | |
108 | cp -a %{SOURCE2} stlport.pc.in | |
109 | cp -a %{SOURCE3} stlport-debug.pc.in | |
110 | ||
111 | %build | |
112 | cd build/lib | |
113 | ||
114 | %{?with_static_gcc:./configure --use-static-gcc} | |
115 | ||
116 | %{__make} -f gcc.mak \ | |
117 | stldbg-shared \ | |
118 | stldbg-static \ | |
119 | release-shared \ | |
120 | release-static \ | |
121 | CC="%{__cc}" \ | |
122 | CXX="%{__cxx}" | |
123 | ||
124 | cd ../.. | |
125 | ||
126 | subst=' | |
127 | s,@prefix@,%{_prefix},g | |
128 | s,@exec_prefix@,%{_exec_prefix},g | |
129 | s,@libdir@,%{_libdir},g | |
130 | s,@includedir@,%{_includedir},g | |
131 | s,@ver@,%{version},g | |
132 | s,@VERSION@,%{version},g | |
133 | ' | |
134 | ||
135 | %{__sed} -e "$subst" stlport-config.in > stlport-config | |
136 | %{__sed} -e "$subst" stlport.pc.in > stlport.pc | |
137 | %{__sed} -e "$subst" stlport-debug.pc.in > stlport-debug.pc | |
138 | ||
139 | %install | |
140 | rm -rf $RPM_BUILD_ROOT | |
141 | install -d $RPM_BUILD_ROOT%{_includedir} | |
142 | ||
143 | %{__make} -C build/lib -f gcc.mak \ | |
144 | install-stldbg-shared \ | |
145 | install-stldbg-static \ | |
146 | install-release-shared \ | |
147 | install-release-static \ | |
148 | INSTALL_BIN_DIR=$RPM_BUILD_ROOT%{_bindir} \ | |
149 | INSTALL_LIB_DIR_STLDBG=$RPM_BUILD_ROOT%{_libdir} \ | |
150 | INSTALL_LIB_DIR=$RPM_BUILD_ROOT%{_libdir} | |
151 | ||
152 | cp -a stlport $RPM_BUILD_ROOT%{_includedir} | |
153 | rm -rf $RPM_BUILD_ROOT%{_includedir}/stlport/BC50 | |
154 | ||
155 | # let libstlport{,stlg}.so point to real lib, not artificial libstlport{,stlg}.so.5 symlink | |
156 | ln -sf $(basename $RPM_BUILD_ROOT%{_libdir}/libstlport.so.*.*.*) \ | |
157 | $RPM_BUILD_ROOT%{_libdir}/libstlport.so | |
158 | ln -sf $(basename $RPM_BUILD_ROOT%{_libdir}/libstlportstlg.so.*.*.*) \ | |
159 | $RPM_BUILD_ROOT%{_libdir}/libstlportstlg.so | |
160 | ||
161 | ||
162 | install -d $RPM_BUILD_ROOT{%{_pkgconfigdir},%{_bindir}} | |
163 | cp -a stlport.pc $RPM_BUILD_ROOT%{_pkgconfigdir} | |
164 | cp -a stlport-debug.pc $RPM_BUILD_ROOT%{_pkgconfigdir} | |
165 | install stlport-config $RPM_BUILD_ROOT%{_bindir} | |
166 | ||
167 | %clean | |
168 | rm -rf $RPM_BUILD_ROOT | |
169 | ||
170 | %post -p /sbin/ldconfig | |
171 | %postun -p /sbin/ldconfig | |
172 | ||
173 | %post dbg -p /sbin/ldconfig | |
174 | %postun dbg -p /sbin/ldconfig | |
175 | ||
176 | %files | |
177 | %defattr(644,root,root,755) | |
178 | %doc README | |
179 | %attr(755,root,root) %{_libdir}/libstlport.so.*.*.* | |
180 | %attr(755,root,root) %ghost %{_libdir}/libstlport.so.5.1 | |
181 | %attr(755,root,root) %ghost %{_libdir}/libstlport.so.5 | |
182 | ||
183 | %files devel | |
184 | %defattr(644,root,root,755) | |
185 | %doc doc/{FAQ,*.txt} | |
186 | %attr(755,root,root) %{_libdir}/libstlport.so | |
187 | %attr(755,root,root) %{_bindir}/stlport-config | |
188 | %{_includedir}/stlport | |
189 | %{_pkgconfigdir}/stlport.pc | |
190 | ||
191 | %files static | |
192 | %defattr(644,root,root,755) | |
193 | %{_libdir}/libstlport.a | |
194 | ||
195 | %files dbg | |
196 | %defattr(644,root,root,755) | |
197 | %attr(755,root,root) %{_libdir}/libstlportstlg.so.*.*.* | |
198 | %attr(755,root,root) %ghost %{_libdir}/libstlportstlg.so.5.1 | |
199 | %attr(755,root,root) %ghost %{_libdir}/libstlportstlg.so.5 | |
200 | ||
201 | %files dbg-devel | |
202 | %defattr(644,root,root,755) | |
203 | %attr(755,root,root) %{_libdir}/libstlportstlg.so | |
204 | %{_pkgconfigdir}/stlport-debug.pc | |
205 | ||
206 | %files dbg-static | |
207 | %defattr(644,root,root,755) | |
208 | %{_libdir}/libstlportstlg.a |