4 %bcond_with re2 # RE2 regular expressions engine (broken as of 8.12.2)
5 %bcond_without static_libs # static libraries
7 Summary: Library to handle international phone numbers
8 Summary(pl.UTF-8): Biblioteka do obsługi międzynarodowych numerów telefonów
12 License: Apache v2.0 with BSD parts
14 #Source0Download: https://github.com/google/libphonenumber/releases/
15 Source0: https://github.com/google/libphonenumber/archive/v%{version}/%{name}-%{version}.tar.gz
16 # Source0-md5: 8b071ea1d220018aa731d79794a00249
17 Patch0: %{name}-link.patch
18 Patch1: %{name}-no-fetch.patch
19 URL: https://github.com/google/libphonenumber/
20 BuildRequires: abseil-cpp-devel
21 BuildRequires: boost-devel >= 1.40.0
22 BuildRequires: cmake >= 2.8.5
23 BuildRequires: gtest-devel
25 BuildRequires: libicu-devel >= 4.4
26 BuildRequires: libstdc++-devel >= 6:7
27 BuildRequires: pkgconfig
28 BuildRequires: protobuf-devel >= 2.4
29 %{?with_re2:BuildRequires: re2-devel}
30 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
33 Google's common C++ library for parsing, formatting, storing and
34 validating international phone numbers.
36 %description -l pl.UTF-8
37 Wspólna biblioteka C++ Google'a do analizy, formatowania,
38 przechowywania oraz sprawdzania poprawności międzynarodowych numerów
42 Summary: Header files for libphonenumber library
43 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki libphonenumber
44 Group: Development/Libraries
45 Requires: %{name} = %{version}-%{release}
46 Requires: boost-devel >= 1.40.0
47 Requires: libicu-devel
48 Requires: libstdc++-devel
49 Requires: protobuf-devel
52 Header files for libphonenumber library.
54 %description devel -l pl.UTF-8
55 Pliki nagłówkowe biblioteki libphonenumber.
58 Summary: Static libphonenumber libraries
59 Summary(pl.UTF-8): Statyczne biblioteki libphonenumber
60 Group: Development/Libraries
61 Requires: %{name}-devel = %{version}-%{release}
64 Static libphonenumber libraries.
66 %description static -l pl.UTF-8
67 Statyczne biblioteki libphonenumber.
78 %{!?with_static_libs:-DBUILD_STATIC_LIB=OFF} \
79 %{?with_re2:-DUSE_RE2=ON}
84 rm -rf $RPM_BUILD_ROOT
86 %{__make} -C build/cpp install \
87 DESTDIR=$RPM_BUILD_ROOT
90 rm -rf $RPM_BUILD_ROOT
92 %post -p /sbin/ldconfig
93 %postun -p /sbin/ldconfig
96 %defattr(644,root,root,755)
97 %doc AUTHORS CONTRIBUTORS FALSEHOODS.md FAQ.md LICENSE.Chromium README.md release_notes.txt cpp/{LICENSE,README}
98 %attr(755,root,root) %{_libdir}/libgeocoding.so.*.*
99 %attr(755,root,root) %ghost %{_libdir}/libgeocoding.so.8
100 %attr(755,root,root) %{_libdir}/libphonenumber.so.*.*
101 %attr(755,root,root) %ghost %{_libdir}/libphonenumber.so.8
104 %defattr(644,root,root,755)
105 %attr(755,root,root) %{_libdir}/libgeocoding.so
106 %attr(755,root,root) %{_libdir}/libphonenumber.so
107 %{_includedir}/phonenumbers
109 %if %{with static_libs}
111 %defattr(644,root,root,755)
112 %{_libdir}/libgeocoding.a
113 %{_libdir}/libphonenumber.a