]> git.pld-linux.org Git - packages/libphonenumber.git/blob - libphonenumber.spec
icu rebuild
[packages/libphonenumber.git] / libphonenumber.spec
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
10 Version:        8.12.51
11 Release:        2
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
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
25 BuildRequires:  jre
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)
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
74 %patch1 -p1
75 %patch2 -p1
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
111
112 %if %{with static_libs}
113 %files static
114 %defattr(644,root,root,755)
115 %{_libdir}/libgeocoding.a
116 %{_libdir}/libphonenumber.a
117 %endif
This page took 0.064495 seconds and 4 git commands to generate.