1 |
< |
### RPM cms pkgtools 1.0 |
2 |
< |
Requires: gcc-wrapper |
3 |
< |
## INITENV ALIAS cmsbuild %{i}/bin/install.sh -spec_dir ./inst-files |
4 |
< |
## INITENV ALIAS_SH cmsapt eval `%{i}/bin/aptinstaller.sh config -path %{instroot} -sh` |
5 |
< |
## INITENV ALIAS_CSH cmsapt eval `%{i}/bin/aptinstaller.sh config -path %{instroot} -csh` |
6 |
< |
## INITENV ALIAS updateAptRepository %{i}/bin/updateServer.sh |
7 |
< |
|
1 |
> |
### RPM cms pkgtools 0.6.0 |
2 |
|
# This generates an rpm for aptinstaller, install.sh, etc. etc. |
3 |
< |
Requires: cms-env |
3 |
> |
Requires: cms-env apt git |
4 |
|
%define moduleName PKGTOOLS |
5 |
|
%define exportName PKGTOOLS |
6 |
< |
%define cvstag V00-04-07 |
6 |
> |
%define cvstag V00-06-08 |
7 |
|
%define cvsserver cvs://:pserver:anonymous@cmscvs.cern.ch:2401/cvs_server/repositories/CMSSW?passwd=AA_:yZZ3e |
8 |
|
Source: %cvsserver&strategy=checkout&module=%{moduleName}&nocache=true&export=%{exportName}&tag=-r%{cvstag}&output=/PKGTOOLS.tar.gz |
9 |
|
|
10 |
|
%prep |
11 |
|
%setup -n PKGTOOLS |
12 |
|
%build |
19 |
– |
## IMPORT gcc-wrapper |
13 |
|
%install |
14 |
< |
make PREFIX=%{i} install |
15 |
< |
mkdir -p %{instroot}/%{cmsplatf}/etc/profile.d |
16 |
< |
ln -sf %{i}/etc/profile.d/init.sh %{instroot}/%{cmsplatf}/etc/profile.d/S00pkgtools.sh |
17 |
< |
ln -sf %{i}/etc/profile.d/init.csh %{instroot}/%{cmsplatf}/etc/profile.d/S00pkgtools.csh |
18 |
< |
ln -sf %{i}/inst-files %{instroot}/inst-files |
19 |
< |
%files |
20 |
< |
%{i} |
21 |
< |
%{instroot}/%{cmsplatf}/etc/profile.d/S00pkgtools.sh |
22 |
< |
%{instroot}/%{cmsplatf}/etc/profile.d/S00pkgtools.csh |
14 |
> |
mkdir -p %{i}/bin |
15 |
> |
ln -sf %{cmsplatf}/%pkgrel/etc/profile.d/init.sh %{instroot}/pkgtools-init.sh |
16 |
> |
install -m 755 cmsBuild %{i}/bin/cmsBuild |
17 |
> |
install -m 755 downloadOracle.sh %{i}/bin/downloadOracle.sh |
18 |
> |
|
19 |
> |
rm -rf %i/etc/profile.d |
20 |
> |
mkdir -p %i/etc/profile.d |
21 |
> |
echo '#!/bin/sh' > %{i}/etc/profile.d/dependencies-setup.sh |
22 |
> |
echo '#!/bin/tcsh' > %{i}/etc/profile.d/dependencies-setup.csh |
23 |
> |
echo requiredtools `echo %{requiredtools} | sed -e's|\s+| |;s|^\s+||'` |
24 |
> |
for tool in `echo %{requiredtools} | sed -e's|\s+| |;s|^\s+||'` |
25 |
> |
do |
26 |
> |
case X$tool in |
27 |
> |
Xdistcc|Xccache ) |
28 |
> |
;; |
29 |
> |
* ) |
30 |
> |
toolcap=`echo $tool | tr a-z- A-Z_` |
31 |
> |
eval echo ". $`echo ${toolcap}_ROOT`/etc/profile.d/init.sh" >> %{i}/etc/profile.d/dependencies-setup.sh |
32 |
> |
eval echo "source $`echo ${toolcap}_ROOT`/etc/profile.d/init.csh" >> %{i}/etc/profile.d/dependencies-setup.csh |
33 |
> |
;; |
34 |
> |
esac |
35 |
> |
done |
36 |
> |
perl -p -i -e 's|\. /etc/profile\.d/init\.sh||' %{i}/etc/profile.d/dependencies-setup.sh |
37 |
> |
perl -p -i -e 's|source /etc/profile\.d/init\.csh||' %{i}/etc/profile.d/dependencies-setup.csh |
38 |
|
|
39 |
|
%post |
40 |
< |
perl -p -i -e 's|(.*setenv.*)|#$1|' $RPM_INSTALL_PREFIX/%pkgrel/etc/profile.d/init.csh |
41 |
< |
perl -p -i -e 's|(.*export.*)|#$1|' $RPM_INSTALL_PREFIX/%pkgrel/etc/profile.d/init.sh |
42 |
< |
ln -sf $RPM_INSTALL_PREFIX/%{pkgrel}/etc/profile.d/init.sh $RPM_INSTALL_PREFIX/%cmsplatf/etc/profile.d/S00pkgtools.sh |
43 |
< |
ln -sf $RPM_INSTALL_PREFIX/%{pkgrel}/etc/profile.d/init.csh $RPM_INSTALL_PREFIX/%cmsplatf/etc/profile.d/S00pkgtools.csh |
40 |
> |
%{relocateConfig}/etc/profile.d/dependencies-setup.sh |
41 |
> |
%{relocateConfig}/etc/profile.d/dependencies-setup.csh |
42 |
> |
%files |
43 |
> |
%{i} |
44 |
> |
%{instroot}/pkgtools-init.sh |