avatar
mikhailnov has added 60b2098a6c
Fix _ in %%mklibname
view file @ 60b2098a6c
... ... --- /dev/null
... ... +++ b/0518-Fix-mklibname.patch
... ... @@ -0,0 +1,31 @@
1
From e4104099a9a75024adfc265fd87b0db07bbdb640 Mon Sep 17 00:00:00 2001
2
From: Mikhail Novosyolov <m.novosyolov@rosalinux.ru>
3
Date: Sat, 6 Jun 2020 15:55:32 +0300
4
Subject: [PATCH] Fix %mklibname
5
6
Old macro produced incorrect names:
7
"%mklibname xorg-x11" resulted to "lib64xorg-x11_"
8
Trailing _ is not correct.
9
10
This patch tries to preserve compatibility with usages of %mklibame macro where "_"
11
is not written manually, but to avoid trailing _ or double __ when _ is written manually.
12
---
13
 user/openmandriva/macros | 2 +-
14
 1 file changed, 1 insertion(+), 1 deletion(-)
15
16
diff --git a/user/openmandriva/macros b/user/openmandriva/macros
17
index d4992a5..bde8a92 100644
18
--- a/user/openmandriva/macros
19
+++ b/user/openmandriva/macros
20
@@ -94,7 +94,7 @@ Provides:	%{1} = %{?2}%{!?2:%{EVRD}} \
21
 # - %{mklibname test}               => lib64test, on a lib64 platform
22
 # - %{mklibname test 1 -d}      => libtest1-devel
23
 # - %{mklibname test 1 -d 0 -s} => libtest1_0-static-devel
24
-%mklibname(ds)  %{_lib}%{1}%{!-d:%(if echo %{1} |rev |cut -b1 |grep -q '[0-9]'; then echo -n _; fi)}%{?2:%{2}}%{?3:_%{3}}%{-s:-static}%{-d:-devel}
25
+%mklibname(ds) %(echo "%{_lib}%{1}%{!-d:%(if echo %{1} | rev | cut -b1 | grep -q '[0-9]'; then echo -n _; fi)}%{?2:%{2}}%{?3:_%{3}}%{-s:-static}%{-d:-devel}" | sed -e 's,__,_,g' -e 's,_$,,g')
26
 
27
 #==============================================================================
28
 # ---- compiler flags.
29
-- 
30
2.25.1
31
view file @ 60b2098a6c
... ... --- a/rpm-openmandriva-setup.spec
... ... +++ b/rpm-openmandriva-setup.spec
... ... @@ -9,7 +9,7 @@
9 9
Summary:	Macros and scripts for OpenMandriva specific rpm behavior
10 10
Name:		rpm-openmandriva-setup
11 11
Version:	0.4.1
12
Release:	7
12
Release:	8
13 13
License:	MIT
14 14
Group:		System/Configuration/Packaging
15 15
Url:		https://github.com/OpenMandrivaSoftware/rpm-openmandriva-setup
... ... @@ -64,6 +64,8 @@ Patch0515: 0515-Remove-extra-space-from-optflags-2.patch
64 64
Patch0516:	0516-Restore-ability-to-define-LDFLAGS-via-defining-ldfla.patch
65 65
# Add %%pypi_source macro
66 66
Patch0517:	0517-Add-pypi_source-from-Fedora.patch
67
# https://github.com/OpenMandrivaSoftware/rpm-openmandriva-setup/pull/6
68
Patch0518:	0518-Fix-mklibname.patch
67 69
# ROSA branding change
68 70
Patch1000:	1000-OMA-to-ROSA.patch
69 71
# remove default python link

Comments