Commit 2baaa1ae authored by Ghislain MARY's avatar Ghislain MARY

Improve RPM packaging.

parent 673c6a41
......@@ -40,13 +40,13 @@ set(CPACK_SOURCE_IGNORE_FILES
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}")
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})
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/rpm/liblinphone.spec.in ${CMAKE_CURRENT_SOURCE_DIR}/../liblinphone.spec)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/rpm/liblinphone.spec.cmake ${CMAKE_CURRENT_SOURCE_DIR}/../liblinphone.spec)
include(CPack)
......@@ -15,18 +15,21 @@
%define _docdir %{_datadir}/doc
%define build_number @PROJECT_VERSION_BUILD@
%if %{build_number}
%define build_number_ext -%{build_number}
%endif
Name: %{pkg_name}
Version: @PROJECT_VERSION@
Release: %build_number%{?dist}
Release: %{build_number}%{?dist}
Summary: Phone anywhere in the whole world by using the Internet
Group: Applications/Communications
License: GPL
URL: http://www.linphone.org
Source0: %{name}-%{version}-%{build_number}.tar.gz
Source0: %{name}-%{version}%{?build_number_ext}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
%description
liblinphone is the voip sdk used by Linphone
......@@ -52,10 +55,10 @@ develop programs using the liblinphone library.
%endif
%prep
%setup -n %{name}-%{version}-%build_number
%setup -n %{name}-%{version}%{?build_number_ext}
%build
%{expand:%%%cmake_name} . -DCMAKE_INSTALL_LIBDIR:PATH=%{_libdir} -DCMAKE_PREFIX_PATH:PATH=%{_prefix} -DENABLE_VIDEO=%{video}
%{expand:%%%cmake_name} . -DCMAKE_INSTALL_LIBDIR:PATH=%{_libdir} -DCMAKE_PREFIX_PATH:PATH=%{_prefix} -DENABLE_VIDEO=%{video} -DENABLE_TOOLS=NO -DENABLE_CONSOLE_UI=NO -DENABLE_DAEMON=NO
make %{?_smp_mflags}
%install
......
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