Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
BC
public
belr
Commits
f1af9155
Commit
f1af9155
authored
Nov 07, 2019
by
François Grisez
Browse files
Use BcTooblox macros for source archive generation and change the project version into 4.3.0
parent
fc884829
Changes
3
Hide whitespace changes
Inline
Side-by-side
CMakeLists.txt
View file @
f1af9155
############################################################################
# CMakeLists.txt
# Copyright (C) 201
5
Belledonne Communications, Grenoble France
# Copyright (C) 201
0-2019
Belledonne Communications, Grenoble France
#
############################################################################
#
...
...
@@ -20,8 +20,8 @@
#
############################################################################
cmake_minimum_required
(
VERSION 3.1
)
project
(
BELR VERSION
1.0
.0 LANGUAGES C CXX
)
cmake_minimum_required
(
VERSION 3.1
1
)
# we need CMake 3.11 for defining 'package_source' target as custom target
project
(
BELR VERSION
4.3
.0 LANGUAGES C CXX
)
set
(
BELR_SO_VERSION
"1"
)
...
...
build/CMakeLists.txt
View file @
f1af9155
############################################################################
# CMakeLists.txt
# Copyright (C) 201
7
-201
8
Belledonne Communications, Grenoble France
# Copyright (C) 201
0
-201
9
Belledonne Communications, Grenoble France
#
############################################################################
#
...
...
@@ -22,32 +22,11 @@
if
(
NOT CPACK_PACKAGE_NAME
)
set
(
CPACK_PACKAGE_NAME
"belr"
)
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
}
)
endif
()
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/belr.spec.cmake"
"
${
PROJECT_SOURCE_DIR
}
/belr.spec"
)
include
(
CPack
)
bc_make_package_source_target
()
build/rpm/belr.spec.cmake
View file @
f1af9155
...
...
@@ -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,22 +10,16 @@
%define _datadir %{_datarootdir}
%define _docdir %{_datadir}/doc
%define build_number @PROJECT_VERSION_BUILD@
%if %{build_number}
%define build_number_ext -%{build_number}
%endif
Name: @CPACK_PACKAGE_NAME@
Version:
@PROJECT
_VERSION
@
Release:
%{build_number
}%{?dist}
Version:
${
RPM
_VERSION
}
Release:
${
RPM_RELEASE
}
%{?dist}
Summary: Belr is language recognition library for ABNF based protocols.
Group: Applications/Communications
License: GPL
URL: http://www.linphone.org
Source0: %{
name}-%{version}%{?build_number_ext
}.tar.gz
Source0: %{
package_name
}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
Requires: %{pkg_prefix}bctoolbox
...
...
@@ -59,7 +54,7 @@ Libraries and headers required to develop software with belr
%custom_debug_package
%prep
%setup -n %{
name}-%{version}%{?build_number_ext
}
%setup -n %{
package_name
}
%build
%{expand:%%%cmake_name} . -DCMAKE_BUILD_TYPE=@CMAKE_BUILD_TYPE@ -DCMAKE_PREFIX_PATH:PATH=%{_prefix} @RPM_ALL_CMAKE_OPTIONS@
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment