Skip to main content
ALT Linux Bugzilla
– Attachment 22995 Details for
Bug 61649
Собрать Java-библиотеку libphonenumber в отдельный подпакет
New bug
|
Search
|
[?]
|
Help
Register
|
Log In
[x]
|
Forgot Password
Login:
[x]
|
EN
|
RU
[patch]
Патч spec-файла для сборки Java-подпакетов, версия 2
0001-Package-the-libphonenumber-Java-modules-v2.patch (text/plain), 4.68 KB, created by
Ajrat Makhmutov
on 2026-11-24 18:56:39 MSK
(
hide
)
Description:
Патч spec-файла для сборки Java-подпакетов, версия 2
Filename:
MIME Type:
Creator:
Ajrat Makhmutov
Created:
2026-11-24 18:56:39 MSK
Size:
4.68 KB
patch
obsolete
>From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 >From: Ivan Khanas <xeno@altlinux.org> >Date: Tue, 24 Nov 2026 17:43:49 +0300 >Subject: [PATCH] Package the libphonenumber Java modules > >Build the upstream Java reactor with the system JDK and XMvn so offline >Maven builds can use libphonenumber from Sisyphus. Package the main JAR, >the parent POM and the no-metadata classifier together. Split the carrier, >geocoder, prefix mapper and Javadoc into noarch subpackages. > >Keep the Java tests enabled. Skip the demo and Central publishing >extension, and use XMvn for Javadoc. The Animal Sniffer executions need >a Java 5 signature unavailable in Sisyphus. >--- > libphonenumber.spec | 95 +++++++++++++++++++++++++++++++++++++++++++++++++++++ > 1 file changed, 95 insertions(+) > >diff --git a/libphonenumber.spec b/libphonenumber.spec >index 94c6eee..ea98a02 100644 >--- a/libphonenumber.spec >+++ b/libphonenumber.spec >@@ -1,6 +1,7 @@ > %define sover 9 > %def_enable boost > %def_enable check >+%def_enable java > > %define stdxx 17 > >@@ -32,6 +33,15 @@ BuildRequires: libprotobuf-devel > BuildRequires: libabseil-cpp-devel >= 20211102.0-alt3 > BuildRequires: /proc /dev/pts /usr/bin/java > #BuildRequires: /usr/bin/mvn junit mockito >+%if_enabled java >+BuildRequires(pre): rpm-macros-java >+BuildRequires: java-21-openjdk-devel >+BuildRequires: maven-local >+BuildRequires: mvn(junit:junit) >+BuildRequires: mvn(org.apache.felix:maven-bundle-plugin) >+BuildRequires: mvn(org.apache.maven.plugins:maven-javadoc-plugin) >+BuildRequires: mvn(org.mockito:mockito-core) >+%endif > %{?_enable_boost:BuildRequires: boost-devel} > %{?_enable_check:BuildRequires: ctest libgtest-devel} > >@@ -49,6 +59,48 @@ Requires: %name = %EVR > The %name-devel package contains libraries and header files for > developing applications that use %name. > >+%if_enabled java >+%package java >+Summary: Java library for international phone numbers >+Group: Development/Java >+BuildArch: noarch >+ >+%description java >+Google's Java library for parsing, formatting and validating phone numbers. >+ >+%package java-prefixmapper >+Summary: Phone number prefix mappings for libphonenumber >+Group: Development/Java >+BuildArch: noarch >+ >+%description java-prefixmapper >+Shared prefix lookups for carrier mapping and offline geocoding. >+ >+%package java-carrier >+Summary: Phone number carrier mapping for libphonenumber >+Group: Development/Java >+BuildArch: noarch >+ >+%description java-carrier >+Looks up the original carrier associated with a phone number prefix. >+ >+%package java-geocoder >+Summary: Offline phone number geocoder for libphonenumber >+Group: Development/Java >+BuildArch: noarch >+ >+%description java-geocoder >+Looks up a geographic description for a phone number. >+ >+%package java-javadoc >+Summary: API documentation for the libphonenumber Java libraries >+Group: Development/Documentation >+BuildArch: noarch >+ >+%description java-javadoc >+API documentation for the libphonenumber Java libraries. >+%endif >+ > %prep > %setup -n %name-%version/cpp > %patch1 -b .link >@@ -60,6 +112,18 @@ developing applications that use %name. > sed -i 's/-Werror/-Wno-error/g' {,../tools/cpp/}CMakeLists.txt > %endif > >+%if_enabled java >+pushd ../java >+%pom_disable_module demo >+%pom_remove_plugin org.sonatype.central:central-publishing-maven-plugin >+%pom_remove_plugin :maven-source-plugin >+%pom_remove_plugin :maven-javadoc-plugin >+# The Animal Sniffer check requires an unavailable Java 5 signature. >+%pom_remove_plugin org.codehaus.mojo:animal-sniffer-maven-plugin \ >+ carrier geocoder internal/prefixmapper libphonenumber >+popd >+%endif >+ > %build > # since abseil-cpp-20260107.1 > %add_optflags -Wno-error=deprecated-declarations >@@ -72,9 +136,27 @@ sed -i 's/-Werror/-Wno-error/g' {,../tools/cpp/}CMakeLists.txt > %nil > %cmake_build > >+%if_enabled java >+pushd ../java >+%mvn_package :libphonenumber-parent java >+%mvn_package :libphonenumber java >+%mvn_package :libphonenumber:jar:no-metadata java >+%mvn_package :prefixmapper java-prefixmapper >+%mvn_package :carrier java-carrier >+%mvn_package :geocoder java-geocoder >+%mvn_build -s >+popd >+%endif >+ > %install > %cmake_install > >+%if_enabled java >+pushd ../java >+%mvn_install >+popd >+%endif >+ > %check > %cmake_build -t tests > >@@ -89,6 +171,19 @@ sed -i 's/-Werror/-Wno-error/g' {,../tools/cpp/}CMakeLists.txt > %_libdir/%name.so > %_libdir/cmake/%name/ > >+%if_enabled java >+%files java -f ../java/.mfiles-java >+%doc ../LICENSE >+ >+%files java-prefixmapper -f ../java/.mfiles-java-prefixmapper >+ >+%files java-carrier -f ../java/.mfiles-java-carrier >+ >+%files java-geocoder -f ../java/.mfiles-java-geocoder >+ >+%files java-javadoc -f ../java/.mfiles-javadoc >+%endif >+ > %changelog > * Wed Nov 18 2026 Yuri N. Sedunov <aris@altlinux.org> 9.0.44-alt1 > - 9.0.44 > >base-commit: 9f3c68ca9296d5e602d1b3e26b91efcb586c4a40
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 61649
:
22993
| 22995