diff --git a/sflphone-common/libs/pjproject-1.0.1/autogen.sh b/sflphone-common/libs/pjproject-1.0.1/autogen.sh index 1aad191a1e6b560a8d6f8ee16969ce8a6f5799db..ec81ce55038b52adf0f01cb501eaa73954d61011 100755 --- a/sflphone-common/libs/pjproject-1.0.1/autogen.sh +++ b/sflphone-common/libs/pjproject-1.0.1/autogen.sh @@ -7,13 +7,17 @@ # Author: Julien Bonjean (julien@bonjean.info) # # Creation Date: 2009-05-26 -# Last Modified: 2009-05-27 11:00:20 -0400 +# Last Modified: 2009-06-01 18:25:28 -0400 ##################################################### if [ -e /usr/share/misc/config.guess ]; then rm -f config.sub config.guess ln -s /usr/share/misc/config.sub . ln -s /usr/share/misc/config.guess . +elif [ -e /usr/lib/rpm/config.guess ]; then + rm -f config.sub config.guess + ln -s /usr/lib/rpm/config.sub . + ln -s /usr/lib/rpm/config.guess . else aclocal --force automake --add-missing --force-missing --copy diff --git a/tools/build-system/distributions/build-packages.sh b/tools/build-system/distributions/build-packages.sh index a8f2d049d1c1e9f004cbf50c2ed3b0311cf5946e..0b9e09fbec4846af807dc51515e17b687a50d2e2 100755 --- a/tools/build-system/distributions/build-packages.sh +++ b/tools/build-system/distributions/build-packages.sh @@ -7,7 +7,7 @@ # Author: Julien Bonjean (julien@bonjean.info) # # Creation Date: 2009-05-29 -# Last Modified: 2009-05-29 15:18:56 -0400 +# Last Modified: 2009-06-01 17:27:25 -0400 ##################################################### . ./globals @@ -53,7 +53,7 @@ fi # decompress repository echo "Untar repository" -cd ${BUILD_DIR} && tar xf ${REPOSITORY_ARCHIVE} +cd ${BUILD_DIR} && tar xf ${REPOSITORY_ARCHIVE} >/dev/null 2>&1 if [ "$?" -ne "0" ]; then echo " !! Cannot untar repository" @@ -69,6 +69,14 @@ elif [ "${DISTRIBUTION}" = "opensuse" ]; then echo "Launch packaging for openSUSE 11" cd ${OPENSUSE_DIR} && ./build-packages-opensuse.sh $* +elif [ "${DISTRIBUTION}" = "mandriva" ]; then + echo "Launch packaging for Mandriva 2009.1" + cd ${MANDRIVA_DIR} && ./build-packages-mandriva.sh $* + +elif [ "${DISTRIBUTION}" = "fedora" ]; then + echo "Launch packaging for Fedora 11" + cd ${FEDORA_DIR} && ./build-packages-fedora.sh $* + else echo "!! Cannot detect distribution" exit -1 diff --git a/tools/build-system/distributions/globals b/tools/build-system/distributions/globals index ceaf1d927745e8b1e30926d5735cb1b709f680dd..0de0f01a92526f8b14998b8d8a4ed4c91137b8b1 100644 --- a/tools/build-system/distributions/globals +++ b/tools/build-system/distributions/globals @@ -17,6 +17,8 @@ PACKAGING_DIR="${ROOT_DIR}/sflphone-packaging" # distributions UBUNTU_DIR="${PACKAGING_DIR}/ubuntu" OPENSUSE_DIR="${PACKAGING_DIR}/opensuse" +MANDRIVA_DIR="${PACKAGING_DIR}/mandriva" +FEDORA_DIR="${PACKAGING_DIR}/fedora" # where packaging will be donne BUILD_DIR="${PACKAGING_DIR}/build" @@ -24,7 +26,8 @@ REPOSITORY_ARCHIVE="${BUILD_DIR}/sflphone.tar.gz" REPOSITORY_DIR="${BUILD_DIR}/sflphone" # target directories -DIST_DIR="${PACKAGING_DIR}/dists" +DEB_RESULT_DIR="${PACKAGING_DIR}/deb/dists" +RPM_RESULT_DIR="${PACKAGING_DIR}/rpm" # system information ARCH_FLAG=`getconf -a|grep LONG_BIT | sed -e 's/LONG_BIT\s*//'` diff --git a/tools/build-system/distributions/mandriva/build-packages-mandriva.sh b/tools/build-system/distributions/mandriva/build-packages-mandriva.sh new file mode 100755 index 0000000000000000000000000000000000000000..0b52d2cbeb43482131daced31a154f3022bd4984 --- /dev/null +++ b/tools/build-system/distributions/mandriva/build-packages-mandriva.sh @@ -0,0 +1,94 @@ +#!/bin/bash +##################################################### +# File Name: build-packages-opensuse.sh +# +# Purpose : +# +# Author: Julien Bonjean (julien@bonjean.info) +# +# Creation Date: 2009-05-27 +# Last Modified: 2009-06-01 17:24:52 -0400 +##################################################### + +. ../globals + +cd ${MANDRIVA_DIR} + +if [ "$?" -ne "0" ]; then + echo " !! Cannot cd to Mandriva directory" + exit -1 +fi + +echo "Do updates" +sudo /usr/sbin/urpmi --auto-update --auto >/dev/null + +# create build directories +echo "Create directories" +mkdir -p ${BUILD_DIR}/BUILD +mkdir -p ${RPM_RESULT_DIR} +mkdir -p ${BUILD_DIR}/SOURCES +mkdir -p ${BUILD_DIR}/SPECS + +# create rpm macros +echo "Create RPM macros" +cat > ~/.rpmmacros << STOP +%packager Julien Bonjean (julien.bonjean@savoirfairelinux.com) +%distribution Savoir-faire Linux +%vendor Savoir-faire Linux + +%_signature gpg +%_gpg_name Julien Bonjean + +%_topdir ${BUILD_DIR} +%_builddir %{_topdir}/BUILD +%_rpmdir ${RPM_RESULT_DIR} +%_sourcedir %{_topdir}/SOURCES +%_specdir %{_topdir}/SPECS +%_srcrpmdir ${RPM_RESULT_DIR} +STOP + +# create packages +for PACKAGE in ${PACKAGES[@]} +do + echo "Prepare ${PACKAGE}" + + cd ${REPOSITORY_DIR} + + echo " -> create source archive" + mv ${PACKAGE} ${PACKAGE}-${VERSION} 2>/dev/null && \ + tar cf ${PACKAGE}.tar.gz ${PACKAGE}-${VERSION} >/dev/null && \ + mv ${PACKAGE}-${VERSION} ${PACKAGE} + + if [ "$?" -ne "0" ]; then + echo "!! Cannot create source archive" + exit -1 + fi + + echo " -> move archive to source directory" + mv ${PACKAGE}.tar.gz ${BUILD_DIR}/SOURCES + + if [ "$?" -ne "0" ]; then + echo "!! Cannot move archive" + exit -1 + fi + + cd ${PACKAGING_DIR} + + echo " -> update spec file" + sed "s/VERSION/${VERSION}/g" opensuse/${PACKAGE}.spec > ${BUILD_DIR}/SPECS/${PACKAGE}.spec + + if [ "$?" -ne "0" ]; then + echo "!! Cannot update spec file" + exit -1 + fi +done + +# launch build +echo "Launch build" +rpmbuild -ba ${BUILD_DIR}/SPECS/*.spec + +if [ "$?" -ne "0" ]; then + echo "!! Cannot build packages" + exit -1 +fi + diff --git a/tools/build-system/distributions/mandriva/sflphone-client-gnome.spec b/tools/build-system/distributions/mandriva/sflphone-client-gnome.spec new file mode 100644 index 0000000000000000000000000000000000000000..5266efec3706783d9cf19a2bbb32feb736c17d0a --- /dev/null +++ b/tools/build-system/distributions/mandriva/sflphone-client-gnome.spec @@ -0,0 +1,74 @@ +##################################################### +# File Name: sflphone-client-gnome.spec +# +# Purpose : +# +# Author: Julien Bonjean (julien@bonjean.info) +# +# Creation Date: 2009-05-27 +# Last Modified: 2009-05-27 17:23:32 -0400 +##################################################### + +Name: sflphone-client-gnome +License: GNU General Public License (GPL) +Group: Productivity/Networking/System +Summary: GNOME client for SFLphone +Version: VERSION +Release: mandriva +URL: http://www.sflphone.org/ +Vendor: Savoir-faire Linux +Packager: Julien Bonjean <julien.bonjean@savoirfairelinux.com> + +BuildRoot: %{_tmppath}/%{name}-%{version} +Source0: sflphone-client-gnome.tar.gz +BuildRequires: gtk2-devel +BuildRequires: libnotify-devel +BuildRequires: libsexy-devel +BuildRequires: evolution-data-server-devel +BuildRequires: check-devel +BuildRequires: libdbus-glib-devel +BuildRequires: log4c-devel +Requires: sflphone-common = %{version} +Requires: dbus-1-glib +Requires: gtk2 +Requires: glib2 +Requires: dbus-1-glib +Requires: libnotify +Requires: librsvg +Requires: log4c +Requires: libsexy +Conflicts: sflphone +Prefix: %{_prefix} + +%description +Provide a GNOME client for SFLphone. + SFLphone is meant to be a robust enterprise-class desktop phone. + SFLphone is released under the GNU General Public License. + SFLphone is being developed by the global community, and maintained by + Savoir-faire Linux, a Montreal, Quebec, Canada-based Linux consulting company. + +Authors: +-------- + Julien Bonjean <julien.bonjean@savoirfairelinux.com> + +%lang_package + +%prep +%setup -q + +%build +./autogen.sh --prefix=%{_prefix} +make -j + +%install +make prefix=%{buildroot}/%{_prefix} install + +%clean +make clean + +%files +%defattr(-, root, root) +%{_prefix}/* +%doc AUTHORS COPYING README + +%changelog diff --git a/tools/build-system/distributions/mandriva/sflphone-client-kde.spec b/tools/build-system/distributions/mandriva/sflphone-client-kde.spec new file mode 100644 index 0000000000000000000000000000000000000000..f9fe31205bef2c40ce700e6a1297e751ccac54e0 --- /dev/null +++ b/tools/build-system/distributions/mandriva/sflphone-client-kde.spec @@ -0,0 +1,67 @@ +##################################################### +# File Name: sflphone-client-kde.spec +# +# Purpose : +# +# Author: Julien Bonjean (julien@bonjean.info) +# +# Creation Date: 2009-05-27 +# Last Modified: 2009-05-27 17:23:32 -0400 +##################################################### + +Name: sflphone-client-kde +License: GNU General Public License (GPL) +Group: Productivity/Networking/System +Summary: KDE client for SFLphone +Version: VERSION +Release: mandriva +URL: http://www.sflphone.org/ +Vendor: Savoir-faire Linux +Packager: Julien Bonjean <julien.bonjean@savoirfairelinux.com> + +BuildRoot: %{_tmppath}/%{name}-%{version} +Source0: sflphone-client-kde.tar.gz +Requires: sflphone-common = %{version} +Requires: commoncpp2 +Requires: libkdepimlibs4 +Requires: libqt4-dbus-1 +Requires: libqt4-svg +Requires: libqt4-x11 +BuildRequires: cmake +BuildRequires: libcommoncpp-devel +BuildRequires: kdepimlibs4-devel +Conflicts: sflphone +Prefix: %{_prefix} + +%description +Provide a KDE client for SFLphone. + SFLphone is meant to be a robust enterprise-class desktop phone. + SFLphone is released under the GNU General Public License. + SFLphone is being developed by the global community, and maintained by + Savoir-faire Linux, a Montreal, Quebec, Canada-based Linux consulting company. + +Authors: +-------- + Julien Bonjean <julien.bonjean@savoirfairelinux.com> + +%lang_package + +%prep +%setup -q + +%build +cmake . -DCMAKE_INSTALL_PREFIX=%{buildroot}/%{_prefix} +make -j + +%install +make install + +%clean +make clean + +%files +%defattr(-, root, root) +%{_prefix}/* +%doc AUTHORS COPYING README + +%changelog diff --git a/tools/build-system/distributions/mandriva/sflphone-common.spec b/tools/build-system/distributions/mandriva/sflphone-common.spec new file mode 100644 index 0000000000000000000000000000000000000000..35bcbe1e6cfd61cf1c73787f2e15621341856a8a --- /dev/null +++ b/tools/build-system/distributions/mandriva/sflphone-common.spec @@ -0,0 +1,89 @@ +##################################################### +# File Name: sflphone-common.spec +# +# Purpose : +# +# Author: Julien Bonjean (julien@bonjean.info) +# +# Creation Date: 2009-05-27 +# Last Modified: 2009-05-27 17:23:32 -0400 +##################################################### + +Name: sflphone-common +License: GNU General Public License (GPL) +Group: System Environment/Daemons +Summary: SIP and IAX2 compatible softphone - Core +Version: VERSION +Release: mandriva +URL: http://www.sflphone.org/ +Vendor: Savoir-faire Linux +Packager: Julien Bonjean <julien.bonjean@savoirfairelinux.com> + +BuildRoot: %{_tmppath}/%{name}-%{version} +Source0: sflphone-common.tar.gz +BuildRequires: glibc-devel +BuildRequires: libccrtp-devel +BuildRequires: libsamplerate-devel +BuildRequires: dbus-1-devel +BuildRequires: libexpat-devel +BuildRequires: libgsm-devel +BuildRequires: speex-devel +BuildRequires: libcppunit-devel +BuildRequires: libcommoncpp-devel +BuildRequires: libalsa2-devel +BuildRequires: libpulseaudio-devel +BuildRequires: libext2fs-devel +Requires: libsamplerate +Requires: libexpat1 +Requires: commoncpp2 +Requires: libgsm1 +Requires: libspeex +Requires: dbus-1 +Requires: libasound2 +Requires: libpulse0 +Requires: libccrtp1 +Conflicts: sflphone +Prefix: %{_prefix} + +%description +SFLphone is meant to be a robust enterprise-class desktop phone. + SFLphone is released under the GNU General Public License. + SFLphone is being developed by the global community, and maintained by + Savoir-faire Linux, a Montreal, Quebec, Canada-based Linux consulting company. + +Authors: +-------- + Julien Bonjean <julien.bonjean@savoirfairelinux.com> + +%prep +%setup -q + +%build +cd libs/pjproject-1.0.1 +./autogen.sh --prefix=%{_prefix} +make dep +make clean +make +cd - +./autogen.sh --prefix=%{_prefix} +make -j + +%install +cd libs/pjproject-1.0.1 +make prefix=%{buildroot}/%{_prefix} install +cd - +make prefix=%{buildroot}/%{_prefix} install + +%clean +cd libs/pjproject-1.0.1 +make clean +cd - +make clean + +%files +%defattr(-, root, root) +%{_prefix}/* +%exclude %{_prefix}/include +%doc AUTHORS COPYING README TODO + +%changelog diff --git a/tools/build-system/distributions/opensuse/build-packages-opensuse.sh b/tools/build-system/distributions/opensuse/build-packages-opensuse.sh index 7960172fe89943d1b7dbb16c2c5cbbf92a56340f..c637ed4ed21757f17d2fe0c10d83afd14abfc71a 100755 --- a/tools/build-system/distributions/opensuse/build-packages-opensuse.sh +++ b/tools/build-system/distributions/opensuse/build-packages-opensuse.sh @@ -7,7 +7,7 @@ # Author: Julien Bonjean (julien@bonjean.info) # # Creation Date: 2009-05-27 -# Last Modified: 2009-05-29 15:18:14 -0400 +# Last Modified: 2009-05-29 18:11:44 -0400 ##################################################### . ../globals @@ -19,13 +19,15 @@ if [ "$?" -ne "0" ]; then exit -1 fi +echo "Do updates" +sudo /usr/bin/zypper -n update >/dev/null + # create build directories echo "Create directories" mkdir -p ${BUILD_DIR}/BUILD -mkdir -p ${BUILD_DIR}/RPMS +mkdir -p ${RPM_RESULT_DIR} mkdir -p ${BUILD_DIR}/SOURCES mkdir -p ${BUILD_DIR}/SPECS -mkdir -p ${BUILD_DIR}/SRPMS # create rpm macros echo "Create RPM macros" @@ -39,10 +41,10 @@ cat > ~/.rpmmacros << STOP %_topdir ${BUILD_DIR} %_builddir %{_topdir}/BUILD -%_rpmdir %{_topdir}/RPMS +%_rpmdir ${RPM_RESULT_DIR} %_sourcedir %{_topdir}/SOURCES %_specdir %{_topdir}/SPECS -%_srcrpmdir %{_topdir}/SRPMS +%_srcrpmdir ${RPM_RESULT_DIR} STOP # create packages @@ -54,7 +56,7 @@ do echo " -> create source archive" mv ${PACKAGE} ${PACKAGE}-${VERSION} 2>/dev/null && \ - tar cf ${PACKAGE}.tar.gz ${PACKAGE}-${VERSION} && \ + tar cf ${PACKAGE}.tar.gz ${PACKAGE}-${VERSION} >/dev/null && \ mv ${PACKAGE}-${VERSION} ${PACKAGE} if [ "$?" -ne "0" ]; then @@ -73,7 +75,7 @@ do cd ${PACKAGING_DIR} echo " -> update spec file" - sed "s/VERSION/${VERSION}/g" ${PACKAGE}.spec > ${BUILD_DIR}/SPECS/${PACKAGE}.spec + sed "s/VERSION/${VERSION}/g" opensuse/${PACKAGE}.spec > ${BUILD_DIR}/SPECS/${PACKAGE}.spec if [ "$?" -ne "0" ]; then echo "!! Cannot update spec file" diff --git a/tools/build-system/distributions/opensuse/sflphone-client-gnome.spec b/tools/build-system/distributions/opensuse/sflphone-client-gnome.spec index fb908810a2b5388e9f59d96fe449e803703e72be..f9cc62a3e275782ae72735f44b42230caf5cde37 100644 --- a/tools/build-system/distributions/opensuse/sflphone-client-gnome.spec +++ b/tools/build-system/distributions/opensuse/sflphone-client-gnome.spec @@ -27,6 +27,7 @@ BuildRequires: dbus-1-glib-devel BuildRequires: libnotify-devel BuildRequires: libsexy-devel BuildRequires: evolution-data-server-devel +BuildRequires: check-devel Requires: sflphone-common = %{version} Requires: dbus-1-glib Requires: gtk2 diff --git a/tools/build-system/distributions/opensuse/sflphone-client-kde.spec b/tools/build-system/distributions/opensuse/sflphone-client-kde.spec new file mode 100644 index 0000000000000000000000000000000000000000..a92ee2554a33385d05e949044599e2a9e6f1d0bd --- /dev/null +++ b/tools/build-system/distributions/opensuse/sflphone-client-kde.spec @@ -0,0 +1,67 @@ +##################################################### +# File Name: sflphone-client-kde.spec +# +# Purpose : +# +# Author: Julien Bonjean (julien@bonjean.info) +# +# Creation Date: 2009-05-27 +# Last Modified: 2009-05-27 17:23:32 -0400 +##################################################### + +Name: sflphone-client-kde +License: GNU General Public License (GPL) +Group: Productivity/Networking/System +Summary: KDE client for SFLphone +Version: VERSION +Release: opensuse +URL: http://www.sflphone.org/ +Vendor: Savoir-faire Linux +Packager: Julien Bonjean <julien.bonjean@savoirfairelinux.com> + +BuildRoot: %{_tmppath}/%{name}-%{version} +Source0: sflphone-client-kde.tar.gz +Requires: sflphone-common = %{version} +Requires: commoncpp2 +Requires: libkdepimlibs4 +Requires: libqt4-dbus-1 +Requires: libqt4-svg +Requires: libqt4-x11 +BuildRequires: cmake +BuildRequires: libkdepimlibs4-devel +BuildRequires: commoncpp2-devel +Conflicts: sflphone +Prefix: %{_prefix} + +%description +Provide a KDE client for SFLphone. + SFLphone is meant to be a robust enterprise-class desktop phone. + SFLphone is released under the GNU General Public License. + SFLphone is being developed by the global community, and maintained by + Savoir-faire Linux, a Montreal, Quebec, Canada-based Linux consulting company. + +Authors: +-------- + Julien Bonjean <julien.bonjean@savoirfairelinux.com> + +%lang_package + +%prep +%setup -q + +%build +cmake . -DCMAKE_INSTALL_PREFIX=%{buildroot}/%{_prefix} +make -j + +%install +make install + +%clean +make clean + +%files +%defattr(-, root, root) +%{_prefix}/* +%doc AUTHORS COPYING README + +%changelog diff --git a/tools/build-system/distributions/opensuse/sflphone-common.spec b/tools/build-system/distributions/opensuse/sflphone-common.spec index d0a9d28601f0153906af7199800c3e1e1f6417c2..721bda7e1abb1d87fd7ce906b4549da934efea18 100644 --- a/tools/build-system/distributions/opensuse/sflphone-common.spec +++ b/tools/build-system/distributions/opensuse/sflphone-common.spec @@ -31,6 +31,7 @@ BuildRequires: libgsm-devel BuildRequires: speex-devel BuildRequires: libcppunit-devel BuildRequires: alsa-devel +BuildRequires: libuuid-devel Requires: libsamplerate Requires: libexpat1 Requires: commoncpp2 diff --git a/tools/build-system/distributions/ubuntu/build-packages-ubuntu.sh b/tools/build-system/distributions/ubuntu/build-packages-ubuntu.sh index 8b8c85e457f728cfd227b87953c7ac992ac08625..ed92471607933a2bf23ae5e8dc2ee34ee9e161c9 100755 --- a/tools/build-system/distributions/ubuntu/build-packages-ubuntu.sh +++ b/tools/build-system/distributions/ubuntu/build-packages-ubuntu.sh @@ -34,7 +34,6 @@ echo "Do updates" sudo apt-get update >/dev/null sudo apt-get upgrade -y >/dev/null - for PACKAGE in ${PACKAGES[@]} do echo "Process ${PACKAGE}" @@ -90,15 +89,15 @@ else BINARY_DIR="binary-amd64" fi -mkdir -p ${DIST_DIR}/${DIST}/universe/source -mkdir -p ${DIST_DIR}/${DIST}/universe/${BINARY_DIR} +mkdir -p ${DEB_RESULT_DIR}/${DIST}/universe/source +mkdir -p ${DEB_RESULT_DIR}/${DIST}/universe/${BINARY_DIR} -mv ${REPOSITORY_DIR}/sflphone*.deb ${DIST_DIR}/${DIST}/universe/${BINARY_DIR} && \ -mv ${REPOSITORY_DIR}/sflphone*.dsc ${DIST_DIR}/${DIST}/universe/source/ && \ -mv ${REPOSITORY_DIR}/sflphone*.build ${DIST_DIR}/${DIST}/universe/source/ && \ -mv ${REPOSITORY_DIR}/sflphone*.changes ${DIST_DIR}/${DIST}/universe/source/ && \ -mv ${REPOSITORY_DIR}/sflphone*.orig.tar.gz ${DIST_DIR}/${DIST}/universe/source/ && \ -mv ${REPOSITORY_DIR}/sflphone*.diff.gz ${DIST_DIR}/${DIST}/universe/source/ +mv ${REPOSITORY_DIR}/sflphone*.deb ${DEB_RESULT_DIR}/${DIST}/universe/${BINARY_DIR} && \ +mv ${REPOSITORY_DIR}/sflphone*.dsc ${DEB_RESULT_DIR}/${DIST}/universe/source/ && \ +mv ${REPOSITORY_DIR}/sflphone*.build ${DEB_RESULT_DIR}/${DIST}/universe/source/ && \ +mv ${REPOSITORY_DIR}/sflphone*.changes ${DEB_RESULT_DIR}/${DIST}/universe/source/ && \ +mv ${REPOSITORY_DIR}/sflphone*.orig.tar.gz ${DEB_RESULT_DIR}/${DIST}/universe/source/ && \ +mv ${REPOSITORY_DIR}/sflphone*.diff.gz ${DEB_RESULT_DIR}/${DIST}/universe/source/ if [ "$?" -ne "0" ]; then echo "!! Cannot copy dist files" diff --git a/tools/build-system/launch-build-machine.sh b/tools/build-system/launch-build-machine.sh index 1b79a17c359250a4ef31aec8c52c3a92353de45a..a5555ccf863391170cc34ad40358130024fa8cc5 100755 --- a/tools/build-system/launch-build-machine.sh +++ b/tools/build-system/launch-build-machine.sh @@ -7,7 +7,7 @@ # Author: Julien Bonjean (julien@bonjean.info) # # Creation Date: 2009-04-20 -# Last Modified: 2009-05-29 14:23:45 -0400 +# Last Modified: 2009-06-01 19:11:22 -0400 ##################################################### # @@ -40,7 +40,6 @@ REMOTE_ROOT_DIR="/home/sflphone" SCRIPTS_DIR="${ROOT_DIR}/build-system" PACKAGING_SCRIPTS_DIR="${SCRIPTS_DIR}/remote" DISTRIBUTION_SCRIPTS_DIR="${SCRIPTS_DIR}/distributions" -BIN_DIR="${SCRIPTS_DIR}/bin" # directory that will be deployed to remote machine TODEPLOY_DIR="${ROOT_DIR}/sflphone-packaging" @@ -78,7 +77,7 @@ export EDITOR NON_FATAL_ERRORS="" -MACHINES=( "ubuntu-8.04" "ubuntu-8.04-64" "ubuntu-8.10" "ubuntu-8.10-64" "ubuntu-9.04" "ubuntu-9.04-64" ) +MACHINES=( "ubuntu-8.04" "ubuntu-8.04-64" "ubuntu-8.10" "ubuntu-8.10-64" "ubuntu-9.04" "ubuntu-9.04-64" "opensuse-11" "opensuse-11-64" "mandriva-2009.1" ) ######################### # BEGIN @@ -125,7 +124,7 @@ do RELEASE_MODE=(${PARAMETER##*=});; --list-machines) echo "Available machines :" - for MACHINE in ${MACHINES}; do + for MACHINE in ${MACHINES[@]}; do echo " "${MACHINE} done exit 0;; @@ -308,6 +307,7 @@ if [ ${DO_MAIN_LOOP} ]; then echo "Entering main loop" echo + rm -f ${PACKAGING_RESULT_DIR}/stats.log for MACHINE in ${MACHINES[*]} do @@ -317,6 +317,9 @@ if [ ${DO_MAIN_LOOP} ]; then echo "Not needed, already running" else cd ${VBOX_USER_HOME} && VBoxHeadless -startvm "${MACHINE}" -p 50000 & + if [[ ${MACHINE} =~ "opensuse" ]]; then + STARTUP_WAIT=200 + fi echo "Wait ${STARTUP_WAIT} s" sleep ${STARTUP_WAIT} fi @@ -329,25 +332,30 @@ if [ ${DO_MAIN_LOOP} ]; then if [ "$?" -ne "0" ]; then echo " !! Cannot deploy packaging system" - NON_FATAL_ERRORS="${NON_FATAL_ERRORS} !! Error when packaging for ${MACHINE}\n" - fi - - echo "Launch remote build" - ${SSH_BASE} "cd ${REMOTE_DEPLOY_DIR} && ./build-packages.sh ${RELEASE_MODE}" - - if [ "$?" -ne "0" ]; then - echo " !! Error during remote packaging process" - NON_FATAL_ERRORS="${NON_FATAL_ERRORS} !! Error when packaging for ${MACHINE}\n" - fi - - echo "Retrieve dists and log files (current tag is ${TAG})" - ${SCP_BASE} ${SSH_HOST}:${REMOTE_DEPLOY_DIR}/dists ${PACKAGING_RESULT_DIR}/ - ${SCP_BASE} ${SSH_HOST}:${REMOTE_DEPLOY_DIR}"/*.log" ${PACKAGING_RESULT_DIR}/ - - if [ "$?" -ne "0" ]; then - echo " !! Cannot retrieve remote files" - NON_FATAL_ERRORS="${NON_FATAL_ERRORS} !! Error when packaging for ${MACHINE}\n" - fi + echo "${MACHINE} : Cannot deploy packaging system" >> ${PACKAGING_RESULT_DIR}/stats.log + else + + echo "Launch remote build" + ${SSH_BASE} "cd ${REMOTE_DEPLOY_DIR} && ./build-packages.sh ${RELEASE_MODE}" + + if [ "$?" -ne "0" ]; then + echo " !! Error during remote packaging process" + echo "${MACHINE} : Error during remote packaging process" >> ${PACKAGING_RESULT_DIR}/stats.log + else + + echo "Retrieve dists and log files (current tag is ${TAG})" + ${SCP_BASE} ${SSH_HOST}:${REMOTE_DEPLOY_DIR}/deb ${PACKAGING_RESULT_DIR}/ >/dev/null 2>&1 + ${SCP_BASE} ${SSH_HOST}:${REMOTE_DEPLOY_DIR}/rpm ${PACKAGING_RESULT_DIR}/ >/dev/null 2>&1 + ${SCP_BASE} ${SSH_HOST}:${REMOTE_DEPLOY_DIR}"/*.log" ${PACKAGING_RESULT_DIR}/ + + if [ "$?" -ne "0" ]; then + echo " !! Cannot retrieve remote files" + echo "${MACHINE} : Cannot retrieve remote files" >> ${PACKAGING_RESULT_DIR}/stats.log + else + echo "${MACHINE} : OK" >> ${PACKAGING_RESULT_DIR}/stats.log + fi + fi + fi if [ "${VM_STATE}" = "running" ]; then echo "Leave machine running" @@ -387,8 +395,8 @@ if [ ${DO_SIGNATURES} ]; then fi echo "Sign packages" - find ${PACKAGING_RESULT_DIR} -name "*.deb" -exec dpkg-sig -k 'Savoir-Faire Linux Inc.' --sign builder --sign-changes full {} \; >/dev/null 2>&1 - find ${PACKAGING_RESULT_DIR} -name "*.changes" -printf "debsign -k'Savoir-Faire Linux Inc.' %p\n" | sh >/dev/null 2>&1 + find ${PACKAGING_RESULT_DIR}/deb/dists -name "*.deb" -exec dpkg-sig -k 'Savoir-Faire Linux Inc.' --sign builder --sign-changes full {} \; >/dev/null 2>&1 + find ${PACKAGING_RESULT_DIR}/deb/dists -name "*.changes" -printf "debsign -k'Savoir-Faire Linux Inc.' %p\n" | sh >/dev/null 2>&1 fi ######################### @@ -410,7 +418,7 @@ if [ ${DO_UPLOAD} ]; then echo "Upload packages" echo "Install dists files to repository" - scp -r ${SSH_OPTIONS} ${PACKAGING_RESULT_DIR}/dists ${SSH_REPOSITORY_HOST}: + scp -r ${SSH_OPTIONS} ${PACKAGING_RESULT_DIR}/deb/dists ${SSH_REPOSITORY_HOST}: if [ "$?" -ne "0" ]; then echo " !! Cannot upload packages" diff --git a/tools/build-system/send-emails.sh b/tools/build-system/send-emails.sh index 065e9c691a071a48b0f10f5206972b9abf9ad49f..4b9c7d52bc460a3707b7044d8b6620e4405d3352 100755 --- a/tools/build-system/send-emails.sh +++ b/tools/build-system/send-emails.sh @@ -7,7 +7,7 @@ # Author: Julien Bonjean (julien@bonjean.info) # # Creation Date: 2009-04-20 -# Last Modified: +# Last Modified: 2009-06-01 18:11:20 -0400 ##################################################### TAG=`date +%Y-%m-%d` @@ -28,12 +28,13 @@ MAIL_SUBJECT="[ ${TAG} ] SFLphone Automatic Build System : ${STATUS}" if [ "$1" -eq 0 ]; then echo | mail -s "${MAIL_SUBJECT}" -c emmanuel.milou@savoirfairelinux.com julien.bonjean@savoirfairelinux.com else - ( - for i in ${PACKAGING_RESULT_DIR}/*.log - do - uuencode $i $(basename $i) - done - ) | mail -s "${MAIL_SUBJECT}" -c emmanuel.milou@savoirfairelinux.com julien.bonjean@savoirfairelinux.com +# ( +# for i in ${PACKAGING_RESULT_DIR}/*.log +# do +# uuencode $i $(basename $i) +# done +# ) + cat ${PACKAGING_RESULT_DIR}/stats.log | mail -s "${MAIL_SUBJECT}" -c emmanuel.milou@savoirfairelinux.com julien.bonjean@savoirfairelinux.com fi exit 0