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: 0924eb4ca6e9b00e9111d44e01284e66
17 Patch0: %{name}-link.patch
18 URL: https://github.com/google/libphonenumber/
19 BuildRequires: boost-devel >= 1.40.0
20 BuildRequires: cmake >= 2.8.5
21 BuildRequires: gtest-devel
23 BuildRequires: libicu-devel >= 4.4
24 BuildRequires: libstdc++-devel
25 BuildRequires: pkgconfig
26 BuildRequires: protobuf-devel >= 2.4
27 %{?with_re2:BuildRequires: re2-devel}
28 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
31 Google's common C++ library for parsing, formatting, storing and
32 validating international phone numbers.
34 %description -l pl.UTF-8
35 Wspólna biblioteka C++ Google'a do analizy, formatowania,
36 przechowywania oraz sprawdzania poprawności międzynarodowych numerów
40 Summary: Header files for libphonenumber library
41 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki libphonenumber
42 Group: Development/Libraries
43 Requires: %{name} = %{version}-%{release}
44 Requires: boost-devel >= 1.40.0
45 Requires: libicu-devel
46 Requires: libstdc++-devel
47 Requires: protobuf-devel
50 Header files for libphonenumber library.
52 %description devel -l pl.UTF-8
53 Pliki nagłówkowe biblioteki libphonenumber.
56 Summary: Static libphonenumber libraries
57 Summary(pl.UTF-8): Statyczne biblioteki libphonenumber
58 Group: Development/Libraries
59 Requires: %{name}-devel = %{version}-%{release}
62 Static libphonenumber libraries.
64 %description static -l pl.UTF-8
65 Statyczne biblioteki libphonenumber.
75 %{!?with_static_libs:-DBUILD_STATIC_LIB=OFF} \
76 %{?with_re2:-DUSE_RE2=ON}
81 rm -rf $RPM_BUILD_ROOT
83 %{__make} -C build/cpp install \
84 DESTDIR=$RPM_BUILD_ROOT
87 rm -rf $RPM_BUILD_ROOT
89 %post -p /sbin/ldconfig
90 %postun -p /sbin/ldconfig
93 %defattr(644,root,root,755)
94 %doc AUTHORS CONTRIBUTORS FALSEHOODS.md FAQ.md LICENSE.Chromium README.md release_notes.txt cpp/{LICENSE,README}
95 %attr(755,root,root) %{_libdir}/libgeocoding.so.*.*
96 %attr(755,root,root) %ghost %{_libdir}/libgeocoding.so.8
97 %attr(755,root,root) %{_libdir}/libphonenumber.so.*.*
98 %attr(755,root,root) %ghost %{_libdir}/libphonenumber.so.8
101 %defattr(644,root,root,755)
102 %attr(755,root,root) %{_libdir}/libgeocoding.so
103 %attr(755,root,root) %{_libdir}/libphonenumber.so
104 %{_includedir}/phonenumbers
106 %if %{with static_libs}
108 %defattr(644,root,root,755)
109 %{_libdir}/libgeocoding.a
110 %{_libdir}/libphonenumber.a