Revert "exclude arch TV"
[platform/upstream/libphonenumber.git] / packaging / libphonenumber.spec
1 Name:           libphonenumber
2 Version:        7.0.6
3 Release:        1
4 License:        Apache-2.0 and BSD-2.0
5 Summary:        A library for manipulating international phone numbers
6 Url:            http://code.google.com/p/libphonenumber/
7 Group:          Social & Content/Libraries
8 Source:         libphonenumber-%{version}.tgz
9
10 BuildRequires:  gcc-c++
11 BuildRequires:  cmake
12 BuildRequires:  gtest-devel
13 BuildRequires:  re2-devel
14 BuildRequires:  protobuf-devel
15 BuildRequires:  boost-devel
16 BuildRequires:  pkgconfig(icu-i18n)
17
18 %description
19 Google's common Java, C++ and Javascript library for parsing,
20 formatting, storing and validating international phone numbers. The
21 Java version is optimized for running on smartphones, and is used by
22 the Android framework since 4.0 (Ice Cream Sandwich).
23
24 %package devel
25 Summary:        Devel package for library
26 Group:          Social & Content/Libraries
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} -DCMAKE_INSTALL_LIBDIR=%{_libdir} cpp
41
42 # Parallel builds are broken and/or not supported by upstream, don't
43 # use them. The generated Makefile lacks the geocoding_data.cc ->
44 # generate_geocoding_data dependency and thus code generator may still
45 # be producing the file when the C++ compiler is already parsing it.
46 %{__make}
47
48 %install
49 %{__make} DESTDIR=%{buildroot} install
50 rm %{buildroot}/%{_libdir}/*.a
51 # Exported header has dependency on lock_posix.h but lock_posix.h is not installed.
52 cp cpp/src/phonenumbers/base/synchronization/lock_posix.h %{buildroot}/%{_includedir}/phonenumbers/base/synchronization/
53
54 %post   -n libphonenumber -p /sbin/ldconfig
55
56 %postun -n libphonenumber -p /sbin/ldconfig
57
58
59 %files -n libphonenumber
60 %defattr(-, root, root, -)
61 %doc AUTHORS
62 %license LICENSE
63 %{_libdir}/libphonenumber.so.*
64 %{_libdir}/libgeocoding.so.*
65
66 %files devel
67 %defattr(-, root, root, -)
68 %{_includedir}/phonenumbers
69 %{_libdir}/libphonenumber.so
70 %{_libdir}/libgeocoding.so