From 7e49bfa39bebb05287e2d5d58a0324b1e0ee38a2 Mon Sep 17 00:00:00 2001 From: yanmorin <yanmorin> Date: Wed, 6 Sep 2006 18:50:03 +0000 Subject: [PATCH] Packaging modification (DEBUG is used by QT file, see QT_NO_DEBUG) --- Makefile.am | 1 + configure.ac | 2 +- m4/sfl-internal.m4 | 2 +- platform/fedora/sflphone.spec.in | 49 ++++++++++++++++++++++++++++++++ skins/Makefile.am | 2 +- skins/gmetal/Makefile.am | 2 +- skins/metal/Makefile.am | 2 +- src/audio/audiofile.cpp | 6 ++++ src/audio/audiortp.cpp | 22 +------------- src/audio/gsm/Makefile.am | 2 +- src/global.h | 2 +- src/gui/qt/ConfigurationPanel.ui | 2 +- src/gui/qt/DebugOutputImpl.cpp | 4 +-- src/gui/qt/DebugOutputImpl.hpp | 3 +- src/gui/qt/Makefile.am | 3 +- tools/config.sh | 8 +++--- tools/install.sh | 2 +- 17 files changed, 75 insertions(+), 39 deletions(-) create mode 100644 platform/fedora/sflphone.spec.in diff --git a/Makefile.am b/Makefile.am index 5f23fbf57d..0f8e9a312c 100644 --- a/Makefile.am +++ b/Makefile.am @@ -5,3 +5,4 @@ ACLOCAL_AMFLAGS = -I m4 SUBDIRS = libs src ringtones skins EXTRA_DIST = m4/*.m4 tools/*.sh platform/* images/* + diff --git a/configure.ac b/configure.ac index 6040b430cf..703ea1a160 100644 --- a/configure.ac +++ b/configure.ac @@ -46,7 +46,7 @@ AC_CONFIG_FILES([skins/Makefile \ skins/gmetal/Makefile \ ringtones/Makefile]) AC_CONFIG_FILES([platform/debian/changelog platform/rpm/sflphone.spec \ - platform/fedora/sflphoned.spec]) + platform/fedora/sflphone.spec]) AC_CONFIG_HEADERS(config.h) dnl Get project version diff --git a/m4/sfl-internal.m4 b/m4/sfl-internal.m4 index d307a31e16..af4d3d01a6 100644 --- a/m4/sfl-internal.m4 +++ b/m4/sfl-internal.m4 @@ -10,6 +10,6 @@ AC_DEFUN([SFL_CXX_WITH_DEBUG],[ ) if test "x$with_debug" = "xfull" -o "x$with_debug" = "xyes"; then CXXFLAGS="$CXXFLAGS -g" - CPPFLAGS="$CPPFLAGS -DDEBUG" + CPPFLAGS="$CPPFLAGS -DSFLDEBUG" fi ]) diff --git a/platform/fedora/sflphone.spec.in b/platform/fedora/sflphone.spec.in new file mode 100644 index 0000000000..913dc0e873 --- /dev/null +++ b/platform/fedora/sflphone.spec.in @@ -0,0 +1,49 @@ +%define name sflphone +%define version @RPM_VERSION@ +%define alphatag @RPM_RELEASE@ +Autoreq: 0 + +Name: %name +Summary: A VoIP daemon with SIP protocol +Version: %version +Release: 1 +License: GPL +Group: System Environment/Daemons +URL: http://www.sflphone.org/ +Packager: Cyrille Béraud <cyrille.beraud@savoirfairelinux.com> +Source0: http://www.sflphone.org/releases/%{name}-%{version}.tar.gz +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root +Requires: commoncpp2 ccrtp libosip2 libexosip2 samplerate qt + +%description +SFLPhoned is a VoIP daeamon with SIP protocol. +%prep +%setup -q + +%build +%configure --prefix=%{_prefix} +make + +%install +rm -fr %{buildroot} + +%makeinstall + +%clean +rm -rf %{buildroot} + +%files +%defattr(-, root, root) +%{_bindir}/sflphone +%{_libexecdir}/sflphoned +%{_libexecdir}/sflphoned-qt +%{_libexecdir}/sflphoned-cli +%{_datadir}/sflphone/ringtones/* + +%changelog +* Wed Sep 6 2006 Yan Morin <yan.morin@savoirfairelinux.com> + Packaging sflphone, sflphone-qt and sflphone-cli + +* Mon Nov 21 2005 Yan Morin <yan.morin@savoirfairelinux.com> +- Final 0.6.0 version (Release / Source without alphatag) + diff --git a/skins/Makefile.am b/skins/Makefile.am index 5c3063bce8..7d433c3481 100644 --- a/skins/Makefile.am +++ b/skins/Makefile.am @@ -1,3 +1,3 @@ SUBDIRS = metal gmetal datadir = $(sflphone_datadir)/skins/ -data_DATA = *.ini \ No newline at end of file +dist_data_DATA = *.ini diff --git a/skins/gmetal/Makefile.am b/skins/gmetal/Makefile.am index 4ceac1b284..0ce1bb5fec 100644 --- a/skins/gmetal/Makefile.am +++ b/skins/gmetal/Makefile.am @@ -1,2 +1,2 @@ datadir = $(sflphone_datadir)/skins/gmetal -data_DATA = *.png \ No newline at end of file +dist_data_DATA = *.png diff --git a/skins/metal/Makefile.am b/skins/metal/Makefile.am index 181ef323ca..35369dfedf 100644 --- a/skins/metal/Makefile.am +++ b/skins/metal/Makefile.am @@ -1,2 +1,2 @@ datadir = $(sflphone_datadir)/skins/metal -data_DATA = *.png \ No newline at end of file +dist_data_DATA = *.png diff --git a/src/audio/audiofile.cpp b/src/audio/audiofile.cpp index 19437933d3..00241e6d3b 100644 --- a/src/audio/audiofile.cpp +++ b/src/audio/audiofile.cpp @@ -99,8 +99,14 @@ AudioFile::loadFile(const std::string& filename, unsigned int sampleRate=8000) // just s _size = nbSampling; _buffer = new SFLDataFormat[_size]; +#ifdef DATAFORMAT_IS_FLOAT // src to dest src_short_to_float_array(monoBuffer, _buffer, nbSampling); +#else + // dest to src + memcpy(_buffer, monoBuffer, _size*sizeof(SFLDataFormat)); +#endif + } else { // case 2: we need to convert it and split it // convert here diff --git a/src/audio/audiortp.cpp b/src/audio/audiortp.cpp index 82bc057842..bf1d6d0b48 100644 --- a/src/audio/audiortp.cpp +++ b/src/audio/audiortp.cpp @@ -234,6 +234,7 @@ AudioRtpRTX::sendSessionFromMic(int timestamp) // 3. encode it // 4. send it try { + timestamp += time->getSecond(); if (_ca==0) { _debug(" !ARTP: No call associated (mic)\n"); return; } // no call, so we do nothing AudioLayer* audiolayer = Manager::instance().getAudioDriver(); if (!audiolayer) { _debug(" !ARTP: No audiolayer available for mic\n"); return; } @@ -260,23 +261,6 @@ AudioRtpRTX::sendSessionFromMic(int timestamp) SRC_DATA src_data; #ifdef DATAFORMAT_IS_FLOAT src_data.data_in = _dataAudioLayer; -/* _debug("inb: %d %f %f %f %f %f %f %f %f %f %f %f %f\n", nbSample, _dataAudioLayer[0], -_dataAudioLayer[1 ], -_dataAudioLayer[2 ], -_dataAudioLayer[3 ], -_dataAudioLayer[4 ], -_dataAudioLayer[5 ], -_dataAudioLayer[6 ], -_dataAudioLayer[7 ], -_dataAudioLayer[8 ], -_dataAudioLayer[9 ], -_dataAudioLayer[10], -_dataAudioLayer[11], -_dataAudioLayer[12], -_dataAudioLayer[13], -_dataAudioLayer[14], -_dataAudioLayer[15] -);*/ #else src_short_to_float_array(_dataAudioLayer, _floatBuffer48000, nbSample); src_data.data_in = _floatBuffer48000; @@ -289,9 +273,6 @@ _dataAudioLayer[15] src_simple (&src_data, SRC_SINC_BEST_QUALITY/*SRC_SINC_MEDIUM_QUALITY*/, 1); // 1 = channel nbSample = src_data.output_frames_gen; //if (nbSample > RTP_20S_8KHZ_MAX) { _debug("Alert from mic, nbSample %d is bigger than expected %d\n", nbSample, RTP_20S_8KHZ_MAX); } - /*_debug("ina: %d %f %f\n", nbSample, _floatBuffer8000[0], -_floatBuffer8000[1 ] -);*/ src_float_to_short_array (_floatBuffer8000, _intBuffer8000, nbSample); toSIP = _intBuffer8000; } else { @@ -321,7 +302,6 @@ _floatBuffer8000[1 ] // encode divise by two // Send encoded audio sample over the network if (compSize > RTP_20S_8KHZ_MAX) { _debug("! ARTP: %d should be %d\n", compSize, RTP_20S_8KHZ_MAX);} - timestamp += time->getSecond(); if (!_sym) { _sessionSend->putData(timestamp, _sendDataEncoded, compSize); } else { diff --git a/src/audio/gsm/Makefile.am b/src/audio/gsm/Makefile.am index 6e50e548c4..10c9a00019 100644 --- a/src/audio/gsm/Makefile.am +++ b/src/audio/gsm/Makefile.am @@ -1,4 +1,4 @@ -EXTRA_DIST = ChangeLog INSTALL MACHINES MANIFEST README COPYRIGHT +#EXTRA_DIST = ChangeLog INSTALL MACHINES MANIFEST README COPYRIGHT noinst_LTLIBRARIES = libgsm.la diff --git a/src/global.h b/src/global.h index 813e09c9fc..a193f542db 100644 --- a/src/global.h +++ b/src/global.h @@ -42,7 +42,7 @@ typedef short int16; #define SFLConvertInt16(s) (s) #endif -#ifdef DEBUG +#ifdef SFLDEBUG #define _debug(...) fprintf(stderr, "[sfl-debug] " __VA_ARGS__) #define _debugStart(...) fprintf(stderr, "[sfl-debug] " __VA_ARGS__) #define _debugMid(...) fprintf(stderr, __VA_ARGS__) diff --git a/src/gui/qt/ConfigurationPanel.ui b/src/gui/qt/ConfigurationPanel.ui index c6a2340483..850df12311 100644 --- a/src/gui/qt/ConfigurationPanel.ui +++ b/src/gui/qt/ConfigurationPanel.ui @@ -1160,7 +1160,7 @@ Yan Morin <br/>&nbsp;&nbsp;&nbsp;&lt;yan.morin@savoirfaire Jérome Oufella <br/> &nbsp;&nbsp;&nbsp;&lt;jerome.oufella@savoirfairelinux.com&gt;<br /> Julien Plissonneau Duquène <br/> &nbsp;&nbsp;&nbsp;&lt;julien.plissonneau.duquene@savoirfairelinux.com&gt;<br /> -<br />SFLphone 0.7.0pre0 is released under the General Public License. For more information, see <a href="http://www.sflphone.org/">http://www.sflphone.org/</a></p></string> +<br />SFLphone 0.7 is released under the General Public License. For more information, see <a href="http://www.sflphone.org/">http://www.sflphone.org/</a></p></string> </property> </widget> <widget class="QLabel" row="0" column="1"> diff --git a/src/gui/qt/DebugOutputImpl.cpp b/src/gui/qt/DebugOutputImpl.cpp index 20348d9036..3714e6f9a4 100644 --- a/src/gui/qt/DebugOutputImpl.cpp +++ b/src/gui/qt/DebugOutputImpl.cpp @@ -18,13 +18,13 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ - #include "globals.h" #include <qfile.h> + #include "DebugOutputImpl.hpp" DebugOutputImpl::DebugOutputImpl() -#ifdef DEBUG +#ifdef SFLDEBUG : QTextStream(stdout, IO_WriteOnly) #else : QTextStream(&mOutputString, IO_WriteOnly) diff --git a/src/gui/qt/DebugOutputImpl.hpp b/src/gui/qt/DebugOutputImpl.hpp index 0541aa319a..6416d01820 100644 --- a/src/gui/qt/DebugOutputImpl.hpp +++ b/src/gui/qt/DebugOutputImpl.hpp @@ -20,7 +20,6 @@ #ifndef __DEBUGOUTPUTIMPL_HPP__ #define __DEBUGOUTPUTIMPL_HPP__ - #include <qtextstream.h> class DebugOutputImpl : public QTextStream @@ -29,7 +28,7 @@ public: DebugOutputImpl(); private: -#ifdef DEBUG +#ifndef SFLDEBUG QString mOutputString; #endif }; diff --git a/src/gui/qt/Makefile.am b/src/gui/qt/Makefile.am index 9403bc30ae..b223343ae4 100644 --- a/src/gui/qt/Makefile.am +++ b/src/gui/qt/Makefile.am @@ -110,7 +110,8 @@ sflphone_qt_SOURCES = \ ./VolumeControl.cpp \ ./VolumeControl.hpp \ ./globals.h \ - ./main.cpp + ./main.cpp \ + ./ConfigurationPanel.ui.h CLEANFILES = \ $(BUILT_SOURCES) diff --git a/tools/config.sh b/tools/config.sh index 4ed525e1ce..4745ff56c6 100755 --- a/tools/config.sh +++ b/tools/config.sh @@ -4,10 +4,10 @@ SFL_PREFIX=/usr/local SFL_INSTALL_USER=root # could be root too... LD_LIBRARY_PATH=$SFL_PREFIX/lib:$LD_LIBRARY_PATH -SFL_FILE_CCPP2=http://easynews.dl.sourceforge.net/sourceforge/gnutelephony/commoncpp2-1.3.21.tar.gz -SFL_FILE_CCRTP=ftp://ftp.gnu.org/pub/gnu/ccrtp/ccrtp-1.3.7.tar.gz -SFL_FILE_LIBOSIP2=http://ftp.gnu.org/gnu/osip/libosip2-2.2.2.tar.gz -SFL_FILE_LIBEXOSIP2=http://savannah.nongnu.org/download/exosip/libeXosip2-2.2.2.tar.gz +SFL_FILE_CCPP2=http://easynews.dl.sourceforge.net/sourceforge/gnutelephony/commoncpp2-1.4.2.tar.gz +SFL_FILE_CCRTP=ftp://ftp.gnu.org/pub/gnu/ccrtp/ccrtp-1.4.2.tar.gz +SFL_FILE_LIBOSIP2=http://ftp.gnu.org/gnu/osip/libosip2-2.2.3.tar.gz +SFL_FILE_LIBEXOSIP2=http://savannah.nongnu.org/download/exosip/libeXosip2-2.2.3.tar.gz SFL_FILE_PA_V19=http://www.portaudio.com/archives/pa_snapshot_v19.tar.gz SFL_DIR_PA='portaudio' diff --git a/tools/install.sh b/tools/install.sh index 9676861190..6f4b5e5ee5 100755 --- a/tools/install.sh +++ b/tools/install.sh @@ -36,7 +36,7 @@ cmmi() { if [ "$SFL_INSTALL_USER" = "$USER" ]; then make install || exit else - su $SFL_INSTALL_USER -c 'make install' || exit; + PATH=$PATH:/sbin su $SFL_INSTALL_USER -c 'make install' || exit; fi fi cd .. -- GitLab