Commit cd63a051 authored by Matthieu Tanon's avatar Matthieu Tanon

Merge branch 'master' into dev_lime_v2

parents cd4c45fb 26600085
############################################################################
# CMakeLists.txt
# Copyright (C) 2014 Belledonne Communications, Grenoble France
# Copyright (C) 2014-2018 Belledonne Communications, Grenoble France
#
############################################################################
#
......@@ -32,13 +32,13 @@ set(LINPHONE_BUILDER_TARGET "linphone" CACHE STRING "Target to build.")
set(LINPHONE_BUILDER_PREBUILT_URL "" CACHE STRING "URL to download some prebuilt dependencies.")
option(LINPHONE_BUILDER_LATEST "Build latest versions (from git)." NO)
option(LINPHONE_BUILDER_CHECK_LASTEST "Check that the git revisions are the latest ones." NO)
option(LINPHONE_BUILDER_BUILD_DEPENDENCIES "Build the dependencies instead of using the system libraries." YES)
set(LINPHONE_BUILDER_EXTERNAL_SOURCE_PATH "" CACHE PATH "External path to source code that is available.")
set(LINPHONE_BUILDER_DUMMY_LIBRARIES "" CACHE STRING "Dummy libraries to be generated.")
option(LINPHONE_BUILDER_USE_SYSTEM_DEPENDENCIES "Use system dependencies." NO)
option(LINPHONE_BUILDER_GROUP_EXTERNAL_SOURCE_PATH_BUILDERS "Group external source path builders in a single external project." NO)
set(LINPHONE_BUILDER_EXTERNAL_BUILDERS_PATH "" CACHE PATH "Path to external builders.")
set(LINPHONE_BUILDER_SIGNING_IDENTITY "" CACHE STRING "Signing identity used for code signing on Mac OS X")
option(LINPHONE_BUILDER_ENABLE_RPM_PACKAGING "Enable RPM packaging." NO)
# Include macros definition to be used by builders
......
# LIBLINPHONE SDK FOR BLACKBERRY 10 USING LINPHONE CMAKE BUILDER #
## BUILD PREREQUISITES
The common prerequisites listed in the README file are requested to build the
liblinphone SDK for BlackBerry 10.
You will also need to install the BlackBerry 10 native SDK (Momentics IDE). You
can get it from http://developer.blackberry.com/native/downloads/
/!\ The Blackberry SDK MUST BE at the root of the user home directory and named bbndk /!\
Note that building the liblinphone SDK for BlackBerry 10 requires to be
building on a Linux or Mac OS X computer.
## BUILDING THE SDK
Run the following command after having setup the build prerequisites:
$ ./prepare.py bb10-arm
$ make -C WORK/bb10-arm/cmake
You can add -l to prepare.py script to build using latest sources (might be unstable).
You also can add -d to prepary.py script to build a debug sdk.
If everything is succesful (and after a few minutes) you will find the SDK
folder in the OUTPUT directory.
It contains the header files, the built libraries and the resource files
for ARM or i486 (simulator) architectures needed to build a project based on
linphone.
## OTHER COMMANDS
You can clean the build tree (without deleting the downloaded source code) by
running:
$ ./prepare.py -c bb10-arm
You can clean everything (including the downloaded source code) by running:
$ ./prepare.py -C bb10-arm
# LINPHONE DESKTOP (GTK2) #
## BUILD PREREQUISITES
The common prerequisites listed in the README.md file are requested to build
linphone for desktop.
You will also need to install some additional tools needed during the build
process. On linux, you can generally get them from your distribution. On Mac OS
X, you can get them from MacPorts or Brew. On Windows you will need to download
and install them manually. Here are these tools:
- A C and C++ compiler. On Windows you will need any version of Visual Studio
beginning from the 2008 version.
- Python 2.7.x. On windows, add c:\Python27\Scripts in the PATH.
- Java
- awk (automatically installed when building on Windows)
- sed (automatically installed when building on Windows)
- patch (automatically installed when building on Windows)
- yasm (automatically installed when building on Windows)
- xxd (only for Linux and Mac OS X)
- pkg-config (automatically installed when building on Windows)
- intltoolize (automatically installed when building on Windows)
- doxygen
- dot (graphviz)
- MinGw (only on Windows): Follow the instructions at
http://mingw.org/wiki/Getting_Started
On windows, append the following to your PATH if not the case:
C:\Program Files (x86)\GnuWin32\bin
C:\MinGW\bin
C:\Python27\Scripts
C:\Program Files (x86)\Graphviz2.38
## BUILDING ON LINUX AND MAC OS X
$ ./prepare.py desktop
$ make -C WORK/desktop/cmake
## BUILDING ON WINDOWS
> python prepare.py desktop
Then open the WORK\desktop\cmake\Project.sln Visual Studio solution and build
using the Release configuration.
You can specify the Visual Studio version to be used to build, eg.:
> python prepare.py desktop -G "Visual Studio 12 2013"
# FLEXISIP DEB AND RPM FILES #
## BUILD PREREQUISITES
The common prerequisites listed in the README.md file are needed.
Note that building flexisip packages requires to be building on a Linux host.
### Redhat / RPM-based
sudo yum install @development-tools speex-devel \
hiredis-devel libtool-ltdl-devel libiodbc-devel
make build-flexisip-rpm
### Debian
To be able to build Flexisip debs on a Debian machine, you will have to install
all of these (plus the usual compilation tools):
sudo aptitude install cmake rpm libmysqlclient-dev libmysql++-dev \
libmysqld-dev libssl-dev bison doxygen
sudo aptitude install alien fakeroot libhiredis-dev
make build-flexisip
# LIBLINPHONE SDK FOR IOS #
The Linphone CMake Builder is used to build liblinphone for iOS but is not to
be used directly by the user.
To build for iOS, clone the git://git.linphone.org/linphone-iphone.git
repository and follow the instructions in the README.md file located there.
# LINPHONE CMAKE BUILDER #
Linphone CMake builder is a structure based on CMake to build linphone and
flexisip on various platforms.
## BUILD PREREQUISITES
The common prerequisites to use linphone-cmake-builder are:
- to intall CMake >= 3.0 (available in the package systems of Linux
distributions, in MacPorts for Mac OS X (http://www.macports.org/) and/or from
http://cmake.org/
- to install git (available in the package systems of Linux distributions, in
MacPorts for Mac OS X (http://www.macports.org/) and/or from http://cmake.org/
- on Windows, you also need 7-zip to generate SDK packages
(http://www.7-zip.org/)
## AVAILABLE BUILD TARGETS
The following targets are supported:
- Linphone for desktop platforms - see README.desktop.md
- Liblinphone Python extension module - see README.python.md
- Liblinphone Python extension module for Raspberry PI
- Flexisip and dependencies - see README.flexisip.md
- Linphone for iOS - see README.ios.md
## GETTING HELP ON BUILD OPTIONS WHATEVER THE BUILD TARGET IS
$ ./prepare.py --help
## OpenH264 support
OpenH264 support is enabled in all generated installers and SDK archive.
However, the OpenH264 runtime library must be downloaded directly from
Cisco's website to be complient with H264 patents. In the case of linphone
for desktop, it is automatically done by the Windows and MacOS X installers.
In the case of SDKs of liblinphone and mediastreamer, you must manualy
download the OpenH264 archive and extract it in the "bin" directory of the SDK
distribution and rename the DLL file into "openh264.dll".
The patent-free OpenH264 runtime library archive is available at
http://ciscobinary.openh264.org/openh264-1.4.0-win32msvc.dll.bz2
# LIBLINPHONE PYTHON EXTENSION MODULE #
## BUILD PREREQUISITES
The common prerequisites listed in the README.md file are requested to build
the liblinphone Python extension module.
You will also need to install some additional tools needed during the build
process. On linux, you can generally get them from your distribution. On Mac OS
X, you can get them from MacPorts or Brew. On Windows you will need to download
and install them manually. Here are these tools:
- A C and C++ compiler. On Windows you will need Visual Studio 2008 as it is
the version used by Python.
- Python 2.7.x, with 'pip' command. On windows, add c:\Python27\Scripts in the
PATH.
- Java
- awk (automatically installed when building on Windows)
- sed (automatically installed when building on Windows)
- patch (automatically installed when building on Windows)
- yasm (automatically installed when building on Windows)
- xxd (only for Linux and Mac OS X)
- pkg-config (automatically installed when building on Windows)
- intltoolize (automatically installed when building on Windows)
- doxygen
- dot (graphviz)
- pystache (install with pip install pystache in terminal)
- wheel (install with pip install wheel in terminal)
- MinGw (only on Windows): Follow the instructions at
http://mingw.org/wiki/Getting_Started
On windows, append the following to your PATH if not the case:
C:\Program Files (x86)\GnuWin32\bin
C:\MinGW\bin
C:\Python27\Scripts
C:\Program Files (x86)\Graphviz2.38
Once done, within the system's shell (unix terminal, windows cmd), place into
the root of linphone-cmake-builder project and run the following commands:
## BUILDING THE SDK ON LINUX AND MAC OS X
$ ./prepare.py python
$ make -C WORK/python/cmake
If everything is successful (and after a few minutes) you will find the Python
wheel package of the liblinphone Python extension module in the OUTPUT
directory.
## BUILDING THE SDK ON WINDOWS
Run the following command in Windows command prompt after having setup the
build prerequisites:
> python prepare.py python
Then open the WORK\python\cmake\Project.sln Visual Studio solution and build
using the Release configuration.
If everything is successful (and after a few minutes) you will find the Python
wheel package and installers of the liblinphone Python extension module in the
OUTPUT directory.
......@@ -25,4 +25,5 @@ lcb_git_tag_latest("master")
lcb_git_tag("1.0.2")
lcb_external_source_paths("bcg729")
lcb_groupable(YES)
lcb_sanitizable(YES)
lcb_package_source(YES)
############################################################################
# bctoolbox.cmake
# Copyright (C) 2014 Belledonne Communications, Grenoble France
# Copyright (C) 2014-2018 Belledonne Communications, Grenoble France
#
############################################################################
#
......@@ -25,21 +25,20 @@ lcb_git_tag_latest("master")
lcb_git_tag("master")
lcb_external_source_paths("bctoolbox")
lcb_groupable(YES)
lcb_sanitizable(YES)
lcb_package_source(YES)
lcb_spec_file("bctoolbox.spec")
if(LINPHONE_BUILDER_BUILD_DEPENDENCIES)
if(ENABLE_MBEDTLS)
lcb_dependencies("mbedtls")
elseif(ENABLE_POLARSSL)
lcb_dependencies("polarssl")
endif()
if(ENABLE_UNIT_TESTS)
lcb_dependencies("bcunit")
endif()
if(ENABLE_LIME_X3DH)
lcb_dependencies("decaf")
endif()
if(ENABLE_MBEDTLS)
lcb_dependencies("mbedtls")
elseif(ENABLE_POLARSSL)
lcb_dependencies("polarssl")
endif()
if(ENABLE_UNIT_TESTS)
lcb_dependencies("bcunit")
endif()
if(ENABLE_LIME_X3DH)
lcb_dependencies("decaf")
endif()
lcb_cmake_options(
......
......@@ -26,6 +26,7 @@ lcb_git_tag("0a0a9c60f5a1b899ae26b705fa5224ef25377982")
lcb_external_source_paths("bcunit")
lcb_ignore_warnings(YES)
lcb_package_source(YES)
lcb_spec_file("bcunit.spec")
lcb_cmake_options(
"-DENABLE_AUTOMATED=YES"
......
############################################################################
# belcard.cmake
# Copyright (C) 2015 Belledonne Communications, Grenoble France
# Copyright (C) 2015-2018 Belledonne Communications, Grenoble France
#
############################################################################
#
......@@ -25,6 +25,13 @@ lcb_git_tag_latest("master")
lcb_git_tag("master")
lcb_external_source_paths("belcard")
lcb_groupable(YES)
lcb_sanitizable(YES)
lcb_package_source(YES)
lcb_spec_file("belcard.spec")
lcb_dependencies("bctoolbox" "belr")
lcb_cmake_options(
"-DENABLE_UNIT_TESTS=${ENABLE_UNIT_TESTS}"
)
lcb_dependencies("bctoolbox" "belr")
\ No newline at end of file
############################################################################
# bellesip.cmake
# Copyright (C) 2014 Belledonne Communications, Grenoble France
# Copyright (C) 2014-2018 Belledonne Communications, Grenoble France
#
############################################################################
#
......@@ -25,6 +25,7 @@ lcb_git_tag_latest("master")
lcb_git_tag("1.5.3")
lcb_external_source_paths("belle-sip")
lcb_groupable(YES)
lcb_sanitizable(YES)
lcb_package_source(YES)
lcb_spec_file("belle-sip.spec")
lcb_rpmbuild_name("belle-sip")
......@@ -34,10 +35,8 @@ if(ENABLE_TUNNEL)
lcb_dependencies("tunnel")
endif()
if(LINPHONE_BUILDER_BUILD_DEPENDENCIES)
if(NOT APPLE AND NOT ANDROID AND NOT QNX)
lcb_dependencies("zlib")
endif()
if(NOT APPLE AND NOT ANDROID AND NOT QNX)
lcb_dependencies("zlib")
endif()
lcb_cmake_options(
......
......@@ -25,6 +25,7 @@ lcb_git_tag_latest("master")
lcb_git_tag("master")
lcb_external_source_paths("belr")
lcb_groupable(YES)
lcb_sanitizable(YES)
lcb_package_source(YES)
lcb_spec_file("belr.spec")
......
############################################################################
# bv16.cmake
# Copyright (C) 2014 Belledonne Communications, Grenoble France
# Copyright (C) 2014-2018 Belledonne Communications, Grenoble France
#
############################################################################
#
......@@ -24,3 +24,4 @@ lcb_git_repository("git://git.linphone.org/bv16-floatingpoint.git")
lcb_git_tag_latest("linphone")
lcb_git_tag("6899f2759c7b19d5402335d3a937c53020abfeca")
lcb_external_source_paths("externals/bv16-floatingpoint")
lcb_spec_file("bv16.spec")
############################################################################
# bzrtp.cmake
# Copyright (C) 2014 Belledonne Communications, Grenoble France
# Copyright (C) 2014-2018 Belledonne Communications, Grenoble France
#
############################################################################
#
......@@ -25,17 +25,17 @@ lcb_git_tag_latest("master")
lcb_git_tag("1.0.4")
lcb_external_source_paths("bzrtp")
lcb_groupable(YES)
lcb_sanitizable(YES)
lcb_package_source(YES)
lcb_spec_file("bzrtp.spec")
lcb_dependencies("bctoolbox")
if(LINPHONE_BUILDER_BUILD_DEPENDENCIES)
if(NOT APPLE)
# Do not build xml2 neither sqlite3 on Apple systems (Mac OS X and iOS), they are provided by the system
lcb_dependencies("xml2" "sqlite3")
endif()
if(ENABLE_UNIT_TESTS)
lcb_dependencies("bcunit")
endif()
if(NOT APPLE)
# Do not build xml2 neither sqlite3 on Apple systems (Mac OS X and iOS), they are provided by the system
lcb_dependencies("xml2" "sqlite3")
endif()
if(ENABLE_UNIT_TESTS)
lcb_dependencies("bcunit")
endif()
if(MINGW)
lcb_extra_cppflags("-D__USE_MINGW_ANSI_STDIO")
......
......@@ -25,10 +25,8 @@ lcb_git_tag_latest("master")
lcb_git_tag("cc4e47496600e9b1d3d412ce6e887275c204334b")
lcb_external_source_paths("<LINPHONE_BUILDER_TOP_DIR>")
lcb_groupable(YES)
lcb_sanitizable(YES)
if(ENABLE_PRESENCE)
lcb_rpmbuild_name("flexisip-presence")
endif()
lcb_spec_file("flexisip.spec")
lcb_dependencies("sofiasip")
if(ENABLE_CONFERENCE)
......@@ -51,8 +49,7 @@ endif()
lcb_cmake_options(
"-DENABLE_TRANSCODER=${ENABLE_TRANSCODER}"
"-DENABLE_ODB=${ENABLE_ODB}"
"-DENABLE_ODBC=${ENABLE_ODBC}"
"-DENABLE_ODBC=NO"
"-DENABLE_REDIS=${ENABLE_REDIS}"
"-DENABLE_SOCI=${ENABLE_SOCI}"
"-DENABLE_PUSHNOTIFICATION=${ENABLE_PUSHNOTIFICATION}"
......
############################################################################
# hiredis.cmake
# Copyright (C) 2015 Belledonne Communications, Grenoble France
# Copyright (C) 2015-2018 Belledonne Communications, Grenoble France
#
############################################################################
#
......@@ -22,12 +22,13 @@
lcb_git_repository("https://github.com/redis/hiredis.git")
lcb_external_source_paths("externals/hiredis")
lcb_patch_command("COMMAND" "${CMAKE_COMMAND}" "-E" "copy" "${CMAKE_CURRENT_SOURCE_DIR}/builders/hiredis/CMakeLists.txt" "<SOURCE_DIR>")
lcb_patch_command("COMMAND" "${CMAKE_COMMAND}" "-E" "make_directory" "<SOURCE_DIR>/build/")
lcb_patch_command("COMMAND" "${CMAKE_COMMAND}" "-E" "copy" "${CMAKE_CURRENT_SOURCE_DIR}/builders/hiredis/build/CMakeLists.txt" "<SOURCE_DIR>/build/")
lcb_package_source(YES)
lcb_spec_file("hiredis.spec")
lcb_dependencies(bctoolbox)
lcb_spec_file("hiredis.spec")
lcb_patch_command("COMMAND" "${CMAKE_COMMAND}" "-E" "copy" "${CMAKE_CURRENT_SOURCE_DIR}/builders/hiredis/CMakeLists.txt" "<SOURCE_DIR>")
lcb_patch_command("COMMAND" "${CMAKE_COMMAND}" "-E" "make_directory" "<SOURCE_DIR>/build/")
lcb_patch_command("COMMAND" "${CMAKE_COMMAND}" "-E" "copy" "${CMAKE_CURRENT_SOURCE_DIR}/builders/hiredis/build/CMakeLists.txt" "<SOURCE_DIR>/build/")
lcb_patch_command("COMMAND" "${CMAKE_COMMAND}" "-E" "copy" "${CMAKE_CURRENT_SOURCE_DIR}/builders/hiredis/build/hiredis.spec.cmake" "<SOURCE_DIR>/build/")
......@@ -46,7 +46,8 @@ 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}/hiredis.spec.cmake ${CMAKE_CURRENT_SOURCE_DIR}/../hiredis.spec)
bc_generate_rpm_specfile("hiredis.spec.cmake" "${PROJECT_SOURCE_DIR}/hiredis.spec")
include(CPack)
# -*- rpm-spec -*-
%define _prefix @CMAKE_INSTALL_PREFIX@
%define pkg_name %{?_with_bc:bc-hiredis}%{!?_with_bc:hiredis}
%{?_with_bc: %define _prefix /opt/belledonne-communications}
# 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
%define _datarootdir %{_prefix}/share
......@@ -13,7 +13,7 @@
%define build_number_ext -%{build_number}
%endif
Name: %{pkg_name}
Name: @CPACK_PACKAGE_NAME@
Version: @PROJECT_VERSION@
Release: %{build_number}%{?dist}
Summary: Minimalistic C client library for Redis
......@@ -40,11 +40,15 @@ developing applications that use %{name}.
%define ctest_name ctest
%endif
# This is for debian builds where debug_package has to be manually specified, whereas in centos it does not
%define custom_debug_package %{!?_enable_debug_packages:%debug_package}%{?_enable_debug_package:%{nil}}
%custom_debug_package
%prep
%setup -q -n %{name}-%{version}%{?build_number_ext}
%build
%{expand:%%%cmake_name} . -DCMAKE_INSTALL_LIBDIR:PATH=%{_libdir} -DCMAKE_PREFIX_PATH:PATH=%{_prefix}
%{expand:%%%cmake_name} . -DCMAKE_INSTALL_LIBDIR:PATH=%{_libdir} -DCMAKE_PREFIX_PATH:PATH=%{_prefix} @RPM_ALL_CMAKE_OPTIONS@
make %{?_smp_mflags}
%install
......@@ -59,13 +63,17 @@ rm -rf $RPM_BUILD_ROOT
%files
%doc COPYING
%{_libdir}/libhiredis.so.0.13
%{_libdir}/libhiredis.so.*
%files devel
%doc README.md
%{_includedir}/hiredis/
%if @ENABLE_STATIC@
%{_libdir}/libhiredis.a
%endif
%if @ENABLE_SHARED@
%{_libdir}/libhiredis.so
%endif
%changelog
* Wed Sep 16 2015 Sylvain Berfini <sylvain.berfini@belledonne-communications.com> - 0.13.3-1
......
############################################################################
# libodb.cmake
# Copyright (C) 2014 Belledonne Communications, Grenoble France
#
############################################################################
#
# 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 Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
############################################################################
set(libodb_filename "libodb-2.3.0.tar.bz2")
set(EP_libodb_URL "http://www.codesynthesis.com/download/odb/2.3/${libodb_filename}")
set(EP_libodb_URL_HASH "SHA1=eebc7fa706bc598a80439d1d6a798430fcfde23b")
set(EP_libodb_BUILD_METHOD "rpm")
set(EP_libodb_SPEC_FILE "libodb.spec" )
set(EP_libodb_CONFIG_H_FILE "${CMAKE_CURRENT_SOURCE_DIR}/builders/libodb/${EP_libodb_SPEC_FILE}" )
set(EP_libodb_DEPENDENCIES EP_odb)
#create source dir and copy the tar.gz inside
set(EP_libodb_PATCH_COMMAND "${CMAKE_COMMAND}" "-E" "make_directory" "${LINPHONE_BUILDER_WORK_DIR}/rpmbuild/SOURCES/")
set(EP_libodb_PATCH_COMMAND ${EP_libodb_PATCH_COMMAND} "COMMAND" "${CMAKE_COMMAND}" "-E" "copy" "${LINPHONE_BUILDER_WORK_DIR}/Download/EP_libodb/${libodb_filename}" "${LINPHONE_BUILDER_WORK_DIR}/rpmbuild/SOURCES/")
set(EP_libodb_PATCH_COMMAND ${EP_libodb_PATCH_COMMAND} "COMMAND" "${CMAKE_COMMAND}" "-E" "copy" ${EP_libodb_CONFIG_H_FILE} "<BINARY_DIR>")
Name: libodb
Version: 2.3.0
Release: 3%{?dist}
Summary: Common ODB runtime library from Code Synthesis
Group: System Environment/Libraries
License: GPLv2
URL: http://www.codesynthesis.com/products/odb/
Source0: http://www.codesynthesis.com/download/odb/2.3/%{name}-%{version}.tar.bz2
# Set BuildRoot for compatibility with EPEL <= 5
# See: http://fedoraproject.org/wiki/EPEL:Packaging#BuildRoot_tag
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
# Uses pkgconfig
BuildRequires: pkgconfig
%description
ODB is an object-relational mapping (ORM) system for C++. It provides
tools, APIs, and library support that allow you to persist C++ objects
to a relational database (RDBMS) without having to deal with tables,
columns, or SQL and without manually writing any of the mapping code.
This package contains the common ODB runtime library. Every application
that includes code generated by the ODB compiler will need to link to
this library.
%package devel
Summary: Development files for %{name}
Group: Development/Libraries
Requires: %{name}%{?_isa} = %{version}-%{release}
%description devel
The %{name}-devel package contains libraries and header files for
developing applications that use %{name}.
%prep
%setup -q
%build
%configure --disable-static
make %{?_smp_mflags}
%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT
find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';'
%clean
rm -rf $RPM_BUILD_ROOT
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
%doc GPLv2
%doc LICENSE
%{_libdir}/libodb-2.3.so
# Exclude the documentation that doesn't need to be packaged
%exclude %{_datadir}/doc/libodb/GPLv2
%exclude %{_datadir}/doc/libodb/LICENSE
%exclude %{_datadir}/doc/libodb/NEWS
%exclude %{_datadir}/doc/libodb/README
%exclude %{_datadir}/doc/libodb/version
%files devel
%doc NEWS
%{_includedir}/odb/
%{_libdir}/libodb.so
%{_libdir}/pkgconfig/libodb.pc
%changelog
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.3.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.3.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
* Mon Nov 4 2013 Dave Johansen <davejohansen@gmail.com> 2.3.0-1
- Updated to 2.3.0
* Tue Jul 23 2013 Dave Johansen <davejohansen@gmail.com> 2.2.3-1
- Initial build
############################################################################
# libodbmysql.cmake
# Copyright (C) 2014 Belledonne Communications, Grenoble France
#
############################################################################
#
# 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 Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
############################################################################
set(libodbmysql_filename "libodb-mysql-2.3.0.tar.bz2")
set(EP_libodbmysql_URL "http://www.codesynthesis.com/download/odb/2.3/${libodbmysql_filename}")
set(EP_libodbmysql_URL_HASH "SHA1=18adaa5535015e3471a5d205e44df42f0e3a3d37")
set(EP_libodbmysql_BUILD_METHOD "rpm")
set(EP_libodbmysql_SPEC_FILE "libodbmysql.spec" )
set(EP_libodbmysql_CONFIG_H_FILE "${CMAKE_CURRENT_SOURCE_DIR}/builders/libodbmysql/${EP_libodbmysql_SPEC_FILE}" )
set(EP_libodbmysql_DEPENDENCIES EP_libodb)
set(EP_libodbmysql_RPMBUILD_NAME "libodb-mysql")
#create source dir and copy the tar.gz inside
set(EP_libodbmysql_PATCH_COMMAND "${CMAKE_COMMAND}" "-E" "make_directory" "${LINPHONE_BUILDER_WORK_DIR}/rpmbuild/SOURCES/")
set(EP_libodbmysql_PATCH_COMMAND ${EP_libodbmysql_PATCH_COMMAND} "COMMAND" "${CMAKE_COMMAND}" "-E" "copy" "${LINPHONE_BUILDER_WORK_DIR}/Download/EP_libodbmysql/${libodbmysql_filename}" "${LINPHONE_BUILDER_WORK_DIR}/rpmbuild/SOURCES/")
set(EP_libodbmysql_PATCH_COMMAND ${EP_libodbmysql_PATCH_COMMAND} "COMMAND" "${CMAKE_COMMAND}" "-E" "copy" ${EP_libodbmysql_CONFIG_H_FILE} "<BINARY_DIR>")
Name: libodb-mysql
Version: 2.3.0
Release: 1%{?dist}
Summary: MySQL ODB runtime library from Code Synthesis
Group: System Environment/Libraries
License: GPLv2
URL: http://www.codesynthesis.com/products/odb/
Source0: http://www.codesynthesis.com/download/odb/2.3/%{name}-%{version}.tar.bz2
# Set BuildRoot for compatibility with EPEL <= 5
# See: http://fedoraproject.org/wiki/EPEL:Packaging#BuildRoot_tag
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
# Uses libodb from Code Synthesis
BuildRequires: libodb-devel >= 2.3.0
# Uses MySQL
BuildRequires: mysql-devel
# Uses pkgconfig
BuildRequires: pkgconfig
%description
ODB is an object-relational mapping (ORM) system for C++. It provides
tools, APIs, and library support that allow you to persist C++ objects
to a relational database (RDBMS) without having to deal with tables,
columns, or SQL and without manually writing any of the mapping code.
This package contains the MySQL ODB runtime library. Every application
that includes code generated for the MySQL database will need to link
to this library.
%package devel
Summary: Development files for %{name}
Group: Development/Libraries
Requires: %{name}%{?_isa} = %{version}-%{release}
%description devel
The %{name}-devel package contains libraries and header files for
developing applications that use %{name}.
%prep
%setup -q
%build
%configure --disable-static
make %{?_smp_mflags}
%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT
find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';'