-
Notifications
You must be signed in to change notification settings - Fork 0
/
TigerOS-release.spec
123 lines (103 loc) · 4.07 KB
/
TigerOS-release.spec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
%global release_name TigerOS
%global dist_version 28
Name: tigeros-release
Version: %{dist_version}
Release: 1.0
Summary: TigerOS release files
License: MIT
URL: https://Github.com/RITlug/TigerOS
Source0: LICENSE
Source1: README.developers
Source2: README.TigerOS-Release-Notes
Source3: README.license
Source4: 85-display-manager.preset
Source5: 90-default.preset
Source6: 99-default-disable.preset
Obsoletes: redhat-release
Provides: redhat-release
Provides: system-release
Provides: system-release(%{version})
Requires: fedora-repos(%{version})
BuildArch: noarch
Conflicts: fedora-release
%description
TigerOS release files such as yum configs and various /etc/ files that
define the release. This package explicitly is a replacement for the
trademarked release package, if you are unable for any reason to abide by the
trademark restrictions on that release package.
%package notes
Summary: Release Notes
License: Open Publication
Provides: system-release-notes = %{version}-%{release}
Conflicts: fedora-release-notes
%description notes
TigerOS release notes package. This package explicitly is a replacement
for the trademarked release-notes package, if you are unable for any reason
to abide by the trademark restrictions on that release-notes
package. Please note that there is no actual useful content here.
%prep
%setup -c -T
cp -a %{SOURCE0} %{SOURCE1} %{SOURCE2} %{SOURCE3} %{SOURCE4} %{SOURCE5} %{SOURCE6} .
%install
install -d %{buildroot}/etc
echo "TigerOS release %{version} (%{release_name})" > %{buildroot}/etc/fedora-release
echo "cpe:/o:TigerOS:TigerOS:%{version}" > %{buildroot}/etc/system-release-cpe
cp -p %{buildroot}/etc/fedora-release %{buildroot}/etc/issue
echo "Kernel \r on an \m (\l)" >> %{buildroot}/etc/issue
cp -p %{buildroot}/etc/issue %{buildroot}/etc/issue.net
echo >> %{buildroot}/etc/issue
ln -s fedora-release %{buildroot}/etc/redhat-release
ln -s fedora-release %{buildroot}/etc/system-release
%{__mkdir_p} %{buildroot}/usr/lib/systemd/system-preset/
cat << EOF >>%{buildroot}/usr/lib/os-release
NAME=TigerOS
VERSION="%{version} (%{release_name})"
ID=TigerOS
VERSION_ID=%{version}
PRETTY_NAME="TigerOS %{version} (%{release_name})"
ANSI_COLOR="0;34"
CPE_NAME="cpe:/o:TigerOS:TigerOS:%{version}"
EOF
# Create the symlink for /etc/os-release
ln -s ../usr/lib/os-release %{buildroot}/etc/os-release
# Set up the dist tag macros
install -d -m 755 %{buildroot}%{_rpmconfigdir}/macros.d
cat >> %{buildroot}%{_rpmconfigdir}/macros.d/macros.dist << EOF
# dist macros.
%%fedora %{dist_version}
%%dist .fc%{dist_version}
%%fc%{dist_version} 1
EOF
# Add presets
# Default system wide
install -m 0644 85-display-manager.preset %{buildroot}%{_prefix}/lib/systemd/system-preset/
install -m 0644 90-default.preset %{buildroot}%{_prefix}/lib/systemd/system-preset/
install -m 0644 99-default-disable.preset %{buildroot}%{_prefix}/lib/systemd/system-preset/
%files
%defattr(-,root,root,-)
%license LICENSE README.license
%config %attr(0644,root,root) /usr/lib/os-release
/etc/os-release
%config %attr(0644,root,root) /etc/fedora-release
/etc/redhat-release
/etc/system-release
%config %attr(0644,root,root) /etc/system-release-cpe
%config(noreplace) %attr(0644,root,root) /etc/issue
%config(noreplace) %attr(0644,root,root) /etc/issue.net
%attr(0644,root,root) %{_rpmconfigdir}/macros.d/macros.dist
%{_prefix}/lib/systemd/system-preset/85-display-manager.preset
%{_prefix}/lib/systemd/system-preset/90-default.preset
%{_prefix}/lib/systemd/system-preset/99-default-disable.preset
%files notes
%defattr(-,root,root,-)
%doc README.TigerOS-Release-Notes
%changelog
* Wed May 16 2018 Tim Zabel <tjz8659@rit.edu> - 28-1.0
- rebuild for Fedora 28
- remove deprecated macros
* Thu Dec 14 2017 Christian Martin <ctmartin@mail.rit.edu> - 27-1.0
- rebuild for Fedora 27
* Wed Aug 30 2017 Aidan Kahrs <axk4545@rit.edu> - 26-1.0
- rebuild for Fedora 26
* Sun Apr 23 2017 Aidan Kahrs <axk4545@rit.edu> 1.0
- initial package for tigeros-release and tigeros-release-notes