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