Summary: Tortix archive configuration
Name: tortix-release
Version: 0.4
Release: 1
License: GPL
Group: System Environment/Base
URL: http://www.atomicrocketturtle.com/

Packager:  Support <support@atomicorp.com>
Vendor: Atomicorp, http://www.atomicorp.com/

Source1:        RPM-GPG-KEY.atomicorp.txt
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root
BuildRequires: net-tools
Requires:       yum >= 2.2
BuildArch: noarch


%description
Pronounced /tor·toise/. It has rocket feet.

This package contains the repository GPG key in addition to configuration files for yum.

%prep
#%setup -c 

%build
%{?el5:name='CloudLinux / CentOS / Red Hat Enterprise Linux'; version='5'; path="redhat"; }
%{?el6:name='CloudLinux / CentOS / Red Hat Enterprise Linux'; version='6'; path="redhat"; }
%{?el6:name='CloudLinux / CentOS / Red Hat Enterprise Linux'; version='7'; path="redhat"; }


%{__cat} <<EOF >tortix.repo
# Name: Atomicorp RPM Repository for $name $version - $builder
# URL: http://www.atomicorp.com/
[tortix]
name = $name \$releasever - atomicorp.com
mirrorlist = file:///etc/asl/tortix-mirrorlist
enabled = 1
priority = 1
protect = 0
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY.atomicorp.txt
gpgcheck = 1

# Almost Stable, release candidates for [tortix]
[tortix-testing]
name = $name \$releasever - atomicorp.com - (Testing)
mirrorlist = file:///etc/asl/tortix-testing-mirrorlist
enabled = 0
priority = 1
protect = 0
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY.atomicorp.txt
gpgcheck = 1
EOF

%{__cat} <<EOF >tortix-kernel.repo
# Name: Atomicorp kernel RPM Repository for $name $version - $builder
# URL: http://www.atomicorp.com/
[tortix-kernel]
name = $name \$releasever - atomicorp.com
mirrorlist = file:///etc/asl/tortix-kernel-mirrorlist
enabled = 0
priority = 1
protect = 0
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY.atomicorp.txt
gpgcheck = 1

# Almost Stable, release candidates for [tortix-kernel]
[tortix-kernel-testing]
name = $name \$releasever - atomicorp.com - (Testing)
mirrorlist = file:///etc/asl/tortix-kernel-testing-mirrorlist
enabled = 0
priority = 1
protect = 0
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY.atomicorp.txt
gpgcheck = 1


[tortix-kernel-xen]
name = $name \$releasever - atomicorp.com
mirrorlist = file:///etc/asl/tortix-kernel-xen-mirrorlist
enabled = 0
priority = 1
protect = 0
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY.atomicorp.txt
gpgcheck = 1

# Almost Stable, release candidates for [tortix-kernel]
[tortix-kernel-xen-testing]
name = $name \$releasever - atomicorp.com - (Testing)
mirrorlist = file:///etc/asl/tortix-kernel-xen-testing-mirrorlist
enabled = 0
priority = 1
protect = 0
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY.atomicorp.txt
gpgcheck = 1



EOF

%install
%{__rm} -rf %{buildroot}
%{__install} -Dp -m0644 %{SOURCE1}  %{buildroot}%{_sysconfdir}/pki/rpm-gpg/RPM-GPG-KEY.atomicorp.txt
%{__install} -Dp -m0644 tortix.repo %{buildroot}%{_sysconfdir}/yum.repos.d/tortix.repo
%{__install} -Dp -m0644 tortix-kernel.repo %{buildroot}%{_sysconfdir}/yum.repos.d/tortix-kernel.repo



%clean
%{__rm} -rf %{buildroot}

%files
%defattr(-,root,root)
%dir %{_sysconfdir}/yum.repos.d/
%config %{_sysconfdir}/yum.repos.d/tortix.repo
%config %{_sysconfdir}/yum.repos.d/tortix-kernel.repo
%dir %{_sysconfdir}/pki/rpm-gpg/
%{_sysconfdir}/pki/rpm-gpg/RPM-GPG-KEY.atomicorp.txt


%changelog
* Wed Feb 13 2013 Support <support@atomicorp.com>
- Add kernel xen channels

* Tue Nov 20 2012 Support <support@atomicorp.com>
- initial build of the tortix yum config package