]> granicus.if.org Git - icinga2/commitdiff
Use VERSION instead of icinga2.spec 6202/head
authorMichael Friedrich <michael.friedrich@icinga.com>
Thu, 5 Apr 2018 14:41:10 +0000 (16:41 +0200)
committerMichael Friedrich <michael.friedrich@icinga.com>
Thu, 5 Apr 2018 14:59:57 +0000 (16:59 +0200)
CMakeLists.txt
INSTALL.md
RELEASE.md
VERSION [new file with mode: 0644]
icinga2.spec [deleted file]

index 248f867307fbce2ac27a6bbe8d784bab0ca4dfc1..56b095af8fb7487b96b3ceac8fb5be67e73ab305 100644 (file)
@@ -42,7 +42,7 @@ option (USE_SYSTEMD
 
 set(HAVE_SYSTEMD ${USE_SYSTEMD})
 
-file(STRINGS icinga2.spec VERSION_LINE REGEX "^Version: ")
+file(STRINGS VERSION VERSION_LINE REGEX "^Version: ")
 string(REPLACE "Version: " "" ICINGA2_VERSION ${VERSION_LINE})
 
 include(GNUInstallDirs)
@@ -72,7 +72,7 @@ file(READ "${CMAKE_CURRENT_SOURCE_DIR}/COPYING.Exceptions" ICINGA2_LICENSE_ADDIT
 set(ICINGA2_LICENSE "${ICINGA2_LICENSE_GPL}\n\n---\n\n${ICINGA2_LICENSE_ADDITIONS}")
 file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/LICENSE.txt" ${ICINGA2_LICENSE})
 
-file(STRINGS icinga2.spec SPEC_VERSION REGEX "^Version:")
+file(STRINGS VERSION SPEC_VERSION REGEX "^Version:")
 string(LENGTH "${SPEC_VERSION}" SPEC_VERSION_LENGTH)
 math(EXPR SPEC_VERSION_LENGTH "${SPEC_VERSION_LENGTH} - 9")
 string(SUBSTRING ${SPEC_VERSION} 9 ${SPEC_VERSION_LENGTH} SPEC_VERSION)
@@ -85,10 +85,10 @@ if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/icinga-version.h.force)
   configure_file(icinga-version.h.force ${CMAKE_CURRENT_BINARY_DIR}/icinga-version.h COPYONLY)
 else()
   if(NOT ICINGA2_GIT_VERSION_INFO OR GIT_VERSION MATCHES "-NOTFOUND$")
-    file(STRINGS icinga2.spec SPEC_REVISION REGEX "^%define revision ")
+    file(STRINGS VERSION SPEC_REVISION REGEX "^Revision: ")
     string(LENGTH "${SPEC_REVISION}" SPEC_REVISION_LENGTH)
-    math(EXPR SPEC_REVISION_LENGTH "${SPEC_REVISION_LENGTH} - 17")
-    string(SUBSTRING ${SPEC_REVISION} 17 ${SPEC_REVISION_LENGTH} SPEC_REVISION)
+    math(EXPR SPEC_REVISION_LENGTH "${SPEC_REVISION_LENGTH} - 10")
+    string(SUBSTRING ${SPEC_REVISION} 10 ${SPEC_REVISION_LENGTH} SPEC_REVISION)
 
     set(GIT_VERSION "r${SPEC_VERSION}-${SPEC_REVISION}")
   endif()
index c7b5db363335cee8f5cb5fbdf0c501a67c0c3a6c..6c3b9aa0b1d116d10776d4784dec30383b838dc2 100644 (file)
@@ -188,7 +188,7 @@ See [FindMySQL.cmake](third-party/cmake/FindPostgreSQL.cmake) for the implementa
 
 CMake determines the Icinga 2 version number using `git describe` if the
 source directory is contained in a Git repository. Otherwise the version number
-is extracted from the [icinga2.spec](icinga2.spec) file. This behavior can be
+is extracted from the [VERSION](VERSION) file. This behavior can be
 overridden by creating a file called `icinga-version.h.force` in the source
 directory. Alternatively the `-DICINGA2_GIT_VERSION_INFO=OFF` option for CMake
 can be used to disable the usage of `git describe`.
@@ -232,7 +232,7 @@ rpmdev-setuptree
 
 Copy the icinga2.spec file to `rpmbuild/SPEC` or fetch the latest version:
 ```
-curl https://raw.githubusercontent.com/Icinga/icinga2/master/icinga2.spec -o $HOME/rpmbuild/SPECS/icinga2.spec
+curl https://raw.githubusercontent.com/Icinga/rpm-icinga2/master/icinga2.spec -o $HOME/rpmbuild/SPECS/icinga2.spec
 ```
 
 Copy the tarball to `rpmbuild/SOURCES` e.g. by using the `spectool` binary
index 9cfb6d638c7d42cee4c86d4925553d46fd038dc8..70b02f9e491d622e0ce7012f875b6d64b9ca790c 100644 (file)
@@ -29,7 +29,7 @@ git log --use-mailmap | grep '^Author:' | cut -f2- -d' ' | sort | uniq > AUTHORS
 Update the version in the spec file:
 
 ```
-gsed -i "s/Version: .*/Version: $VERSION/g" icinga2.spec
+gsed -i "s/Version: .*/Version: $VERSION/g" VERSION
 ```
 
 ## Changelog
diff --git a/VERSION b/VERSION
new file mode 100644 (file)
index 0000000..ca98ab6
--- /dev/null
+++ b/VERSION
@@ -0,0 +1,2 @@
+Version: 2.8.2
+Revision: 1
diff --git a/icinga2.spec b/icinga2.spec
deleted file mode 100644 (file)
index 0580aa4..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-#/******************************************************************************
-# * Icinga 2                                                                   *
-# * Copyright (C) 2012-2018 Icinga Development Team (https://www.icinga.com/)  *
-# *                                                                            *
-# * This program is free software; you can redistribute it and/or              *
-# * modify it under the terms of the GNU General Public License                *
-# * as published by the Free Software Foundation; either version 2             *
-# * of the License, or (at your option) any later version.                     *
-# *                                                                            *
-# * This program is distributed in the hope that it will be useful,            *
-# * but WITHOUT ANY WARRANTY; without even the implied warranty of             *
-# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the              *
-# * GNU General Public License for more details.                               *
-# *                                                                            *
-# * You should have received a copy of the GNU General Public License          *
-# * along with this program; if not, write to the Free Software Foundation     *
-# * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.             *
-# ******************************************************************************/
-
-# The spec file was moved to https://github.com/Icinga/icinga-packaging
-
-%define revision 1
-Version: 2.8.2