diff options
author | François Andriot <albator78@libertysurf.fr> | 2014-07-20 13:25:02 +0200 |
---|---|---|
committer | François Andriot <albator78@libertysurf.fr> | 2014-07-20 13:25:02 +0200 |
commit | 253fbb2488360f7e35d43f33259984505ff41df7 (patch) | |
tree | d4f8850761206558fdf2d20c3bcbf18c023408e6 /redhat/build | |
parent | c6eec582c412347deeb9681922c1c204c49d74b0 (diff) | |
download | tde-packaging-253fbb2488360f7e35d43f33259984505ff41df7.tar.gz tde-packaging-253fbb2488360f7e35d43f33259984505ff41df7.zip |
RPM Packaging: update build scripts
Diffstat (limited to 'redhat/build')
-rwxr-xr-x | redhat/build/get_installed_package_version.sh | 2 | ||||
-rwxr-xr-x | redhat/build/get_latest_built_package_version.sh | 2 | ||||
-rwxr-xr-x | redhat/build/update_repository.sh | 6 |
3 files changed, 7 insertions, 3 deletions
diff --git a/redhat/build/get_installed_package_version.sh b/redhat/build/get_installed_package_version.sh index c7c5540cb..7af2065ec 100755 --- a/redhat/build/get_installed_package_version.sh +++ b/redhat/build/get_installed_package_version.sh @@ -23,6 +23,6 @@ fi VERSION=${VERSION/-*_/\~} VERSION=${VERSION%-[0-9]} VERSION=${VERSION%.opt} -VERSION=${VERSION%.*} +VERSION=${VERSION%.[a-z]*} echo $VERSION diff --git a/redhat/build/get_latest_built_package_version.sh b/redhat/build/get_latest_built_package_version.sh index f1e251b65..a361ff7b7 100755 --- a/redhat/build/get_latest_built_package_version.sh +++ b/redhat/build/get_latest_built_package_version.sh @@ -11,7 +11,7 @@ RPM=$(get_latest_built_package_filename.sh "${PKGNAME}" ${TDE_VERSION}) VERSION=$(rpm -qp --qf "%{version}-%{release}" "${RPM}") VERSION=${VERSION%.opt} -VERSION=${VERSION%.*} +VERSION=${VERSION%.[a-z]*} VERSION=${VERSION/-*_/\~} diff --git a/redhat/build/update_repository.sh b/redhat/build/update_repository.sh index 1f2216152..51b6dc7c6 100755 --- a/redhat/build/update_repository.sh +++ b/redhat/build/update_repository.sh @@ -20,7 +20,11 @@ if [ -x /usr/sbin/urpmi ]; then elif [ -x /usr/bin/zypper ]; then REPOUPDATE='(cd ${RPMDIR}; createrepo --workers=${WORKERS} ${ARCH} & createrepo --workers=${WORKERS} noarch & wait; sudo zypper refresh rpmbuild.${ARCH} rpmbuild.noarch)' elif [ -x /usr/bin/yum ]; then - REPOUPDATE='(cd ${RPMDIR}; createrepo ${ARCH} & createrepo noarch & wait; sudo yum clean all --disablerepo="*" --enablerepo="rpmbuild*")' + if [ "$(rpm -E %dist)" = ".el5" ]; then + REPOUPDATE='(cd ${RPMDIR}; createrepo ${ARCH} & createrepo noarch & wait; sudo yum clean all --disablerepo="*" --enablerepo="rpmbuild*")' + else + REPOUPDATE='(cd ${RPMDIR}; createrepo --workers=${WORKERS} ${ARCH} & createrepo --workers=${WORKERS} noarch & wait; sudo yum clean all --disablerepo="*" --enablerepo="rpmbuild*")' + fi elif [ -x /usr/bin/apt-get ]; then REPOUPDATE='(cd ${RPMDIR}; genpkglist $PWD noarch & genpkglist $PWD ${ARCH} & wait; genbasedir $PWD ${ARCH} noarch; sudo apt-get update)' fi |