arrfab / centos / cbs-tools

Forked from centos/cbs-tools 5 years ago
Clone

Blame buildsys-tools/buildsys-tools.spec

Thomas Oulevey 79d958
Name:           buildsys-tools
Thomas Oulevey 79d958
Version:        0.1
Thomas Oulevey 79d958
Release:        14%{?dist}
Thomas Oulevey 79d958
Summary:        Tools from centos-git-common git repository
Thomas Oulevey 79d958
Thomas Oulevey 79d958
License:        GPLv2
Thomas Oulevey 79d958
URL:            https://git.centos.org/summary/centos-git-common.git
Thomas Oulevey 79d958
#Source0:       %{name}-%{version}.tgz
Thomas Oulevey 79d958
Source0:        get_sources.sh
Thomas Oulevey 79d958
Source1:        return_disttag.sh
Thomas Oulevey 79d958
BuildRoot:      %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
Thomas Oulevey 79d958
Thomas Oulevey 79d958
Requires:       python
Thomas Oulevey 79d958
Requires:       bash
Thomas Oulevey 79d958
Requires:       which
Thomas Oulevey 79d958
Requires:       git
Thomas Oulevey 79d958
Thomas Oulevey 79d958
%description
Thomas Oulevey 79d958
Thomas Oulevey 79d958
%install
Thomas Oulevey 79d958
rm -rf %{buildroot}
Thomas Oulevey 79d958
mkdir -p %{buildroot}%{_bindir}
Thomas Oulevey 79d958
cp %{SOURCE0} %{buildroot}%{_bindir}
Thomas Oulevey 79d958
cp %{SOURCE1} %{buildroot}%{_bindir}
Thomas Oulevey 79d958
Thomas Oulevey 79d958
cat >%{buildroot}%{_bindir}/get_sources <<'EOF'
Thomas Oulevey 79d958
#!/bin/bash
Thomas Oulevey 79d958
#MAJOR=`cat /etc/rpm/macros.dist | grep rhel | cut -d " " -f 2`
Thomas Oulevey 79d958
#git checkout c$MAJOR >> log
Thomas Oulevey 79d958
COMMIT=`git rev-parse HEAD`
Thomas Oulevey 79d958
BRANCH=`git branch -r --contains | cut -d / -f 2`
Thomas Oulevey 79d958
get_sources.sh -b $BRANCH >> log
Thomas Oulevey 79d958
EOF
Thomas Oulevey 79d958
Thomas Oulevey 79d958
chmod a+x %{buildroot}%{_bindir}/get_sources
Thomas Oulevey 79d958
Thomas Oulevey 79d958
%clean
Thomas Oulevey 79d958
rm -rf %{buildroot}
Thomas Oulevey 79d958
Thomas Oulevey 79d958
%files
Thomas Oulevey 79d958
%defattr(-,root,root,-)
Thomas Oulevey 79d958
%{_bindir}/*
Thomas Oulevey 79d958
Thomas Oulevey 79d958
Thomas Oulevey 79d958
%changelog
Thomas Oulevey 79d958
* Mon Jul 28 2014 Thomas Oulevey <thomas.oulevey@cern.ch> - 0.1-1
Thomas Oulevey 79d958
- Initial version
Thomas Oulevey 79d958