summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorent Le Coz <louiz@louiz.org>2016-01-22 00:47:24 +0100
committerFlorent Le Coz <louiz@louiz.org>2016-01-21 16:53:29 +0100
commitae7c54f3737b3646edfa5c4d4d7fd553aa296da6 (patch)
tree77836e4e0353fd21b90182e58c2d0bae35dd2f0a
parent0c85ed128a650aa4dde7d919b4165162225a818f (diff)
downloadbiboumi-ae7c54f3737b3646edfa5c4d4d7fd553aa296da6.tar.gz
biboumi-ae7c54f3737b3646edfa5c4d4d7fd553aa296da6.tar.bz2
biboumi-ae7c54f3737b3646edfa5c4d4d7fd553aa296da6.tar.xz
biboumi-ae7c54f3737b3646edfa5c4d4d7fd553aa296da6.zip
Spec file becomes a template, auto filled with the date and version
-rw-r--r--CMakeLists.txt9
-rw-r--r--packaging/biboumi.spec.cmake (renamed from packaging/biboumi.spec)9
2 files changed, 15 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7e356c9..167415e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -24,8 +24,11 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/cmake/Mo
## Get the software version
#
set(ARCHIVE_NAME ${CMAKE_PROJECT_NAME}-${${PROJECT_NAME}_VERSION_MAJOR}.${${PROJECT_NAME}_VERSION_MINOR})
+set(RPM_VERSION ${${PROJECT_NAME}_VERSION_MAJOR}.${${PROJECT_NAME}_VERSION_MINOR})
+
if(${PROJECT_NAME}_VERSION_SUFFIX MATCHES ".+")
set(ARCHIVE_NAME ${ARCHIVE_NAME}${${PROJECT_NAME}_VERSION_SUFFIX})
+ set(RPM_VERSION ${RPM_VERSION}${${PROJECT_NAME}_VERSION_SUFFIX})
endif()
if(${PROJECT_NAME}_VERSION_SUFFIX MATCHES "^~dev$")
@@ -39,6 +42,7 @@ if(${PROJECT_NAME}_VERSION_SUFFIX MATCHES "^~dev$")
if(GIT_REVISION)
set(${PROJECT_NAME}_VERSION_SUFFIX "${${PROJECT_NAME}_VERSION_SUFFIX} (${GIT_REVISION})")
set(ARCHIVE_NAME ${ARCHIVE_NAME}${GIT_REVISION})
+ set(RPM_VERSION ${RPM_VERSION}${GIT_REVISION})
endif()
endif()
endif()
@@ -251,3 +255,8 @@ else()
set(WATCHDOG_SEC "")
endif()
configure_file(unit/biboumi.service.cmake biboumi.service)
+
+execute_process(COMMAND "date" "+%a %b %d %Y" OUTPUT_VARIABLE RPM_DATE
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
+
+configure_file(packaging/biboumi.spec.cmake biboumi.spec)
diff --git a/packaging/biboumi.spec b/packaging/biboumi.spec.cmake
index 5c3afb4..633a168 100644
--- a/packaging/biboumi.spec
+++ b/packaging/biboumi.spec.cmake
@@ -1,5 +1,5 @@
Name: biboumi
-Version: 2.0
+Version: ${RPM_VERSION}
Release: 1%{?dist}
Summary: Lightweight XMPP to IRC gateway
@@ -62,6 +62,9 @@ make check %{?_smp_mflags}
%changelog
+* ${RPM_DATE} Le Coz Florent <louiz@louiz.org> - ${RPM_VERSION}-1
+- Build latest git revision
+
* Wed Jan 13 2016 Le Coz Florent <louiz@louiz.org> - 2.0-2
- Do not install the systemd unit and configuration files, because
“make install” does it itself now
@@ -69,12 +72,12 @@ make check %{?_smp_mflags}
* Fri May 29 2015 Le Coz Florent <louiz@louiz.org> - 2.0-1
- Update to 2.0 sources
-* Wed Nov 13 2014 Le Coz Florent <louiz@louiz.org> - 1.1-2
+* Thu Nov 13 2014 Le Coz Florent <louiz@louiz.org> - 1.1-2
- Use the -DWITH(OUT) cmake flags for all optional dependencies
- Build with the correct optflags
- Use hardened_build
-* Wed Aug 18 2014 Le Coz Florent <louiz@louiz.org> - 1.1-1
+* Mon Aug 18 2014 Le Coz Florent <louiz@louiz.org> - 1.1-1
- Update to 1.1 release
* Wed Jun 25 2014 Le Coz Florent <louiz@louiz.org> - 1.0-1