3 %bcond_without tests # build without tests
5 Summary: C++ associative containers
6 Summary(pl.UTF-8): Kontenery asocjacyjne dla C++
11 Group: Development/Libraries
12 #Source0Download: https://github.com/sparsehash/sparsehash/releases
13 Source0: https://github.com/sparsehash/sparsehash/archive/%{name}-%{version}.tar.gz
14 # Source0-md5: cb565465643c3588abfac569b31e7433
15 URL: https://github.com/sparsehash/sparsehash
16 %{?with_tests:BuildRequires: libstdc++-devel}
17 %{?with_tests:BuildRequires: libtcmalloc-devel}
18 BuildRequires: pkgconfig
19 BuildRequires: sed >= 4.0
21 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
23 %if %{_host_cpu} == "x32"
24 %define build_arch %{_target_platform}
26 %define build_arch %{_host}
30 The Google SparseHash project contains several C++ template hash-map
31 implementations with different performance characteristics, including
32 an implementation that optimizes for space and one that optimizes for
35 %description -l pl.UTF-8
36 Projekt Google SparseHash zawiera kilka implementacji struktury
37 hash-map w szablonach C++ z różną charakterystyką wydajności, w tym
38 implementację zoptymalizowaną pod kątem miejsca oraz drugą,
39 zoptymalizowaną pod kątem szybkości.
41 # all files are in -devel package
43 Summary: C++ associative containers
44 Summary(pl.UTF-8): Kontenery asocjacyjne dla C++
45 Group: Development/Libraries
46 Requires: libstdc++-devel
49 The Google SparseHash project contains several C++ template hash-map
50 implementations with different performance characteristics, including
51 an implementation that optimizes for space and one that optimizes for
54 %description devel -l pl.UTF-8
55 Projekt Google SparseHash zawiera kilka implementacji struktury
56 hash-map w szablonach C++ z różną charakterystyką wydajności, w tym
57 implementację zoptymalizowaną pod kątem miejsca oraz drugą,
58 zoptymalizowaną pod kątem szybkości.
61 %setup -q -n %{name}-%{name}-%{version}
65 ac_cv_header_google_malloc_extension_h=no \
66 --host=%{build_arch} \
69 # clearing noinst_PROGRAMS helps not to build targets for tests
78 rm -rf $RPM_BUILD_ROOT
81 DESTDIR=$RPM_BUILD_ROOT
84 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-2.0.2
87 install -d $RPM_BUILD_ROOT%{_npkgconfigdir}
88 %{__mv} $RPM_BUILD_ROOT{%{_pkgconfigdir},%{_npkgconfigdir}}/libsparsehash.pc
89 %{__sed} -i -e '/libdir/d' $RPM_BUILD_ROOT%{_npkgconfigdir}/libsparsehash.pc
92 rm -rf $RPM_BUILD_ROOT
95 %defattr(644,root,root,755)
96 %doc AUTHORS COPYING ChangeLog NEWS README TODO doc/*
97 %{_includedir}/sparsehash
98 %{_npkgconfigdir}/libsparsehash.pc
100 # legacy headers under google subdir
101 %dir %{_includedir}/google
102 %{_includedir}/google/dense_hash_map
103 %{_includedir}/google/dense_hash_set
104 %{_includedir}/google/sparse_hash_map
105 %{_includedir}/google/sparse_hash_set
106 %{_includedir}/google/sparsetable
107 %{_includedir}/google/template_util.h
108 %{_includedir}/google/type_traits.h
109 %{_includedir}/google/sparsehash