Skip to content

Commit

Permalink
Merge pull request #6263 from cms-sw/cmssw-wm-tools
Browse files Browse the repository at this point in the history
Added new cmssw-wm-tools tool
  • Loading branch information
smuzaffar committed Sep 23, 2020
2 parents bae675b + 2c15ca1 commit 44b4677
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 0 deletions.
1 change: 1 addition & 0 deletions cmssw-tool-conf.spec
Expand Up @@ -3,6 +3,7 @@
# With cmsBuild, change the above version only when a new tool is added

Requires: crab
Requires: cmssw-wm-tools
Requires: google-benchmark-toolfile
Requires: catch2-toolfile
Requires: starlight-toolfile
Expand Down
36 changes: 36 additions & 0 deletions cmssw-wm-tools.spec
@@ -0,0 +1,36 @@
################################################################
####For any change, always update version number to latest date#
################################################################
### RPM cms cmssw-wm-tools 200923
## NOCOMPILER
## NO_VERSION_SUFFIX

%define commit 656b9fea7da4a596bf688785741a2abcf80c071d
%define branch master
Source0: git://github.com/cms-sw/%{n}.git?obj=%{branch}/%{commit}&export=%{n}&output=/%{n}-%{commit}.tgz

%prep
%if "%{v}" != "%{realversion}"
echo "ERROR: %{v} does not match %{realversion}. Please update version number for %{n}."
exit 1
%endif
%setup -n %{n}

%build

%install
rsync -a ./ %{i}/

%post
#Check if a newer revision is already installed
if [ -f ${RPM_INSTALL_PREFIX}/etc/%{pkgname}/version ] ; then
if [ $(cat ${RPM_INSTALL_PREFIX}/etc/%{pkgname}/version) -ge %{realversion} ] ; then
exit 0
fi
fi

mkdir -p $RPM_INSTALL_PREFIX/share/overrides ${RPM_INSTALL_PREFIX}/etc/%{pkgname}
for d in bin python ; do
rsync -a ${RPM_INSTALL_PREFIX}/%{pkgrel}/$d/ $RPM_INSTALL_PREFIX/share/overrides/$d/
done
echo %{realversion} > ${RPM_INSTALL_PREFIX}/etc/%{pkgname}/version

0 comments on commit 44b4677

Please sign in to comment.