Projects
Multimedia
obs-studio
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 6
View file
obs-studio.spec
Changed
@@ -7,6 +7,8 @@ License: GPL-2.0 URL: https://obsproject.com/ Source: %{name}-%{version}.tar.xz +# PATCH-FIX-OPENSUSE obs-studio-allow-OBS_VERSION-to-be-set.patch jimmy@boombatower.com -- Allow OBS_VERSION to be set to assist in packaging. +Patch0: obs-studio-allow-OBS_VERSION-to-be-set.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-build BuildRequires: cmake @@ -39,6 +41,7 @@ %prep %setup -q +%patch0 -p1 %build mkdir -p build && cd build
View file
obs-studio-allow-OBS_VERSION-to-be-set.patch
Added
@@ -0,0 +1,45 @@ +From 0245e3b43ed3c48871522cd7720b78673415ddb8 Mon Sep 17 00:00:00 2001 +From: Jimmy Berry <jimmy@boombatower.com> +Date: Fri, 30 Jan 2015 14:04:54 -0600 +Subject: [PATCH] Allow OBS_VERSION to be set to assist in packaging. + +--- + cmake/Modules/ObsCpack.cmake | 20 +++++++++++++------- + 1 file changed, 13 insertions(+), 7 deletions(-) + +diff --git a/cmake/Modules/ObsCpack.cmake b/cmake/Modules/ObsCpack.cmake +index cb5e85a..6de6019 100644 +--- a/cmake/Modules/ObsCpack.cmake ++++ b/cmake/Modules/ObsCpack.cmake +@@ -14,15 +14,21 @@ set(CPACK_PACKAGE_VERSION_MINOR "0") + set(CPACK_PACKAGE_VERSION_PATCH "1") + set(CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}") + +-if(EXISTS "${CMAKE_SOURCE_DIR}/.git") +- execute_process(COMMAND git describe --always --tags --dirty=-modified +- OUTPUT_VARIABLE OBS_VERSION +- WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}" +- OUTPUT_STRIP_TRAILING_WHITESPACE) +-else() +- set(OBS_VERSION "${CPACK_PACKAGE_VERSION}") ++if(NOT DEFINED OBS_VERSION) ++ if(EXISTS "${CMAKE_SOURCE_DIR}/.git") ++ execute_process(COMMAND git describe --always --tags --dirty=-modified ++ OUTPUT_VARIABLE OBS_VERSION ++ WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}" ++ OUTPUT_STRIP_TRAILING_WHITESPACE) ++ endif() ++ ++ # Fallback to static version when git is either not available or fails. ++ if("${OBS_VERSION}" STREQUAL "") ++ set(OBS_VERSION "${CPACK_PACKAGE_VERSION}") ++ endif() + endif() + ++MESSAGE(STATUS "OBS_VERSION: ${OBS_VERSION}") + + if(INSTALLER_RUN) + set(CPACK_PACKAGE_EXECUTABLES +-- +2.1.4 +
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.