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