avatar
mikhailnov has added f0381cf1bc
Compatibility with %%find_lang --with-kde --with-html from RPM 5
view file @ f0381cf1bc
... ... --- /dev/null
... ... +++ b/0001-ROSA-fix-KF5_HTML-directory.patch
... ... @@ -0,0 +1,39 @@
1
From 2b9ce51cb375d8e67b32e4357290370bcc0d9028 Mon Sep 17 00:00:00 2001
2
From: Mikhail Novosyolov <m.novosyolov@rosalinux.ru>
3
Date: Sun, 5 Jan 2020 14:42:53 +0300
4
Subject: [PATCH] ROSA: fix KF5_HTML directory
5
6
If kf5-config is not installed, use hardcoded value of KF5_HTML,
7
otherwise query kf5-config.
8
9
kf5-config belongs to package kdelibs4support which is not installed
10
in a typical KF5 build environment.
11
BuildRequiring it just for one variable does not make sense.
12
That variable was hardcoded in RPM 5.
13
It is not a good practice, but I do not see any better solutions.
14
15
[root@rosa-2019 ~]# kf5-config --expandvars --install html
16
/usr/share/doc5/HTML/
17
---
18
 scripts/find-lang.sh | 5 ++++-
19
 1 file changed, 4 insertions(+), 1 deletion(-)
20
21
diff --git a/scripts/find-lang.sh b/scripts/find-lang.sh
22
index 1542a43fb..18bd14338 100755
23
--- a/scripts/find-lang.sh
24
+++ b/scripts/find-lang.sh
25
@@ -209,7 +209,10 @@ s:%lang(C) ::
26
 /^$/d' >> $MO_NAME
27
 fi
28
 
29
-KF5_HTML=`kf5-config --expandvars --install html 2>/dev/null`
30
+if command -v kf5-config > /dev/null 2>&1
31
+	then KF5_HTML="$(kf5-config --expandvars --install html 2>/dev/null)"
32
+	else KF5_HTML="/usr/share/doc5/HTML/"
33
+fi
34
 if [ x"$KF5_HTML" != x ] && [ -d "$TOP_DIR$KF5_HTML" ]; then
35
 find "$TOP_DIR$KF5_HTML" -type d|sed '
36
 s:'"$TOP_DIR"'::
37
-- 
38
2.17.1
39
... ... --- a/rpm.spec
... ... +++ b/rpm.spec
... ... @@ -98,7 +98,7 @@ Version: 4.15.1
98 98
%if "%{snapver}" != ""
99 99
Release:	0.%{snapver}.1
100 100
%else
101
Release:	0.2
101
Release:	0.3
102 102
%endif
103 103
Group:		System/Configuration/Packaging
104 104
Url:		http://www.rpm.org/
... ... @@ -248,6 +248,8 @@ Patch6007: riscv64-optflags.patch
248 248
Patch10001:	10001-HACK-Detect-and-disable-DistEpoch-in-EVR-comparison.patch
249 249
Patch10002:	10002-HACK-Skip-all-triggers-that-start-with-a-file-path-.patch
250 250
251
# Compatibility with %%find_lang --with-kde --with-html from RPM 5
252
Patch10003:	0001-ROSA-fix-KF5_HTML-directory.patch
251 253
252 254
# Partially GPL/LGPL dual-licensed and some bits with BSD
253 255
# SourceLicense: (GPLv2+ and LGPLv2+ with exceptions) and BSD

Comments