Commit 63c94375 authored by François Grisez's avatar François Grisez

Use BcTooblox macros for source archive generation and change the project version into 4.3.0

parent b7bc5416
# CMakeLists.txt
# Copyright (C) 2014 Belledonne Communications, Grenoble France
# Copyright (C) 2010-2019 Belledonne Communications, Grenoble France
#
############################################################################
#
......@@ -21,8 +21,8 @@
############################################################################
cmake_minimum_required(VERSION 3.1)
project(belle-sip VERSION 1.7.0 LANGUAGES C CXX)
cmake_minimum_required(VERSION 3.11) # we need CMake 3.11 for defining 'package_source' target as custom target
project(belle-sip VERSION 4.3.0 LANGUAGES C CXX)
......
############################################################################
# CMakeLists.txt
# Copyright (C) 2017-2018 Belledonne Communications, Grenoble France
# Copyright (C) 2010-2019 Belledonne Communications, Grenoble France
#
############################################################################
#
......@@ -24,30 +24,9 @@ if(NOT CPACK_PACKAGE_NAME)
set(CPACK_PACKAGE_NAME "belle-sip")
ENDIF()
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/../LICENSE.txt")
set(CPACK_PACKAGE_VERSION_MAJOR ${PROJECT_VERSION_MAJOR})
set(CPACK_PACKAGE_VERSION_MINOR ${PROJECT_VERSION_MINOR})
set(CPACK_PACKAGE_VERSION_PATCH ${PROJECT_VERSION_PATCH})
set(CPACK_PACKAGE_FILE_NAME ${CPACK_PACKAGE_NAME}-${PROJECT_VERSION})
set(CPACK_SOURCE_GENERATOR "TGZ")
set(CPACK_SOURCE_IGNORE_FILES
"${CMAKE_BINARY_DIR}"
"^${PROJECT_SOURCE_DIR}/.git*"
)
bc_project_build_version(${PROJECT_VERSION} PROJECT_VERSION_BUILD)
if(PROJECT_VERSION_BUILD)
set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_FILE_NAME}-${PROJECT_VERSION_BUILD}")
endif()
message("-- Package file name is ${CPACK_PACKAGE_FILE_NAME}" )
set(CPACK_SOURCE_PACKAGE_FILE_NAME ${CPACK_PACKAGE_FILE_NAME})
bc_generate_rpm_specfile("rpm/belle-sip.spec.cmake" "${PROJECT_SOURCE_DIR}/belle-sip.spec")
include(CPack)
bc_make_package_source_target()
......@@ -2,6 +2,7 @@
%define _prefix @CMAKE_INSTALL_PREFIX@
%define pkg_prefix @BC_PACKAGE_NAME_PREFIX@
%define package_name @CPACK_PACKAGE_NAME@-${FULL_VERSION}
# re-define some directories for older RPMBuild versions which don't. This messes up the doc/ dir
# taken from https://fedoraproject.org/wiki/Packaging:RPMMacros?rd=Packaging/RPMMacros
......@@ -9,19 +10,16 @@
%define _datadir %{_datarootdir}
%define _docdir %{_datadir}/doc
%define build_number @PROJECT_VERSION_BUILD@
Name: @CPACK_PACKAGE_NAME@
Version: @PROJECT_VERSION@
Release: %build_number%{?dist}
Version: ${RPM_VERSION}
Release: ${RPM_RELEASE}%{?dist}
Summary: Linphone's sip stack
Group: Applications/Communications
License: GPL
URL: http://www.belle-sip.org
Source0: %{name}-%{version}.tar.gz
Source0: %{package_name}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
Requires: %{pkg_prefix}bctoolbox
......@@ -51,7 +49,7 @@ Libraries and headers required to develop software with belle-sip
%custom_debug_package
%prep
%setup -n %{name}-%{version}
%setup -n %{package_name}
%build
%{expand:%%%cmake_name} . -DCMAKE_BUILD_TYPE=@CMAKE_BUILD_TYPE@ -DCMAKE_PREFIX_PATH:PATH=%{_prefix} @RPM_ALL_CMAKE_OPTIONS@
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment