File handbrake.spec of Package release-handbrake

Name:      handbrake-release
Version:   1.0
Release:   1
Summary:   An open-source multiplatform video transcoder repo
Group:     System Environment/Base
License:   GPL2
URL:       http://handbrake.fr/
Source0:   handbrake.repo
Source1:   RPM-GPG-KEY-handbrake
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

%description
An open-source multiplatform video transcoder repo .

%prep
%if 0%{?rhel_version} || 0%{?centos_version}
perl -pi -w -e 's|fedora|epel|g;' %{S:0}
%endif

%build
echo "Nothing to build"

%install
rm -rf $RPM_BUILD_ROOT

# Create dirs
install -d -m755 \
  $RPM_BUILD_ROOT%{_sysconfdir}/pki/rpm-gpg  \
  $RPM_BUILD_ROOT%{_sysconfdir}/yum.repos.d

# GPG Key
cp -p %{S:1} $RPM_BUILD_ROOT%{_sysconfdir}/pki/rpm-gpg/

# Yum .repo files
%{__install} -p -m644 %{S:0} $RPM_BUILD_ROOT%{_sysconfdir}/yum.repos.d/

%clean
rm -rf $RPM_BUILD_ROOT

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

%changelog
* Wed Mar 04 2015 Muhammad Shaban <Mr.Muhammad@linuxac.org> - 1.0-1
- Initial build
openSUSE Build Service is sponsored by