From: Jakub Bogusz Date: Wed, 29 Apr 2020 15:22:04 +0000 (+0200) Subject: - new X-Git-Tag: auto/th/libphonenumber-8.12.2-1 X-Git-Url: http://git.pld-linux.org/gitweb.cgi?a=commitdiff_plain;h=874379c9b6b94932ec6e5408512112c194628084;p=packages%2Flibphonenumber.git - new - link patch to fix internal linking --- 874379c9b6b94932ec6e5408512112c194628084 diff --git a/libphonenumber-link.patch b/libphonenumber-link.patch new file mode 100644 index 0000000..241ee8f --- /dev/null +++ b/libphonenumber-link.patch @@ -0,0 +1,11 @@ +--- libphonenumber-8.12.2/cpp/CMakeLists.txt.orig 2020-04-22 12:05:08.000000000 +0200 ++++ libphonenumber-8.12.2/cpp/CMakeLists.txt 2020-04-29 06:39:39.838900132 +0200 +@@ -442,7 +442,7 @@ + # Note that the subset of base/ on which the geocoder relies is implemented + # on top of Boost header-only libraries (e.g. scoped_ptr.hpp). + target_link_libraries (geocoding ${LIBRARY_DEPS}) +- target_link_libraries (geocoding-shared ${LIBRARY_DEPS}) ++ target_link_libraries (geocoding-shared phonenumber-shared ${LIBRARY_DEPS}) + endif () + + # Build a specific library for testing purposes. diff --git a/libphonenumber.spec b/libphonenumber.spec new file mode 100644 index 0000000..ec34ad0 --- /dev/null +++ b/libphonenumber.spec @@ -0,0 +1,111 @@ +# TODO: java package +# +# Conditional build: +%bcond_with re2 # RE2 regular expressions engine (broken as of 8.12.2) +%bcond_without static_libs # static libraries +# +Summary: Library to handle international phone numbers +Summary(pl.UTF-8): Biblioteka do obsługi międzynarodowych numerów telefonów +Name: libphonenumber +Version: 8.12.2 +Release: 1 +License: Apache v2.0 with BSD parts +Group: Libraries +#Source0Download: https://github.com/google/libphonenumber/releases/ +Source0: https://github.com/google/libphonenumber/archive/v%{version}/%{name}-%{version}.tar.gz +# Source0-md5: 0924eb4ca6e9b00e9111d44e01284e66 +Patch0: %{name}-link.patch +URL: https://github.com/google/libphonenumber/ +BuildRequires: boost-devel >= 1.40.0 +BuildRequires: cmake >= 2.8.5 +BuildRequires: gtest-devel +BuildRequires: jre +BuildRequires: libicu-devel >= 4.4 +BuildRequires: libstdc++-devel +BuildRequires: pkgconfig +BuildRequires: protobuf-devel >= 2.4 +%{?with_re2:BuildRequires: re2-devel} +BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) + +%description +Google's common C++ library for parsing, formatting, storing and +validating international phone numbers. + +%description -l pl.UTF-8 +Wspólna biblioteka C++ Google'a do analizy, formatowania, +przechowywania oraz sprawdzania poprawności międzynarodowych numerów +telefonów. + +%package devel +Summary: Header files for libphonenumber library +Summary(pl.UTF-8): Pliki nagłówkowe biblioteki libphonenumber +Group: Development/Libraries +Requires: %{name} = %{version}-%{release} +Requires: boost-devel >= 1.40.0 +Requires: libicu-devel +Requires: libstdc++-devel +Requires: protobuf-devel + +%description devel +Header files for libphonenumber library. + +%description devel -l pl.UTF-8 +Pliki nagłówkowe biblioteki libphonenumber. + +%package static +Summary: Static libphonenumber libraries +Summary(pl.UTF-8): Statyczne biblioteki libphonenumber +Group: Development/Libraries +Requires: %{name}-devel = %{version}-%{release} + +%description static +Static libphonenumber libraries. + +%description static -l pl.UTF-8 +Statyczne biblioteki libphonenumber. + +%prep +%setup -q +%patch0 -p1 + +%build +install -d build/cpp +cd build/cpp +%cmake ../../cpp \ + %{!?with_static_libs:-DBUILD_STATIC_LIB=OFF} \ + %{?with_re2:-DUSE_RE2=ON} + +%{__make} + +%install +rm -rf $RPM_BUILD_ROOT + +%{__make} -C build/cpp install \ + DESTDIR=$RPM_BUILD_ROOT + +%clean +rm -rf $RPM_BUILD_ROOT + +%post -p /sbin/ldconfig +%postun -p /sbin/ldconfig + +%files +%defattr(644,root,root,755) +%doc AUTHORS CONTRIBUTORS FALSEHOODS.md FAQ.md LICENSE.Chromium README.md release_notes.txt cpp/{LICENSE,README} +%attr(755,root,root) %{_libdir}/libgeocoding.so.*.* +%attr(755,root,root) %ghost %{_libdir}/libgeocoding.so.8 +%attr(755,root,root) %{_libdir}/libphonenumber.so.*.* +%attr(755,root,root) %ghost %{_libdir}/libphonenumber.so.8 + +%files devel +%defattr(644,root,root,755) +%attr(755,root,root) %{_libdir}/libgeocoding.so +%attr(755,root,root) %{_libdir}/libphonenumber.so +%{_includedir}/phonenumbers + +%if %{with static_libs} +%files static +%defattr(644,root,root,755) +%{_libdir}/libgeocoding.a +%{_libdir}/libphonenumber.a +%endif