File tree 2 files changed +25
-1
lines changed
2 files changed +25
-1
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,30 @@ math(EXPR PROJECT_LETTER_VERSION "97+${PROJECT_VERSION_PATCH}")
12
12
string (ASCII "${PROJECT_LETTER_VERSION} " PROJECT_LETTER_VERSION)
13
13
set (PROJECT_VERSION "${PROJECT_VERSION_MAJOR} .${PROJECT_VERSION_MINOR}${PROJECT_LETTER_VERSION} " )
14
14
15
+ ####
16
+ # rpkg version
17
+
18
+ function (smf_dsp_update_rpkg_version SPEC LEAD FOLLOW)
19
+ file (READ "${SPEC} " text)
20
+ set (expr "((^|\n |\r )Version[ \t ]*:[ \t ]*)[^\n\r ]*" )
21
+ string (REGEX MATCH "${expr} " match "${text} " )
22
+ if (match STREQUAL "" )
23
+ message (FATAL_ERROR "The spec file does not have a \" Version\" field." )
24
+ endif ()
25
+ string (REGEX REPLACE
26
+ "${expr} " "\\ 1{{{ git_dir_version lead=\" ${LEAD} \" follow=\" ${FOLLOW} \" }}}"
27
+ new_text "${text} " )
28
+ if (NOT text STREQUAL new_text)
29
+ file (WRITE "${SPEC} " "${new_text} " )
30
+ endif ()
31
+ endfunction ()
32
+
33
+ smf_dsp_update_rpkg_version(
34
+ "${PROJECT_SOURCE_DIR} /smf-dsp.rpkg.spec"
35
+ "${PROJECT_VERSION_MAJOR} .${PROJECT_VERSION_MINOR} "
36
+ "${PROJECT_VERSION_PATCH} " )
37
+
38
+ ###
15
39
set (CMAKE_CXX_STANDARD "14" )
16
40
set (CMAKE_POSITION_INDEPENDENT_CODE ON )
17
41
Original file line number Diff line number Diff line change 1
1
Name: {{{ git_dir_name }}}
2
2
3
- Version: {{{ git_dir_version }}}
3
+ Version: {{{ git_dir_version lead = "0.10" follow = "0" }}}
4
4
5
5
Release: 1%{?dist }
6
6
You can’t perform that action at this time.
0 commit comments