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