From ebd751a0a30522160af8d4e3e44cf88382c1567c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Andriot?= Date: Sat, 1 Feb 2014 14:56:14 +0100 Subject: [PATCH] RPM Packaging: update build scripts --- redhat/build/install_rpm_package.sh | 6 ++ redhat/build/update_repository.sh | 8 ++- redhat/buildenv.sh | 4 -- redhat/genrpm.sh | 6 +- redhat/packages.fedora | 87 +++++++++++++++-------------- 5 files changed, 59 insertions(+), 52 deletions(-) diff --git a/redhat/build/install_rpm_package.sh b/redhat/build/install_rpm_package.sh index 8c9973037..13daa1258 100755 --- a/redhat/build/install_rpm_package.sh +++ b/redhat/build/install_rpm_package.sh @@ -1,5 +1,11 @@ #!/bin/bash +LOCKFILE="/tmp/lock.${0##*/}" +while [ -e "${LOCKFILE}" ]; do + echo "Waiting for lock file '${LOCKFILE}' to vanish." + sleep 3 +done + PKGCATEGORY="${1%%/*}" PKGNAME="${1##*/}" diff --git a/redhat/build/update_repository.sh b/redhat/build/update_repository.sh index bdd2f0f4f..8ffeabe93 100755 --- a/redhat/build/update_repository.sh +++ b/redhat/build/update_repository.sh @@ -2,6 +2,12 @@ WORKERS=$(getconf _NPROCESSORS_ONLN) +LOCKFILE="/tmp/lock.${0##*/}" +while [ -e "${LOCKFILE}" ]; do + echo "Waiting for lock file '${LOCKFILE}' to vanish." + sleep 3 +done + if [ -x /usr/sbin/urpmi ]; then REPOUPDATE='(cd $(rpm -E %{_rpmdir}); genhdlist2 --clean --allow-empty noarch; genhdlist2 --clean --allow-empty $(uname -i); sudo urpmi.update rpmbuild.$(uname -i) rpmbuild.noarch)' elif [ -x /usr/bin/zypper ]; then @@ -12,4 +18,4 @@ elif [ -x /usr/bin/apt-get ]; then REPOUPDATE='(cd $(rpm -E %{_rpmdir}); genpkglist $PWD noarch; genpkglist $PWD i586; genpkglist $PWD x86_64; genbasedir $PWD i586 x86_64 noarch; sudo apt-get update)' fi -eval ${REPOUPDATE} || exit 1 +eval "${REPOUPDATE}; rm -f ${LOCKFILE}"|| exit 1 diff --git a/redhat/buildenv.sh b/redhat/buildenv.sh index aea4036dd..26dd017cd 100644 --- a/redhat/buildenv.sh +++ b/redhat/buildenv.sh @@ -12,10 +12,6 @@ export PATH="${PATH}:${TDE_GITBASEPKG}" # Distribution suffix (e.g: .el6 , .mga3 ...) export DIST="$( "${TDE_GITBASEPKG}/build/rpmdist.sh" --dist )" -<<<<<<< HEAD -======= -#alias dist='~/bin/rpmdist.sh --dist' ->>>>>>> 650867080ee48b3e555a57f7ac0dab05eb4c6447 # Go to the RPMS folder alias cdrpm='cd ~/rpmbuild/RPMS/RPMS${DIST}' diff --git a/redhat/genrpm.sh b/redhat/genrpm.sh index d8d7bd3a3..18857cf1a 100755 --- a/redhat/genrpm.sh +++ b/redhat/genrpm.sh @@ -30,7 +30,7 @@ else #eval TARBALLS_DIR=~/tde/tde-tarballs/14.0.0 fi -clear +#clear cat <&1 | tee ${LOGFILE} eval "$(grep ^RET= ${LOGFILE})" -set +x # Removes temporary source directory rm -rf "${SOURCEDIR}" @@ -199,6 +196,7 @@ rm -rf "${SOURCEDIR}" if [ "${RET}" -gt 0 ]; then exit ${RET} fi +set +x if grep -q "error: Failed build dependencies:" ${LOGFILE}; then # DEPS=$( sed -n -e "/.* is needed by .*/ s/^[ \t]*\([a-zA-Z2-9_-]*\) .*/\1/p" ${LOGFILE} ) diff --git a/redhat/packages.fedora b/redhat/packages.fedora index bc1e92869..682074175 100644 --- a/redhat/packages.fedora +++ b/redhat/packages.fedora @@ -9,6 +9,7 @@ binutils-devel bison boost-devel bzip2-devel +ccache ccrtp-devel cdparanoia cdparanoia-devel @@ -16,19 +17,28 @@ chrpath clucene-core-devel cmake commoncpp2-devel +cpp cppunit-devel createrepo +cups-devel db4-devel +dbus-glib-devel djvulibre djvulibre-devel +doxygen +dssi-devel esound-devel exiv2-devel ffmpeg-devel +fftw-devel file-devel flac-devel flex-static fribidi-devel gamin-devel +gcc +gcc-c++ +gcc-java gettext-devel glib-devel gmp-devel @@ -42,46 +52,59 @@ gstreamer-devel gstreamer-plugins-base-devel gtk2-devel gtk+-devel +gtk-doc guile-devel hal-devel hspell-devel +html2ps icu +ImageMagick-devel imake +imlib-devel jack-audio-connection-kit-devel jasper-devel +java-1.4.2-gcj-compat-devel java-1.7.0-openjdk-devel java-devel java-openjdk lame-devel lcms-devel +libacl-devel libart_lgpl-devel libblkid-devel +libcap-devel libcdio-devel libcdio-paranoia-devel libcurl-devel -libdb-devel libdb-cxx-devel +libdb-devel libdvdread-devel libfontenc-devel libgadu-devel +libgcj-devel libgpod-devel libgsf-devel libgssapi-devel libical-devel libidn-devel libifp-devel +liblo-devel +liblrdf-devel libmad-devel +libmng-devel libmp4v2-devel libmpcdec-devel libmtp-devel libmusicbrainz-devel libnjb-devel +libofx-devel libogg-devel libotr-devel libpaper-devel libpqxx-devel libraw1394-devel librsvg2 +librsvg2-tools libsamplerate-devel libsmbclient-devel libsndfile-devel @@ -93,55 +116,75 @@ libtool-ltdl-devel libtunepimp-devel libudev-devel libutempter-devel +libv4l-devel libvisual-devel libvorbis-devel libwmf-devel libwpd-devel libXaw-devel +libXcomposite-devel +libXdamage-devel libXdmcp-devel libxkbfile-devel libXScrnSaver-devel libxslt-devel libXtst-devel +libXv-devel libXxf86dga-devel +libXxf86vm-devel libzrtpcpp-devel +lirc-devel lm_sensors-devel meanwhile-devel mftrace +mysql-devel nas-devel neon-devel netpbm-progs net-snmp-devel +net-tools +NetworkManager-glib-devel +ocaml ocaml(compiler) OpenEXR-devel openldap-devel openslp-devel +opensp-devel ortp-devel pam-devel pciutils-devel pcre-devel +pcsc-lite-devel +perl perl-devel perl(ExtUtils::MakeMaker) perl(XML::Parser) pilot-link-devel poppler-devel +postgresql-devel pth-devel pulseaudio-libs-devel +recode redhat-rpm-config rpm-build ruby ruby-devel sane-backends-devel +scons SDL-devel sip-devel speex-devel +sqlite-devel subversion-devel sword-devel t1lib-devel t1utils taglib-devel +tar transfig udev-devel +udisks-devel +unixODBC-devel valgrind wireless-tools-devel wv2-devel @@ -154,45 +197,3 @@ xscreensaver xscreensaver-extras xulrunner-devel xz-devel -recode -libofx-devel -opensp-devel -ImageMagick-devel -doxygen -scons -imlib-devel -fftw-devel -dssi-devel -liblo-devel -lirc-devel -dbus-glib-devel -html2ps -gcc -gcc-c++ -cpp -ccache -mysql-devel -postgresql-devel -libacl-devel -libv4l-devel -perl -cups-devel -tar -sqlite-devel -liblrdf-devel -unixODBC-devel -gtk-doc -librsvg2-tools -libXv-devel -net-tools -libcap-devel -libmng-devel -libXcomposite-devel -libXdamage-devel -libXxf86vm-devel -java-1.4.2-gcj-compat-devel -libgcj-devel -gcc-java - -ocaml -pcsc-lite-devel