-
Notifications
You must be signed in to change notification settings - Fork 183
/
cmssw-wm-tools.spec
32 lines (27 loc) · 1.02 KB
/
cmssw-wm-tools.spec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
################################################################
####For any change, always update version number to latest date#
################################################################
### RPM cms cmssw-wm-tools 211210
## NOCOMPILER
## NO_VERSION_SUFFIX
%define commit aa1626fb2d2fdbde6b3259e4b44828220883a809
%define branch master
Source0: git://github.com/cms-sw/%{n}.git?obj=%{branch}/%{commit}&export=%{n}&output=/%{n}-%{commit}.tgz
%prep
%{?check_version_suffix:%check_version_suffix}
%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