]> git.proxmox.com Git - ceph.git/blob - ceph/src/arrow/dev/tasks/linux-packages/apache-arrow-release/yum/apache-arrow-release.spec.in
import quincy 17.2.0
[ceph.git] / ceph / src / arrow / dev / tasks / linux-packages / apache-arrow-release / yum / apache-arrow-release.spec.in
1 # -*- sh-shell: rpm -*-
2 #
3 # Licensed to the Apache Software Foundation (ASF) under one
4 # or more contributor license agreements. See the NOTICE file
5 # distributed with this work for additional information
6 # regarding copyright ownership. The ASF licenses this file
7 # to you under the Apache License, Version 2.0 (the
8 # "License"); you may not use this file except in compliance
9 # with the License. You may obtain a copy of the License at
10 #
11 # http://www.apache.org/licenses/LICENSE-2.0
12 #
13 # Unless required by applicable law or agreed to in writing,
14 # software distributed under the License is distributed on an
15 # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 # KIND, either express or implied. See the License for the
17 # specific language governing permissions and limitations
18 # under the License.
19
20 %define use_dnf (%{rhel} >= 8)
21 %if %{use_dnf}
22 %define yum_repository_enable() (dnf config-manager --set-enabled %1)
23 %define yum_repository_disable() (dnf config-manager --set-disabled %1)
24 %else
25 %define yum_repository_enable() (yum-config-manager --enable %1)
26 %define yum_repository_disable() (yum-config-manager --disable %1)
27 %endif
28
29 Name: @PACKAGE@
30 Version: @VERSION@
31 Release: @RELEASE@%{?dist}
32 Summary: Apache Arrow release files
33
34 License: Apache-2.0
35 URL: https://arrow.apache.org/
36 Source0: @PACKAGE@-%{version}.tar.gz
37
38 BuildArch: noarch
39
40 Requires: epel-release
41 %if %{use_dnf}
42 Requires: dnf-command(config-manager)
43 %else
44 Requires: yum-utils
45 %endif
46
47 %description
48 Apache Arrow release files.
49
50 %prep
51 %setup -q
52
53 %build
54 distribution=$(. /etc/os-release && echo "${ID}")
55 if [ "${distribution}" = "rhel" ]; then
56 # We use distribution version explicitly for RHEL because we can't
57 # use symbolic link on Artifactory. CentOS uses 7 and 8 but RHEL uses
58 # 7Server and 8Server for $releasever. If we can use symbolic link
59 # on Artifactory we can use $releasever directly.
60 distribution_version=$(. /etc/os-release && echo "${VERSION_ID}")
61 sed -i'' -e "s/\\\$releasever/${distribution_version}/g" Apache-Arrow.repo
62 fi
63
64 %install
65 rm -rf $RPM_BUILD_ROOT
66
67 %{__install} -Dp -m0644 KEYS \
68 $RPM_BUILD_ROOT%{_sysconfdir}/pki/rpm-gpg/RPM-GPG-KEY-Apache-Arrow
69
70 %{__install} -d $RPM_BUILD_ROOT%{_sysconfdir}/yum.repos.d/
71 %{__install} -Dp -m0644 Apache-Arrow.repo \
72 $RPM_BUILD_ROOT%{_sysconfdir}/yum.repos.d/Apache-Arrow.repo
73
74 %files
75 %defattr(-, root, root, 0755)
76 %doc
77 %dir %{_sysconfdir}/yum.repos.d/
78 %dir %{_sysconfdir}/pki/rpm-gpg/
79 %{_sysconfdir}/pki/rpm-gpg/RPM-GPG-KEY-Apache-Arrow
80 %config(noreplace) %{_sysconfdir}/yum.repos.d/Apache-Arrow.repo
81
82 %post
83 if grep -q 'Amazon Linux release 2' /etc/system-release 2>/dev/null; then
84 %{yum_repository_enable apache-arrow-amazon-linux}
85 elif grep -q 'Red Hat Enterprise Linux' /etc/system-release 2>/dev/null; then
86 %{yum_repository_enable apache-arrow-rhel}
87 elif grep -q 'AlmaLinux' /etc/system-release 2>/dev/null; then
88 %{yum_repository_enable apache-arrow-almalinux}
89 else
90 %{yum_repository_enable apache-arrow-centos}
91 fi
92
93 %changelog
94 * Wed Nov 10 2021 Sutou Kouhei <kou@clear-code.com> - 6.0.1-1
95 - New upstream release.
96
97 * Thu Oct 21 2021 Krisztián Szűcs <szucs.krisztian@gmail.com> - 6.0.0-1
98 - New upstream release.
99
100 * Mon Jan 18 2021 Krisztián Szűcs <szucs.krisztian@gmail.com> - 3.0.0-1
101 - New upstream release.
102
103 * Mon Oct 12 2020 Krisztián Szűcs <szucs.krisztian@gmail.com> - 2.0.0-1
104 - New upstream release.
105
106 * Mon Jul 20 2020 Krisztián Szűcs <szucs.krisztian@gmail.com> - 1.0.0-1
107 - New upstream release.
108
109 * Thu Apr 16 2020 Krisztián Szűcs <szucs.krisztian@gmail.com> - 0.17.0-1
110 - New upstream release.
111
112 * Thu Jan 30 2020 Krisztián Szűcs <szucs.krisztian@gmail.com> - 0.16.0-1
113 - New upstream release.