Skip to main content
ALT Linux Bugzilla
– Attachment 22993 Details for
Bug 61649
Собрать Java-библиотеку libphonenumber в отдельный подпакет
New bug
|
Search
|
[?]
|
Help
Register
|
Log In
[x]
|
Forgot Password
Login:
[x]
|
EN
|
RU
[patch]
Патч spec'а для сборки
0001-Package-the-libphonenumber-Java-modules.patch (text/plain), 4.56 KB, created by
Ajrat Makhmutov
on 2026-11-24 18:06:31 MSK
(
hide
)
Description:
Патч spec'а для сборки
Filename:
MIME Type:
Creator:
Ajrat Makhmutov
Created:
2026-11-24 18:06:31 MSK
Size:
4.56 KB
patch
obsolete
>From 7e18b10c4a753c1c64200e98049c0cca5bccec87 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 | 85 +++++++++++++++++++++++++++++++++++++++++++-- > 1 file changed, 83 insertions(+), 2 deletions(-) > >diff --git a/libphonenumber.spec b/libphonenumber.spec >index 94c6eee..6370caa 100644 >--- a/libphonenumber.spec >+++ b/libphonenumber.spec >@@ -30,8 +30,14 @@ BuildRequires: protobuf-compiler > BuildRequires: libprotobuf-devel > # required libabseil-cpp built with -DCMAKE_POSITION_INDEPENDENT_CODE=ON > BuildRequires: libabseil-cpp-devel >= 20211102.0-alt3 >-BuildRequires: /proc /dev/pts /usr/bin/java >-#BuildRequires: /usr/bin/mvn junit mockito >+BuildRequires: /proc /dev/pts >+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) > %{?_enable_boost:BuildRequires: boost-devel} > %{?_enable_check:BuildRequires: ctest libgtest-devel} > >@@ -49,6 +55,46 @@ Requires: %name = %EVR > The %name-devel package contains libraries and header files for > developing applications that use %name. > >+%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. >+ > %prep > %setup -n %name-%version/cpp > %patch1 -b .link >@@ -60,6 +106,16 @@ developing applications that use %name. > sed -i 's/-Werror/-Wno-error/g' {,../tools/cpp/}CMakeLists.txt > %endif > >+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 >+ > %build > # since abseil-cpp-20260107.1 > %add_optflags -Wno-error=deprecated-declarations >@@ -72,9 +128,23 @@ sed -i 's/-Werror/-Wno-error/g' {,../tools/cpp/}CMakeLists.txt > %nil > %cmake_build > >+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 >+ > %install > %cmake_install > >+pushd ../java >+%mvn_install >+popd >+ > %check > %cmake_build -t tests > >@@ -89,6 +159,17 @@ sed -i 's/-Werror/-Wno-error/g' {,../tools/cpp/}CMakeLists.txt > %_libdir/%name.so > %_libdir/cmake/%name/ > >+%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 >+ > %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