1 |
eulisse |
1.2 |
### RPM cms pkgtools 1.0
|
2 |
|
|
## INITENV ALIAS cmsbuild %{i}/bin/install.sh -spec_dir ./inst-files
|
3 |
|
|
## INITENV ALIAS_SH cmsapt eval `%{i}/bin/aptinstaller.sh config -path %{instroot} -sh`
|
4 |
|
|
## INITENV ALIAS_CSH cmsapt eval `%{i}/bin/aptinstaller.sh config -path %{instroot} -csh`
|
5 |
eulisse |
1.5 |
## INITENV ALIAS updateAptRepository %{i}/bin/updateServer.sh
|
6 |
eulisse |
1.1 |
|
7 |
|
|
# This generates an rpm for aptinstaller, install.sh, etc. etc.
|
8 |
|
|
Requires: cms-env
|
9 |
|
|
%define moduleName PKGTOOLS
|
10 |
|
|
%define exportName PKGTOOLS
|
11 |
eulisse |
1.6 |
%define cvstag V00-02-08
|
12 |
eulisse |
1.1 |
%define cvsserver cvs://:pserver:anonymous@cmscvs.cern.ch:2401/cvs_server/repositories/CMSSW?passwd=AA_:yZZ3e
|
13 |
eulisse |
1.4 |
Source: %cvsserver&strategy=checkout&module=%{moduleName}&nocache=true&export=%{exportName}&tag=-r%{cvstag}&output=/PKGTOOLS.tar.gz
|
14 |
eulisse |
1.1 |
|
15 |
|
|
%prep
|
16 |
|
|
%setup -n PKGTOOLS
|
17 |
|
|
%build
|
18 |
|
|
%install
|
19 |
|
|
make PREFIX=%{i} install
|
20 |
|
|
mkdir -p %{instroot}/%{cmsplatf}/etc/profile.d
|
21 |
|
|
ln -sf %{i}/etc/profile.d/init.sh %{instroot}/%{cmsplatf}/etc/profile.d/S00pkgtools.sh
|
22 |
|
|
ln -sf %{i}/etc/profile.d/init.csh %{instroot}/%{cmsplatf}/etc/profile.d/S00pkgtools.csh
|
23 |
|
|
ln -sf %{i}/inst-files %{instroot}/inst-files
|
24 |
|
|
%files
|
25 |
|
|
%{i}
|
26 |
|
|
%{instroot}/%{cmsplatf}/etc/profile.d/S00pkgtools.sh
|
27 |
|
|
%{instroot}/%{cmsplatf}/etc/profile.d/S00pkgtools.csh
|
28 |
|
|
|
29 |
eulisse |
1.4 |
|
30 |
eulisse |
1.1 |
%post
|
31 |
eulisse |
1.2 |
perl -p -i -e 's|(.*setenv.*)|#$1|' $RPM_INSTALL_PREFIX/%pkgrel/etc/profile.d/init.csh
|
32 |
|
|
perl -p -i -e 's|(.*export.*)|#$1|' $RPM_INSTALL_PREFIX/%pkgrel/etc/profile.d/init.sh
|
33 |
eulisse |
1.1 |
ln -sf $RPM_INSTALL_PREFIX/%{pkgrel}/etc/profile.d/init.sh $RPM_INSTALL_PREFIX/%cmsplatf/etc/profile.d/S00pkgtools.sh
|
34 |
|
|
ln -sf $RPM_INSTALL_PREFIX/%{pkgrel}/etc/profile.d/init.csh $RPM_INSTALL_PREFIX/%cmsplatf/etc/profile.d/S00pkgtools.csh
|