You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
136 lines
3.7 KiB
136 lines
3.7 KiB
Name: powerel-release |
|
Version: 7 |
|
Release: 1%{?dist} |
|
Summary: PowerEL release file |
|
Group: System Environment/Base |
|
License: GPLv2 |
|
Provides: powerel-release = %{version}-%{release} |
|
Provides: centos-release(upstream) = %{upstream_rel} |
|
Provides: redhat-release = %{upstream_rel} |
|
Provides: system-release = %{upstream_rel} |
|
Provides: system-release(releasever) = %{base_release_version} |
|
Obsoletes: rawhide-release |
|
Obsoletes: redhat-release-as |
|
Obsoletes: redhat-release-es |
|
Obsoletes: redhat-release-ws |
|
Obsoletes: redhat-release-de |
|
Obsoletes: redhat-release-client |
|
Obsoletes: redhat-release-computenode |
|
Obsoletes: redhat-release-webserver |
|
Obsoletes: redhat-release-workstation |
|
Obsoletes: comps |
|
Obsoletes: rpmdb-redhat |
|
Obsoletes: fedora-release |
|
Obsoletes: tao-release |
|
Obsoletes: whitebox-release |
|
Obsoletes: oracle-release |
|
Obsoletes: sl-release |
|
Obsoletes: centos-release |
|
Source0: %{name}-%{version}.tar.gz |
|
Source1: 85-display-manager.preset |
|
Source2: 90-default.preset |
|
|
|
|
|
%description |
|
PowerEL release and information files |
|
|
|
|
|
%prep |
|
%setup -q -n %{name}-%{version} |
|
|
|
|
|
%build |
|
echo OK |
|
|
|
|
|
%install |
|
rm -rf %{buildroot} |
|
mkdir -p %{buildroot}/etc |
|
echo "PowerEL release %{version}" > %{buildroot}/etc/%{name} |
|
ln -s %{name} %{buildroot}/etc/system-release |
|
# create /etc/os-release |
|
cat << EOF >>%{buildroot}/etc/os-release |
|
NAME="PowerEL" |
|
VERSION="%{version}" |
|
ID="pel" |
|
ID_LIKE="rhel fedora" |
|
VERSION_ID="%{version}" |
|
PRETTY_NAME="PowerEL %{version}" |
|
ANSI_COLOR="0;33" |
|
CPE_NAME="cpe:/o:powerel:powerel:7:ppcbe" |
|
HOME_URL="https://www.powerel.org/" |
|
BUG_REPORT_URL="https://bugzilla.powerel.org/" |
|
|
|
POWEREL_BUGZILLA_PRODUCT="PowerEL %{version} %{arch}" |
|
POWEREL_BUGZILLA_PRODUCT_VERSION=%{version} |
|
POWEREL_SUPPORT_PRODUCT="PowerEL %{version} %{arch}" |
|
POWEREL_SUPPORT_PRODUCT_VERSION="%{version}" |
|
|
|
EOF |
|
# write cpe to /etc/system/release-cpe |
|
echo "cpe:/o:powerel:powerel:7" > %{buildroot}/etc/system-release-cpe |
|
# create /etc/issue and /etc/issue.net |
|
echo '\S' > %{buildroot}/etc/issue |
|
echo 'Kernel \r on an \m' >> %{buildroot}/etc/issue |
|
cp %{buildroot}/etc/issue %{buildroot}/etc/issue.net |
|
echo >> %{buildroot}/etc/issue |
|
# copy GPG keys |
|
mkdir -p -m 755 %{buildroot}/etc/pki/rpm-gpg |
|
for file in RPM-GPG-KEY* ; do |
|
install -m 644 $file %{buildroot}/etc/pki/rpm-gpg |
|
done |
|
# copy yum repos |
|
mkdir -p -m 755 %{buildroot}/etc/yum.repos.d |
|
for file in PowerEL-*.repo; do |
|
install -m 644 $file %{buildroot}/etc/yum.repos.d |
|
done |
|
# set up the dist tag macros |
|
install -d -m 755 %{buildroot}/etc/rpm |
|
cat >> %{buildroot}/etc/rpm/macros.dist << EOF |
|
# dist macros. |
|
|
|
%%pel 7 |
|
%%powerel 7 |
|
%%rhel 7 |
|
%%centos 7 |
|
%%dist pel7 |
|
%%pel7 1 |
|
%%el7 1 |
|
%%centos7 1 |
|
%%rhel7 1 |
|
%%ol7 1 |
|
EOF |
|
# use unbranded datadir |
|
mkdir -p -m 755 %{buildroot}/%{_datadir}/powerel-release |
|
install -m 644 EULA %{buildroot}/%{_datadir}/powerel-release |
|
# use unbranded docdir |
|
mkdir -p -m 755 %{buildroot}/%{_docdir}/powerel-release |
|
install -m 644 GPL %{buildroot}/%{_docdir}/powerel-release |
|
install -m 644 Contributors %{buildroot}/%{_docdir}/powerel-release |
|
# copy systemd presets |
|
mkdir -p %{buildroot}%{_prefix}/lib/systemd/system-preset/ |
|
install -m 0644 %{SOURCE1} %{buildroot}%{_prefix}/lib/systemd/system-preset/ |
|
install -m 0644 %{SOURCE2} %{buildroot}%{_prefix}/lib/systemd/system-preset/ |
|
|
|
|
|
%clean |
|
rm -rf %{buildroot} |
|
|
|
|
|
%files |
|
%defattr(0644,root,root,0755) |
|
/etc/powerel-release |
|
/etc/system-release |
|
%config /etc/system-release-cpe |
|
%config(noreplace) /etc/os-release |
|
%config(noreplace) /etc/issue |
|
%config(noreplace) /etc/issue.net |
|
/etc/pki/rpm-gpg/ |
|
%config(noreplace) /etc/yum.repos.d/* |
|
/etc/rpm/macros.dist |
|
%{_docdir}/powerel-release/* |
|
%{_datadir}/powerel-release/* |
|
%{_prefix}/lib/systemd/system-preset/* |
|
|
|
|
|
%changelog
|
|
|