]> git.pld-linux.org Git - packages/libphonenumber.git/blob - libphonenumber.spec
17efffc9f7035ff9d4ade558641bb2862380355c
[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.42
11 Release:        4
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:  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
24 BuildRequires:  jre
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)
31
32 %description
33 Google's common C++ library for parsing, formatting, storing and
34 validating international phone numbers.
35
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
39 telefonów.
40
41 %package devel
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
50
51 %description devel
52 Header files for libphonenumber library.
53
54 %description devel -l pl.UTF-8
55 Pliki nagłówkowe biblioteki libphonenumber.
56
57 %package static
58 Summary:        Static libphonenumber libraries
59 Summary(pl.UTF-8):      Statyczne biblioteki libphonenumber
60 Group:          Development/Libraries
61 Requires:       %{name}-devel = %{version}-%{release}
62
63 %description static
64 Static libphonenumber libraries.
65
66 %description static -l pl.UTF-8
67 Statyczne biblioteki libphonenumber.
68
69 %prep
70 %setup -q
71 %patch0 -p1
72 %patch1 -p1
73
74 %build
75 install -d build/cpp
76 cd build/cpp
77 %cmake ../../cpp \
78         %{!?with_static_libs:-DBUILD_STATIC_LIB=OFF} \
79         %{?with_re2:-DUSE_RE2=ON}
80
81 %{__make}
82
83 %install
84 rm -rf $RPM_BUILD_ROOT
85
86 %{__make} -C build/cpp install \
87         DESTDIR=$RPM_BUILD_ROOT
88
89 %clean
90 rm -rf $RPM_BUILD_ROOT
91
92 %post   -p /sbin/ldconfig
93 %postun -p /sbin/ldconfig
94
95 %files
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
102
103 %files devel
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
108
109 %if %{with static_libs}
110 %files static
111 %defattr(644,root,root,755)
112 %{_libdir}/libgeocoding.a
113 %{_libdir}/libphonenumber.a
114 %endif
This page took 0.26318 seconds and 2 git commands to generate.