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: f57a5b475bc5939c7ea04faa6e94d601
17 Patch0: %{name}-link.patch
18 Patch1: %{name}-no-fetch.patch
19 Patch2: no-static.patch
20 URL: https://github.com/google/libphonenumber/
21 BuildRequires: abseil-cpp-devel
22 BuildRequires: boost-devel >= 1.40.0
23 BuildRequires: cmake >= 2.8.5
24 BuildRequires: gtest-devel
26 BuildRequires: libicu-devel >= 4.4
27 BuildRequires: libstdc++-devel >= 6:7
28 BuildRequires: pkgconfig
29 BuildRequires: protobuf-devel >= 2.4
30 %{?with_re2:BuildRequires: re2-devel}
31 BuildRequires: rpmbuild(macros) >= 1.605
32 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
35 Google's common C++ library for parsing, formatting, storing and
36 validating international phone numbers.
38 %description -l pl.UTF-8
39 Wspólna biblioteka C++ Google'a do analizy, formatowania,
40 przechowywania oraz sprawdzania poprawności międzynarodowych numerów
44 Summary: Header files for libphonenumber library
45 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki libphonenumber
46 Group: Development/Libraries
47 Requires: %{name} = %{version}-%{release}
48 Requires: boost-devel >= 1.40.0
49 Requires: libicu-devel
50 Requires: libstdc++-devel
51 Requires: protobuf-devel
54 Header files for libphonenumber library.
56 %description devel -l pl.UTF-8
57 Pliki nagłówkowe biblioteki libphonenumber.
60 Summary: Static libphonenumber libraries
61 Summary(pl.UTF-8): Statyczne biblioteki libphonenumber
62 Group: Development/Libraries
63 Requires: %{name}-devel = %{version}-%{release}
66 Static libphonenumber libraries.
68 %description static -l pl.UTF-8
69 Statyczne biblioteki libphonenumber.
81 %{!?with_static_libs:-DBUILD_STATIC_LIB=OFF} \
82 %{?with_re2:-DUSE_RE2=ON}
87 rm -rf $RPM_BUILD_ROOT
89 %{__make} -C build/cpp install \
90 DESTDIR=$RPM_BUILD_ROOT
93 rm -rf $RPM_BUILD_ROOT
95 %post -p /sbin/ldconfig
96 %postun -p /sbin/ldconfig
99 %defattr(644,root,root,755)
100 %doc AUTHORS CONTRIBUTORS FALSEHOODS.md FAQ.md LICENSE.Chromium README.md release_notes.txt cpp/{LICENSE,README}
101 %attr(755,root,root) %{_libdir}/libgeocoding.so.*.*
102 %attr(755,root,root) %ghost %{_libdir}/libgeocoding.so.8
103 %attr(755,root,root) %{_libdir}/libphonenumber.so.*.*
104 %attr(755,root,root) %ghost %{_libdir}/libphonenumber.so.8
107 %defattr(644,root,root,755)
108 %attr(755,root,root) %{_libdir}/libgeocoding.so
109 %attr(755,root,root) %{_libdir}/libphonenumber.so
110 %{_includedir}/phonenumbers
112 %if %{with static_libs}
114 %defattr(644,root,root,755)
115 %{_libdir}/libgeocoding.a
116 %{_libdir}/libphonenumber.a