Skip to content

Commit

Permalink
added cmssw-osenv as cmssw dep
Browse files Browse the repository at this point in the history
  • Loading branch information
smuzaffar committed Jan 28, 2019
1 parent def73be commit 7e1fe2a
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 1 deletion.
41 changes: 41 additions & 0 deletions cmssw-osenv.spec
@@ -0,0 +1,41 @@
### RPM cms cmssw-osenv 190128.0
## NOCOMPILER

# ***Do not change minor number of the above version. ***

%define commit 00d838b373f0795e8e5ca21811f9c3c395afdb6f
%define branch master
# We do not use a revision explicitly, because revisioned packages do not get
# updated automatically when there are dependencies.
%define fakerevision %(echo %realversion | cut -d. -f1)
Source0: git://github.com/cms-sw/cmssw-osenv.git?obj=%{branch}/%{commit}&export=cmssw-osenv&output=/cmssw-osenv-%{commit}.tgz

%prep
%setup -n %{n}

%build

%install
mkdir -p %{i}/common
mv * %{i}/common

%post
cd ${RPM_INSTALL_PREFIX}/%{pkgrel}
mkdir -p ${RPM_INSTALL_PREFIX}/common ${RPM_INSTALL_PREFIX}/etc/%{pkgname}

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

for file in $(find . -name '*' -type f -path '*/common/*') ; do
cp -f ${file} ${RPM_INSTALL_PREFIX}/${file}
done
for file in $(find . -name '*' -type l -path '*/common/*') ; do
cp -pRf ${file} ${RPM_INSTALL_PREFIX}/${file}
done

echo %{fakerevision} > ${RPM_INSTALL_PREFIX}/etc/%{pkgname}/version
2 changes: 1 addition & 1 deletion cmssw.spec
@@ -1,6 +1,6 @@
### RPM cms cmssw CMSSW_10_1_0_pre1

Requires: cmssw-tool-conf python cms-git-tools
Requires: cmssw-tool-conf python cms-git-tools cmssw-osenv

%define runGlimpse yes
%define saveDeps yes
Expand Down

0 comments on commit 7e1fe2a

Please sign in to comment.