File owncloud.spec of Package owncloud-release

Name:      owncloud-release
Version:   1.0
Release:   1
Summary:   ownCloud Server improves Federated Cloud sharing repository
Group:     System Environment/Base
License:   GPL
Source0:   owncloud.repo
Source1:   owncloud-desktop.repo
Source2:   owncloud-centos.repo
Source3:   owncloud-desktop-centos.repo
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
%description
ownCloud Server improves Federated Cloud sharing repository .

%prep
echo "Nothing to prep"

%build
echo "Nothing to build"

%install
rm -rf %{buildroot}

# Create dirs
install -d -m755 %{buildroot}%{_sysconfdir}/yum.repos.d

# Yum .repo files
%if 0%{?fedora}
%{__install} -p -m644 %{S:0} %{S:1} \
    %{buildroot}%{_sysconfdir}/yum.repos.d/
%endif
%if 0%{?centos_version}
%{__install} -p -m644 %{S:2} %{S:3} \
    %{buildroot}%{_sysconfdir}/yum.repos.d/
%endif

%clean
rm -rf %{buildroot}

%files
%defattr(-,root,root,-)
%{_sysconfdir}/yum.repos.d/*

%changelog
* Tue Feb 24 2015 Mohammad Shaban<Mr.Muhammad@outlook.com> - 1.0-1
- Initial build 1