Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37803377
en ru br
Репозитории ALT

Группа :: Система/Библиотеки
Пакет: libphonenumber

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

%define sover 8
%def_enable check

%define stdxx 17

Name: libphonenumber
Version: 8.13.22
Release: alt1

Summary: Library to handle international phone numbers
License: Apache-2.0 and BSD-3-Clause and MIT
Group: System/Libraries
Url: https://github.com/google/libphonenumber

Vcs: https://github.com/google/libphonenumber.git
Source: %url/archive/v%version/%name-%version.tar.gz
# link libgeocoding against libphonenumber
Patch1: %name-8.13.4-alt-link.patch

BuildRequires(pre): rpm-macros-cmake
BuildRequires: cmake gcc-c++
BuildRequires: boost-devel
BuildRequires: libicu-devel
BuildRequires: protobuf-compiler
BuildRequires: libprotobuf-devel
# required libabseil-cpp built with -DCMAKE_POSITION_INDEPENDENT_CODE=ON
BuildRequires: libabseil-cpp-devel >= 20211102.0-alt3
BuildRequires: /usr/bin/java /proc
%{?_enable_check:BuildRequires: ctest libgtest-devel}

%description
Google's common C++ library for parsing, formatting, storing and validating
international phone numbers.

%package devel
Summary: Development files for %name
Group: Development/C++
Requires: %name = %EVR

%description devel
The %name-devel package contains libraries and header files for
developing applications that use %name.

%prep
%setup -n %name-%version/cpp
%patch1 -b .link

# gtest > 1.13 requires >= C++14

sed -i 's|\(CMAKE_CXX_STANDARD \)11|\1%stdxx|' ../tools/cpp/CMakeLists.txt

%build
# libabseil compiled with -std=gnu++17
%cmake \
   -DCMAKE_CXX_STANDARD=%stdxx \
   %{?_disable_check:-DBUILD_TESTING=OFF} \
   -DBUILD_SHARED_LIBS=ON
%nil
%cmake_build

%install
%cmake_install
rm -f %buildroot%_libdir/*.a

%check
%cmake_build -t tests

%files
%_libdir/%name.so.%{sover}*
%_libdir/libgeocoding.so.%{sover}*
%doc README

%files devel
%_includedir/phonenumbers/
%_libdir/libgeocoding.so
%_libdir/%name.so
%_libdir/cmake/%name/

%changelog

Полный changelog можно просмотреть здесь

 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin