-
Notifications
You must be signed in to change notification settings - Fork 110
/
.cloudberry-db.spec
73 lines (61 loc) · 1.67 KB
/
.cloudberry-db.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
%define _rpmfilename %%{ARCH}/%%{NAME}-%{cbdb_version}-%%{RELEASE}.%%{ARCH}.rpm
%define bin_cbdb %{prefix}/%{name}-%{cbdb_version}
# Disable build-id in generated RPM
%define _build_id_links none
%{!?cbdb_install_prefix: %define cbdb_install_prefix /usr/local}
Name: cloudberry-db
Version: %{version}
Release: 1%{?dist}
Summary: A High Performance Massively Parallel Data Warehouse
Group: Applications/Databases
License: Apache License Version 2.0
URL: http://www.cloudberrydb.org
Source0: bin_cbdb.tar.gz
Prefix: %{cbdb_install_prefix}
AutoReqProv: no
Requires: apr apr-util
Requires: bash
Requires: bzip2
Requires: curl
Requires: iproute
Requires: krb5-devel
Requires: less
Requires: libcurl
Requires: libxml2
Requires: libyaml
Requires: openldap
Requires: openssh
Requires: openssh-clients
Requires: openssh-server
Requires: openssl
Requires: openssl-libs
Requires: perl
Requires: python3-devel
Requires: readline
Requires: rsync
Requires: sed
Requires: tar
Requires: which
Requires: zip
Requires: zlib
%description
A High Performance Massively Parallel Data Warehouse
%prep
%setup -q -c -n %{name}-%{cbdb_version}
%install
mkdir -p %{buildroot}/%{prefix}/%{name}-%{cbdb_version}
cp -R * %{buildroot}/%{prefix}/%{name}-%{cbdb_version}
exit 0
%files
%{prefix}/%{name}-%{cbdb_version}
%config(noreplace) %{prefix}/%{name}-%{cbdb_version}/greenplum_path.sh
%clean
rm -rf %{buildroot}
%post
ln -sT "${RPM_INSTALL_PREFIX}/%{name}-%{cbdb_version}" "${RPM_INSTALL_PREFIX}/%{name}" || true
%postun
if [ $1 -eq 0 ] ; then
if [ "$(readlink -f "${RPM_INSTALL_PREFIX}/%{name}")" == "${RPM_INSTALL_PREFIX}/%{name}-%{cbdb_version}" ]; then
unlink "${RPM_INSTALL_PREFIX}/%{name}" || true
fi
fi