2 # Copyright 2017 Intel Corporation
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at
8 # http://www.apache.org/licenses/LICENSE-2.0
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
16 DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
17 source $DIR/package-list.sh
19 VERSION=$CMTCAT_VERSION
21 bash $DIR/check_git_repo.sh $CMTCAT_DIR $CMTCAT_REPO
25 git clone $CMTCAT_REPO $CMTCAT_DIR
32 git checkout -b intel_rdt $CMTCAT_BRANCH
33 wget https://github.com/01org/intel-cmt-cat/archive/${VERSION}.tar.gz --directory-prefix=$CMTCAT_DIR
34 mv $CMTCAT_DIR/${VERSION}.tar.gz $RPM_WORKDIR/SOURCES/
35 rpmbuild --define "_topdir $RPM_WORKDIR" -bb $CMTCAT_DIR/rpm/intel-cmt-cat.spec
37 rpm -q intel-cmt-cat-devel
40 echo "*** intel-cmt-cat-devel is already installed"
42 RPM_NAME=`ls -1 $RPM_DIR | grep -E "cmt-cat-[0-9]"`
43 sudo rpm -ivf $RPM_DIR/$RPM_NAME
44 RPM_NAME=`ls -1 $RPM_DIR | grep -E "cmt-cat-devel-[0-9]"`
45 sudo rpm -ivf $RPM_DIR/$RPM_NAME