]>
Commit | Line | Data |
---|---|---|
874379c9 JB |
1 | # TODO: java package |
2 | # | |
3 | # Conditional build: | |
4 | %bcond_with re2 # RE2 regular expressions engine (broken as of 8.12.2) | |
5 | %bcond_without static_libs # static libraries | |
6 | # | |
7 | Summary: Library to handle international phone numbers | |
8 | Summary(pl.UTF-8): Biblioteka do obsługi międzynarodowych numerów telefonów | |
9 | Name: libphonenumber | |
c9e3b260 | 10 | Version: 8.13.11 |
279323ce | 11 | Release: 1 |
874379c9 JB |
12 | License: Apache v2.0 with BSD parts |
13 | Group: Libraries | |
14 | #Source0Download: https://github.com/google/libphonenumber/releases/ | |
15 | Source0: https://github.com/google/libphonenumber/archive/v%{version}/%{name}-%{version}.tar.gz | |
c9e3b260 | 16 | # Source0-md5: 688130209ffc810632ae6ca93af5506f |
874379c9 | 17 | Patch0: %{name}-link.patch |
4ded0a69 | 18 | Patch1: %{name}-no-fetch.patch |
7d6fb481 | 19 | Patch2: no-static.patch |
874379c9 | 20 | URL: https://github.com/google/libphonenumber/ |
4ded0a69 | 21 | BuildRequires: abseil-cpp-devel |
874379c9 | 22 | BuildRequires: boost-devel >= 1.40.0 |
d9e2a5ef | 23 | BuildRequires: cmake >= 3.11 |
874379c9 JB |
24 | BuildRequires: gtest-devel |
25 | BuildRequires: jre | |
26 | BuildRequires: libicu-devel >= 4.4 | |
38501573 | 27 | BuildRequires: libstdc++-devel >= 6:7 |
874379c9 JB |
28 | BuildRequires: pkgconfig |
29 | BuildRequires: protobuf-devel >= 2.4 | |
30 | %{?with_re2:BuildRequires: re2-devel} | |
3cce7a69 | 31 | BuildRequires: rpmbuild(macros) >= 1.605 |
874379c9 JB |
32 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
33 | ||
34 | %description | |
35 | Google's common C++ library for parsing, formatting, storing and | |
36 | validating international phone numbers. | |
37 | ||
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 | |
41 | telefonów. | |
42 | ||
43 | %package devel | |
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 | |
52 | ||
53 | %description devel | |
54 | Header files for libphonenumber library. | |
55 | ||
56 | %description devel -l pl.UTF-8 | |
57 | Pliki nagłówkowe biblioteki libphonenumber. | |
58 | ||
59 | %package static | |
60 | Summary: Static libphonenumber libraries | |
61 | Summary(pl.UTF-8): Statyczne biblioteki libphonenumber | |
62 | Group: Development/Libraries | |
63 | Requires: %{name}-devel = %{version}-%{release} | |
64 | ||
65 | %description static | |
66 | Static libphonenumber libraries. | |
67 | ||
68 | %description static -l pl.UTF-8 | |
69 | Statyczne biblioteki libphonenumber. | |
70 | ||
71 | %prep | |
72 | %setup -q | |
73 | %patch0 -p1 | |
4ded0a69 | 74 | %patch1 -p1 |
7d6fb481 | 75 | %patch2 -p1 |
874379c9 JB |
76 | |
77 | %build | |
78 | install -d build/cpp | |
79 | cd build/cpp | |
80 | %cmake ../../cpp \ | |
81 | %{!?with_static_libs:-DBUILD_STATIC_LIB=OFF} \ | |
82 | %{?with_re2:-DUSE_RE2=ON} | |
83 | ||
84 | %{__make} | |
85 | ||
86 | %install | |
87 | rm -rf $RPM_BUILD_ROOT | |
88 | ||
89 | %{__make} -C build/cpp install \ | |
90 | DESTDIR=$RPM_BUILD_ROOT | |
91 | ||
92 | %clean | |
93 | rm -rf $RPM_BUILD_ROOT | |
94 | ||
95 | %post -p /sbin/ldconfig | |
96 | %postun -p /sbin/ldconfig | |
97 | ||
98 | %files | |
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 | |
105 | ||
106 | %files devel | |
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 | |
570e0eb5 | 111 | %{_libdir}/cmake/libphonenumber |
874379c9 JB |
112 | |
113 | %if %{with static_libs} | |
114 | %files static | |
115 | %defattr(644,root,root,755) | |
116 | %{_libdir}/libgeocoding.a | |
117 | %{_libdir}/libphonenumber.a | |
118 | %endif |