1
0
mirror of https://github.com/strawberrymusicplayer/strawberry synced 2024-12-17 19:18:36 +01:00

Add openmandriva support to rpm spec

This commit is contained in:
Jonas Kvinge 2022-01-15 02:53:46 +01:00
parent fbd2993239
commit 1aad85a4f9
2 changed files with 15 additions and 6 deletions

View File

@ -12,10 +12,17 @@ if (LSB_RELEASE_EXEC AND RPMBUILD_EXEC)
OUTPUT_VARIABLE DIST_RELEASE
OUTPUT_STRIP_TRAILING_WHITESPACE
)
execute_process(COMMAND /bin/sh "-c" "${LSB_RELEASE_EXEC} -ds | tr '[:upper:]' '[:lower:]' | sed 's/\"//g' | sed 's/\\.//g' | cut -d' ' -f3"
OUTPUT_VARIABLE DIST_VERSION
OUTPUT_STRIP_TRAILING_WHITESPACE
)
if (${DIST_NAME} STREQUAL "openmandrivalinux")
execute_process(COMMAND /bin/sh "-c" "${LSB_RELEASE_EXEC} -ds | tr '[:upper:]' '[:lower:]' | sed 's/\"//g' | sed 's/\\./0/g' | cut -d' ' -f3"
OUTPUT_VARIABLE DIST_VERSION
OUTPUT_STRIP_TRAILING_WHITESPACE
)
else()
execute_process(COMMAND /bin/sh "-c" "${LSB_RELEASE_EXEC} -ds | tr '[:upper:]' '[:lower:]' | sed 's/\"//g' | sed 's/\\.//g' | cut -d' ' -f3"
OUTPUT_VARIABLE DIST_VERSION
OUTPUT_STRIP_TRAILING_WHITESPACE
)
endif()
if (DIST_NAME)
message(STATUS "Distro Name: ${DIST_NAME}")
@ -44,6 +51,8 @@ if (LSB_RELEASE_EXEC AND RPMBUILD_EXEC)
set(RPM_DISTRO "el${DIST_VERSION}")
elseif (${DIST_NAME} STREQUAL "mageia" AND DIST_RELEASE)
set(RPM_DISTRO "mga${DIST_RELEASE}")
elseif (${DIST_NAME} STREQUAL "openmandrivalinux" AND DIST_VERSION)
set(RPM_DISTRO "omv${DIST_VERSION}")
endif()
if(NOT RPM_DISTRO)

View File

@ -138,7 +138,7 @@ Features:
export CXXFLAGS="-fPIC $RPM_OPT_FLAGS"
%endif
%{cmake} -DQT_VERSION_MAJOR=@QT_VERSION_MAJOR@
%if 0%{?centos} || (0%{?mageia} && 0%{?mageia} <= 7)
%if 0%{?centos} || (0%{?mageia} && 0%{?mageia} <= 7) || "%{?_vendor}" == "openmandriva"
%make_build
%else
%cmake_build
@ -148,7 +148,7 @@ Features:
%if 0%{?centos}
%make_install
%else
%if 0%{?mageia}
%if 0%{?mageia} || "%{?_vendor}" == "openmandriva"
%make_install -C build
%else
%cmake_install