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