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

Add SLHA data files from cms-data repository. #1457

Merged
merged 1 commit into from Mar 20, 2015
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
1 change: 1 addition & 0 deletions cmsswdata.spec
Expand Up @@ -41,6 +41,7 @@ Requires: data-RecoTracker-RingESSource
Requires: data-RecoTracker-RoadMapESSource
Requires: data-CalibTracker-SiPixelESProducers
Requires: data-RecoHI-HiJetAlgos
Requires: data-Configuration-Generator

%if "%online" != "true"
# extra data dependencies for standard builds
Expand Down
5 changes: 5 additions & 0 deletions data-Configuration-Generator.spec
@@ -0,0 +1,5 @@
### RPM cms data-Configuration-Generator V01-00-00

%prep

## IMPORT data-build-github
41 changes: 41 additions & 0 deletions data-build-github.file
@@ -0,0 +1,41 @@
### FILE data-build-github.file
## NOCOMPILER

%build

DOWNLOAD_TOOL=$(basename $(which curl || which wget || echo "none"))
DOWNLOAD_FILE=%{realversion}.tar.gz
DEST_DIR=%{i}/$(echo "%{n}" | sed -e "s/data-//g;s/-/\//g")/data
GIT_REPO=$(echo "%{n}" | sed -e "s/data-//g")
GIT_URL=https://github.com/cms-data/${GIT_REPO}/archive/${DOWNLOAD_FILE}
mkdir -p ${DEST_DIR}
pushd ${DEST_DIR}

case "${DOWNLOAD_TOOL}" in
curl)
# cURL does not download empty files, touch file before downloading
touch ${DOWNLOAD_FILE}
curl -L -O -k $GIT_URL
;;
wget)
wget --no-check-certificate --no-verbose $GIT_URL
;;
none)
echo "Unsupported download tool. Could not locate curl or wget. Contact package maintainer."
exit 1
;;
esac

tar xzvf ${DOWNLOAD_FILE} --strip 1
rm ${DOWNLOAD_FILE}
popd

find %{i} -type d -exec chmod 0755 {} \;
find %{i} -type f -exec chmod 0644 {} \;

%install

%post
%define base_tool %(echo "%{n}" | tr '[a-z-]' '[A-Z_]')
echo "%{base_tool}_ROOT='${CMS_INSTALL_PREFIX}/%{pkgrel}'" > ${RPM_INSTALL_PREFIX}/%{pkgrel}/etc/profile.d/init.sh
echo "set %{base_tool}_ROOT='${CMS_INSTALL_PREFIX}/%{pkgrel}'" > ${RPM_INSTALL_PREFIX}/%{pkgrel}/etc/profile.d/init.csh