From cb43fe3f7968c87b7b66045c2bed76c43cc5a306 Mon Sep 17 00:00:00 2001 From: Kilian Cavalotti Date: Fri, 14 May 2021 14:59:35 -0700 Subject: [PATCH] SPEC: put Slurm version in RPM release --- autodist.sh | 4 ---- slurm-drmaa.spec | 4 +++- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/autodist.sh b/autodist.sh index a065416..170cf11 100755 --- a/autodist.sh +++ b/autodist.sh @@ -64,10 +64,6 @@ cd .. eval `grep ^PACKAGE_VERSION= configure` PACKAGE_RELEASE=`echo ${PACKAGE_VERSION#*-} | sed -e 's/[.-]/_/g'` sed -i -e "s/^\(Version:\s*\).*$/\1${PACKAGE_VERSION%%-*}/" slurm-drmaa.spec -if [ "${PACKAGE_VERSION}" != "${PACKAGE_RELEASE}" ]; then - # no dash in $PACKAGE_VERSION so this is not a dev/pre release - sed -i -e "s/^\(Release:\s*\).*/\11.${PACKAGE_RELEASE}%{?dist}/" slurm-drmaa.spec -fi make dist SLURM_CONF=/dev/null DISTCHECK_CONFIGURE_FLAGS="CFLAGS='-I../../../../drmaa_utils -I../../..'" make distcheck diff --git a/slurm-drmaa.spec b/slurm-drmaa.spec index e07f1c2..1719b7b 100644 --- a/slurm-drmaa.spec +++ b/slurm-drmaa.spec @@ -1,6 +1,8 @@ +%global slurm_version %(printf "%s" $(rpm -q slurm-devel --qf "%{VERSION}" | cut -d. -f-2) 2>/dev/null) + Name: slurm-drmaa Version: dev -Release: 1%{?dist} +Release: %{slurm_version}%{?dist} Summary: DRMAA for Slurm Group: Development/Libraries