Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

new scram version and config tag #1147

Merged
merged 1 commit into from
Oct 27, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
18 changes: 9 additions & 9 deletions SCRAMV1.spec
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
### RPM lcg SCRAMV1 V2_2_6_pre1
### RPM lcg SCRAMV1 V2_2_6_pre2
## NOCOMPILER
Provides: perl(BuildSystem::Template::Plugins::PluginCore)
Provides: perl(BuildSystem::TemplateStash)
Expand Down Expand Up @@ -43,14 +43,10 @@ fi

%setup -n %GitHubVersion
%build
%install
tar -cf - . | tar -C %i -xvvf -
mkdir -p %i/src/main %{i}/etc/profile.d
gmake %{makeprocesses} all INSTALL_BASE=%{instroot} VERSION=%{realversion} PREFIX=%{i}

#SCRAM/INSTALL.txt recomendations
sed -i -e "s|@CMS_PATH@|%instroot|g;s|@SCRAM_VERSION@|%v|g" %i/bin/scram
ln -s ../../bin/scram %i/src/main/scram.pl
chmod 755 %i/bin/scram
%install
gmake %{makeprocesses} install INSTALL_BASE=%{instroot} VERSION=%{realversion} PREFIX=%{i}

%post
%{relocateRpmPkg}bin/scram
Expand All @@ -69,14 +65,15 @@ if [ ! -d $RPM_INSTALL_PREFIX/etc/scramrc ] ; then
[ ! -f $RPM_INSTALL_PREFIX/%{OldDB} ] || grep '%{OldDB} *$' $RPM_INSTALL_PREFIX/%{OldDB} | awk '{print $2}' | sed 's|%{OldDB}.*||' > $RPM_INSTALL_PREFIX/etc/scramrc/links.db
fi

touch $RPM_INSTALL_PREFIX/etc/scramrc/site.cfg
mkdir -p $RPM_INSTALL_PREFIX/%{cmsplatf}/etc/default-scram $RPM_INSTALL_PREFIX/share/etc/default-scram
cd $RPM_INSTALL_PREFIX/%{cmsplatf}
VERSION_REGEXP="%{SCRAM_ALL_VERSIONS}" ; VERSION_FILE=default-scramv1-version ; %{SetLatestVersion}
VERSION_REGEXP="%{SCRAM_REL_MAJOR}_" ; VERSION_FILE=default-scram/%{SCRAM_REL_MAJOR}; %{SetLatestVersion}
%{BackwardCompatibilityVersionPolicy}

#Create a shared copy of this version
mkdir -p $RPM_INSTALL_PREFIX/share/%{pkgdir}
mkdir -p $RPM_INSTALL_PREFIX/share/%{pkgdir} $RPM_INSTALL_PREFIX/share/man/man1
rsync --links --ignore-existing --recursive --exclude='etc/' $RPM_INSTALL_PREFIX/%{pkgrel}/ $RPM_INSTALL_PREFIX/share/%{pkgdir}
for f in `rsync --links --ignore-existing --recursive --itemize-changes $RPM_INSTALL_PREFIX/%{pkgrel}/etc $RPM_INSTALL_PREFIX/share/%{pkgdir} | grep '^>f' | sed -e 's|.* ||'` ; do
sed -i -e 's|/%{pkgrel}|/share/%{pkgdir}|g' $RPM_INSTALL_PREFIX/share/%{pkgdir}/$f
Expand All @@ -85,6 +82,9 @@ cd $RPM_INSTALL_PREFIX/share
VERSION_REGEXP="%{SCRAM_ALL_VERSIONS}" ; VERSION_FILE=default-scramv1-version ; %{SetLatestVersion}
VERSION_REGEXP="%{SCRAM_REL_MAJOR}_" ; VERSION_FILE=default-scram/%{SCRAM_REL_MAJOR}; %{SetLatestVersion}

if [ `cat $RPM_INSTALL_PREFIX/share/etc/default-scramv1-version` == '%v' ] ; then
cp -f $RPM_INSTALL_PREFIX/%{pkgrel}/docs/man/man1/scram.1 ${RPM_INSTALL_PREFIX}/share/man/man1/scram.1
fi
#FIMEME: Remove it when cmsBuild has a fix
#For some strange reason we need something after the last statement
#otherwise RPM does not run it. rpm -q --scripts also confirm that above
Expand Down
2 changes: 1 addition & 1 deletion scram-project-build.file
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ Requires: file
%endif

%if "%{?configtag:set}" != "set"
%define configtag V05-03-27
%define configtag V05-03-28
%endif

%if "%{?useCmsTC:set}" != "set"
Expand Down