Created
September 12, 2010 13:27
-
-
Save n0ts/576105 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%define name_arch x86_64 | |
Name: yum-hoge-%{name_arch} | |
Version: 1 | |
Release: 1 | |
Summary: hoge yum repository for %{name_arch} | |
Group: System Environment/Base | |
License: GPL | |
URL: http://example.com | |
Source0: http://example.com/cobbler/repo_mirror/RPM-GPG-KEY-HOGE | |
Source1: yum-hoge-%{name_arch}.repo | |
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) | |
BuildArch: noarch | |
Requires: redhat-release >= %{version} | |
%description | |
hoge yum repository for %{name_arch} | |
%prep | |
%setup -q -c -T | |
install -pm 644 %{SOURCE0} . | |
%build | |
%install | |
rm -rf $RPM_BUILD_ROOT | |
# GPG Key | |
install -Dpm 644 %{SOURCE0} \ | |
$RPM_BUILD_ROOT%{_sysconfdir}/pki/rpm-gpg/RPM-GPG-KEY-HOGE | |
# yum | |
install -dm 755 $RPM_BUILD_ROOT%{_sysconfdir}/yum.repos.d | |
install -pm 644 %{SOURCE1} \ | |
$RPM_BUILD_ROOT%{_sysconfdir}/yum.repos.d | |
%clean | |
rm -rf $RPM_BUILD_ROOT | |
%files | |
%defattr(-,root,root,-) | |
%config(noreplace) /etc/yum.repos.d/* | |
/etc/pki/rpm-gpg/RPM-GPG-KEY-HOGE | |
%changelog | |
* Sun Sep 12 2010 Naoya Nakazawa <my email address> - 1-1 | |
- Initial version |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment