-
Notifications
You must be signed in to change notification settings - Fork 3.3k
/
apache-arrow-release.spec.in
142 lines (114 loc) · 4.59 KB
/
apache-arrow-release.spec.in
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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
# -*- sh-shell: rpm -*-
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
%define _amzn %{?amzn:%{amzn}}%{!?amzn:0}
%define _rhel %{?rhel:%{rhel}}%{!?rhel:0}
%define use_dnf (%{_rhel} >= 8 || %{_amzn} >= 2023)
%define use_epel (%{_amzn} < 2023)
%if %{use_dnf}
%define yum_repository_enable() (dnf config-manager --set-enabled %1)
%define yum_repository_disable() (dnf config-manager --set-disabled %1)
%else
%define yum_repository_enable() (yum-config-manager --enable %1)
%define yum_repository_disable() (yum-config-manager --disable %1)
%endif
Name: @PACKAGE@
Version: @VERSION@
Release: @RELEASE@%{?dist}
Summary: Apache Arrow release files
License: Apache-2.0
URL: https://arrow.apache.org/
Source0: @PACKAGE@-%{version}.tar.gz
BuildArch: noarch
%if %{use_epel}
Requires: epel-release
%endif
%if %{use_dnf}
Requires: dnf-command(config-manager)
%else
Requires: yum-utils
%endif
%description
Apache Arrow release files.
%prep
%setup -q
%build
distribution=$(. /etc/os-release && echo "${ID}")
if [ "${distribution}" = "rhel" ]; then
# We use distribution version explicitly for RHEL because we can't
# use symbolic link on Artifactory. CentOS and AlmaLinux uses 7 and
# 8 but RHEL uses 7Server and 8Server for $releasever. If we can use
# symbolic link on Artifactory we can use $releasever directly.
distribution_version=$(. /etc/os-release && echo "${VERSION_ID}")
sed -i'' -e "s/\\\$releasever/${distribution_version}/g" Apache-Arrow.repo
fi
%install
rm -rf $RPM_BUILD_ROOT
%{__install} -Dp -m0644 KEYS \
$RPM_BUILD_ROOT%{_sysconfdir}/pki/rpm-gpg/RPM-GPG-KEY-Apache-Arrow
%{__install} -d $RPM_BUILD_ROOT%{_sysconfdir}/yum.repos.d/
%{__install} -Dp -m0644 Apache-Arrow.repo \
$RPM_BUILD_ROOT%{_sysconfdir}/yum.repos.d/Apache-Arrow.repo
%files
%defattr(-, root, root, 0755)
%doc
%dir %{_sysconfdir}/yum.repos.d/
%dir %{_sysconfdir}/pki/rpm-gpg/
%{_sysconfdir}/pki/rpm-gpg/RPM-GPG-KEY-Apache-Arrow
%config(noreplace) %{_sysconfdir}/yum.repos.d/Apache-Arrow.repo
%post
if grep -q 'Amazon Linux release 2023' /etc/system-release 2>/dev/null; then
%{yum_repository_enable apache-arrow-amazon-linux-2023}
elif grep -q 'Red Hat Enterprise Linux Server release 7' /etc/system-release 2>/dev/null; then
%{yum_repository_enable apache-arrow-rhel7}
elif grep -q 'Red Hat Enterprise Linux' /etc/system-release 2>/dev/null; then
%{yum_repository_enable apache-arrow-rhel}
elif grep -q 'CentOS Stream' /etc/system-release 2>/dev/null; then
%{yum_repository_enable apache-arrow-centos-stream}
elif grep -q 'CentOS' /etc/system-release 2>/dev/null; then
%{yum_repository_enable apache-arrow-centos}
else
%{yum_repository_enable apache-arrow-almalinux}
fi
%changelog
* Thu Aug 17 2023 Raúl Cumplido <raulcumplido@gmail.com> - 13.0.0-1
- New upstream release.
* Wed Jun 07 2023 Raúl Cumplido <raulcumplido@gmail.com> - 12.0.1-1
- New upstream release.
* Fri Apr 21 2023 Raúl Cumplido <raulcumplido@gmail.com> - 12.0.0-1
- New upstream release.
* Wed Jan 18 2023 Raúl Cumplido <raulcumplido@gmail.com> - 11.0.0-1
- New upstream release.
* Thu Oct 20 2022 Sutou Kouhei <kou@clear-code.com> - 10.0.0-1
- New upstream release.
* Fri Jul 29 2022 Krisztián Szűcs <szucs.krisztian@gmail.com> - 9.0.0-1
- New upstream release.
* Tue May 03 2022 Krisztián Szűcs <szucs.krisztian@gmail.com> - 8.0.0-1
- New upstream release.
* Sat Jan 29 2022 Krisztián Szűcs <szucs.krisztian@gmail.com> - 7.0.0-1
- New upstream release.
* Mon Jan 18 2021 Krisztián Szűcs <szucs.krisztian@gmail.com> - 3.0.0-1
- New upstream release.
* Mon Oct 12 2020 Krisztián Szűcs <szucs.krisztian@gmail.com> - 2.0.0-1
- New upstream release.
* Mon Jul 20 2020 Krisztián Szűcs <szucs.krisztian@gmail.com> - 1.0.0-1
- New upstream release.
* Thu Apr 16 2020 Krisztián Szűcs <szucs.krisztian@gmail.com> - 0.17.0-1
- New upstream release.
* Thu Jan 30 2020 Krisztián Szűcs <szucs.krisztian@gmail.com> - 0.16.0-1
- New upstream release.