2c1a4f1733ffad20dbad777b06c47c677d69d8bd
[platform/upstream/libphonenumber.git] / packaging / libphonenumber.spec
1 Name:           libphonenumber
2 Version:        5.3.2
3 Release:        1
4 License:        Apache License 2.0
5 Summary:        A library for parsing, formatting, storing and validating international phone numbers.
6 Url:            http://code.google.com/p/libphonenumber/
7 Group:          Development/Libraries/C and C++
8 Source:         libphonenumber-%{version}.tgz
9 BuildRequires:  gcc-c++
10 BuildRequires:  cmake
11 BuildRequires:  gtest-devel
12 BuildRequires:  re2-devel
13 BuildRequires:  protobuf-devel
14 BuildRequires:  boost-devel
15 BuildRequires:  pkgconfig(icu-i18n)
16
17 %description
18 Google's common Java, C++ and Javascript library for parsing,
19 formatting, storing and validating international phone numbers. The
20 Java version is optimized for running on smartphones, and is used by
21 the Android framework since 4.0 (Ice Cream Sandwich).
22
23 %package devel
24 License:        Apache License 2.0
25 Summary:        A library for parsing, formatting, storing and validating international phone numbers.
26 Group:          Development/Libraries/C and C++
27 Requires:       libphonenumber = %{version}
28 Requires:       protobuf-devel
29
30 %description devel
31 Google's common Java, C++ and Javascript library for parsing,
32 formatting, storing and validating international phone numbers. The
33 Java version is optimized for running on smartphones, and is used by
34 the Android framework since 4.0 (Ice Cream Sandwich).
35
36 %prep
37 %setup -q -n libphonenumber
38
39 %build
40 cmake -DCMAKE_SKIP_RPATH=ON -DCMAKE_INSTALL_PREFIX=%{_prefix} cpp
41
42 %{__make} %{?jobs:-j%jobs}
43
44 %install
45 %{__make} DESTDIR=%{buildroot} install
46 rm %{buildroot}/%{_libdir}/*.a
47
48 %post   -n libphonenumber -p /sbin/ldconfig
49
50 %postun -n libphonenumber -p /sbin/ldconfig
51
52
53 %files -n libphonenumber
54 %defattr(-, root, root, -)
55 %doc AUTHORS LICENSE
56 %{_libdir}/libphonenumber.so.5
57 %{_libdir}/libphonenumber.so.5.3
58 %{_libdir}/libgeocoding.so.5
59 %{_libdir}/libgeocoding.so.5.3
60
61 %files devel
62 %defattr(-, root, root, -)
63 %{_includedir}/phonenumbers
64 %{_includedir}/base
65 %{_libdir}/libphonenumber.so
66 %{_libdir}/libgeocoding.so