updated upload common
[platform/upstream/libphonenumber.git] / packaging / libphonenumber.spec
index 20dec2b..a0312cb 100644 (file)
@@ -1,16 +1,17 @@
 Name:           libphonenumber
-Version:        5.3.2
+Version:        7.0.6
 Release:        1
-License:        Apache-2.0
-Summary:        A library for parsing, formatting, storing and validating international phone numbers.
+License:        Apache-2.0 and BSD-3-Clause
+Summary:        A library for manipulating international phone numbers
 Url:            http://code.google.com/p/libphonenumber/
 Group:          Social & Content/Libraries
 Source:         libphonenumber-%{version}.tgz
+
 BuildRequires:  gcc-c++
 BuildRequires:  cmake
 BuildRequires:  gtest-devel
 BuildRequires:  re2-devel
-BuildRequires:  protobuf-devel
+BuildRequires:  pkgconfig(protobuf-lite)
 BuildRequires:  boost-devel
 BuildRequires:  pkgconfig(icu-i18n)
 
@@ -21,7 +22,7 @@ Java version is optimized for running on smartphones, and is used by
 the Android framework since 4.0 (Ice Cream Sandwich).
 
 %package devel
-Summary:        A library for parsing, formatting, storing and validating international phone numbers.
+Summary:        Devel package for library
 Group:          Social & Content/Libraries
 Requires:       libphonenumber = %{version}
 Requires:       protobuf-devel
@@ -36,13 +37,19 @@ the Android framework since 4.0 (Ice Cream Sandwich).
 %setup -q -n libphonenumber
 
 %build
-cmake -DCMAKE_SKIP_RPATH=ON -DCMAKE_INSTALL_PREFIX=%{_prefix} cpp
+cmake -DCMAKE_SKIP_RPATH=ON -DCMAKE_INSTALL_PREFIX=%{_prefix} -DCMAKE_INSTALL_LIBDIR=%{_libdir} cpp
 
-%{__make} %{?jobs:-j%jobs}
+# Parallel builds are broken and/or not supported by upstream, don't
+# use them. The generated Makefile lacks the geocoding_data.cc ->
+# generate_geocoding_data dependency and thus code generator may still
+# be producing the file when the C++ compiler is already parsing it.
+%{__make}
 
 %install
 %{__make} DESTDIR=%{buildroot} install
 rm %{buildroot}/%{_libdir}/*.a
+# Exported header has dependency on lock_posix.h but lock_posix.h is not installed.
+cp cpp/src/phonenumbers/base/synchronization/lock_posix.h %{buildroot}/%{_includedir}/phonenumbers/base/synchronization/
 
 %post   -n libphonenumber -p /sbin/ldconfig
 
@@ -53,14 +60,11 @@ rm %{buildroot}/%{_libdir}/*.a
 %defattr(-, root, root, -)
 %doc AUTHORS
 %license LICENSE
-%{_libdir}/libphonenumber.so.5
-%{_libdir}/libphonenumber.so.5.3
-%{_libdir}/libgeocoding.so.5
-%{_libdir}/libgeocoding.so.5.3
+%{_libdir}/libphonenumber.so.*
+%{_libdir}/libgeocoding.so.*
 
 %files devel
 %defattr(-, root, root, -)
 %{_includedir}/phonenumbers
-%{_includedir}/base
 %{_libdir}/libphonenumber.so
 %{_libdir}/libgeocoding.so