Commit 1b74ee77 authored by Guillaume BIENKOWSKI's avatar Guillaume BIENKOWSKI

Progress commit on rpm builder / deb builder for Debian

parent a82a9f49
#Detect Redhat or Debian platform
# The following variable will be set
# $PLATFORM Debian Redhat none
# $BIT_MODE 32|64
if ( NOT WINDOWS )
if (${CMAKE_SYSTEM_PROCESSOR} MATCHES i386|i586|i686)
set ( BIT_MODE "32")
else ()
set ( BIT_MODE "64")
endif ()
if(EXISTS "/etc/debian_version")
set ( PLATFORM "Debian")
endif(EXISTS "/etc/debian_version")
if(EXISTS "/etc/redhat-release")
set ( PLATFORM "Redhat")
endif(EXISTS "/etc/redhat-release")
endif ( NOT WINDOWS )
......@@ -34,4 +34,8 @@ fi
cd @ep_build@
# TODO rpmbuild -ba @ep_build@/@LINPHONE_BUILDER_SPEC_FILE@ --define "_topdir $RPM_TOPDIR" $SPEC_PREFIX --with bc $VERBOSE @ep_redirect_to_file@
rpmbuild -ba @ep_build@/@LINPHONE_BUILDER_SPEC_FILE@ --define "_topdir $RPM_TOPDIR" @LINPHONE_BUILDER_RPMBUILD_OPTIONS@ $VERBOSE @ep_redirect_to_file@
rpmbuild -ba @ep_build@/@LINPHONE_BUILDER_SPEC_FILE@ \
--define "_topdir $RPM_TOPDIR" \
@LINPHONE_BUILDER_RPMBUILD_GLOBAL_OPTION@ \
@LINPHONE_BUILDER_RPMBUILD_OPTIONS@ \
$VERBOSE @ep_redirect_to_file@
......@@ -22,8 +22,11 @@ export PKG_CONFIG_LIBDIR="@LINPHONE_BUILDER_PKG_CONFIG_LIBDIR@"
export RPM_TOPDIR="@LINPHONE_BUILDER_WORK_DIR@/rpmbuild"
# cd @ep_build@
# make V=@AUTOTOOLS_VERBOSE_MAKEFILE@ @ep_install_target@ @ep_redirect_to_file@
find "$RPM_TOPDIR/RPMS" -name "*@LINPHONE_BUILDER_RPMBUILD_NAME@*.rpm" -exec sudo rpm -ivh --force {} +
#sudo rpm -ivh WORK/rpmbuild/RPMS/x86_64/*.rpm --force
\ No newline at end of file
if [[ "@PLATFORM@" -eq "Debian" ]]; then
cd "$RPM_TOPDIR/RPMS"
find "$RPM_TOPDIR/RPMS" -name "*@LINPHONE_BUILDER_RPMBUILD_NAME@*.rpm" -exec fakeroot alien -d {} +
find "$RPM_TOPDIR/RPMS" -name "*@LINPHONE_BUILDER_RPMBUILD_NAME@*.deb" -exec sudo dpkg -i {} +
else
find "$RPM_TOPDIR/RPMS" -name "*@LINPHONE_BUILDER_RPMBUILD_NAME@*.rpm" -exec sudo rpm -ivh --force {} +
#sudo rpm -ivh WORK/rpmbuild/RPMS/x86_64/*.rpm --force
fi
......@@ -21,6 +21,7 @@
############################################################################
include(GNUInstallDirs)
include(${CMAKE_SOURCE_DIR}/cmake/FindLinuxPlatform.cmake)
# Define default values for the linphone builder options
set(DEFAULT_VALUE_ENABLE_VIDEO OFF)
......@@ -94,3 +95,10 @@ set(EP_unixodbc_RPMBUILD_OPTIONS "--with bc")
set(EP_myodbc_RPMBUILD_OPTIONS "--with bc")
set(EP_sofiasip_RPMBUILD_OPTIONS "--with bc --without glib")
set(EP_flexisip_RPMBUILD_OPTIONS "--with bc --without transcoder --without protobuf --without boostlog")
message( STATUS "PLATFORM is ${PLATFORM}")
message( STATUS "SYSTEM is ${CMAKE_SYSTEM}")
if(PLATFORM STREQUAL "Debian")
set(LINPHONE_BUILDER_RPMBUILD_GLOBAL_OPTION "--nodeps")
endif()
\ No newline at end of file
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