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.
89 lines
2.3 KiB
89 lines
2.3 KiB
4 years ago
|
# SPEC file overview:
|
||
|
# https://docs.fedoraproject.org/en-US/quick-docs/creating-rpm-packages/#con_rpm-spec-file-overview
|
||
|
# Fedora packaging guidelines:
|
||
|
# https://docs.fedoraproject.org/en-US/packaging-guidelines/
|
||
|
|
||
|
|
||
|
Name: harmony
|
||
4 years ago
|
Version: 2.3.5
|
||
|
Release: 0
|
||
4 years ago
|
Summary: harmony blockchain validator node program
|
||
|
|
||
|
License: MIT
|
||
|
URL: https://harmony.one
|
||
|
Source0: %{name}-%{version}.tar
|
||
|
BuildArch: x86_64
|
||
|
Packager: Leo Chen
|
||
4 years ago
|
Provides: /bin/sh
|
||
4 years ago
|
Requires(pre): shadow-utils
|
||
|
Requires: systemd-rpm-macros
|
||
|
|
||
|
BuildRoot: ~/rpmbuild/
|
||
|
|
||
|
%description
|
||
|
Harmony is a sharded, fast finality, low fee, PoS public blockchain.
|
||
4 years ago
|
This package contains the validator node program for harmony blockchain.
|
||
4 years ago
|
|
||
|
%global debug_package %{nil}
|
||
|
|
||
|
%prep
|
||
|
%setup -q
|
||
|
|
||
|
%build
|
||
|
exit 0
|
||
|
|
||
|
%check
|
||
|
./harmony --version
|
||
4 years ago
|
exit 0
|
||
4 years ago
|
|
||
|
%pre
|
||
|
getent group harmony >/dev/null || groupadd -r harmony
|
||
|
getent passwd harmony >/dev/null || \
|
||
4 years ago
|
useradd -r -g harmony -d /data/harmony -m -s /sbin/nologin \
|
||
4 years ago
|
-c "Harmony validator node account" harmony
|
||
4 years ago
|
mkdir -p /data/harmony/.hmy/blskeys
|
||
|
mkdir -p /data/harmony/.config/rclone
|
||
|
chown -R harmony.harmony /data/harmony
|
||
4 years ago
|
exit 0
|
||
|
|
||
|
|
||
|
%install
|
||
4 years ago
|
install -m 0755 -d ${RPM_BUILD_ROOT}/usr/local/sbin ${RPM_BUILD_ROOT}/etc/systemd/system ${RPM_BUILD_ROOT}/etc/sysctl.d ${RPM_BUILD_ROOT}/etc/harmony
|
||
4 years ago
|
install -m 0755 -d ${RPM_BUILD_ROOT}/data/harmony/.config/rclone
|
||
4 years ago
|
install -m 0755 harmony ${RPM_BUILD_ROOT}/usr/local/sbin/
|
||
4 years ago
|
install -m 0755 harmony-setup.sh ${RPM_BUILD_ROOT}/usr/local/sbin/
|
||
4 years ago
|
install -m 0755 harmony-rclone.sh ${RPM_BUILD_ROOT}/usr/local/sbin/
|
||
|
install -m 0644 rclone.conf ${RPM_BUILD_ROOT}/data/harmony/.config/rclone/
|
||
4 years ago
|
install -m 0644 harmony.service ${RPM_BUILD_ROOT}/etc/systemd/system/
|
||
|
install -m 0644 harmony-sysctl.conf ${RPM_BUILD_ROOT}/etc/sysctl.d/
|
||
4 years ago
|
install -m 0644 harmony.conf ${RPM_BUILD_ROOT}/etc/harmony/
|
||
4 years ago
|
exit 0
|
||
|
|
||
|
%post
|
||
|
%systemd_post %{name}.service
|
||
4 years ago
|
%sysctl_apply %{name}-sysctl.conf
|
||
4 years ago
|
|
||
|
%preun
|
||
|
%systemd_preun %{name}.service
|
||
|
|
||
|
%postun
|
||
|
%systemd_postun_with_restart ${name}.service
|
||
|
|
||
|
%files
|
||
|
/usr/local/sbin/harmony
|
||
4 years ago
|
/usr/local/sbin/harmony-setup.sh
|
||
4 years ago
|
/usr/local/sbin/harmony-rclone.sh
|
||
4 years ago
|
/etc/sysctl.d/harmony-sysctl.conf
|
||
|
/etc/systemd/system/harmony.service
|
||
4 years ago
|
/etc/harmony/harmony.conf
|
||
|
/data/harmony/.config/rclone
|
||
4 years ago
|
|
||
|
%doc
|
||
|
%license
|
||
|
|
||
|
|
||
|
|
||
|
%changelog
|
||
4 years ago
|
* Tue Aug 18 2020 Leo Chen <leo at harmony dot one> 2.3.5
|
||
4 years ago
|
- init version of the harmony node program
|