Add deb and RPM repository config and documentation (#1676)

Co-authored-by: Parity Releases <releases@parity.io>
Co-authored-by: Demi Marie Obenour <demiobenour@gmail.com>
This commit is contained in:
s3krit
2020-09-10 17:22:20 +02:00
committed by GitHub
parent 98660cbd94
commit f3abba15c6
6 changed files with 186 additions and 5 deletions
+48
View File
@@ -0,0 +1,48 @@
%define debug_package %{nil}
Name: polkadot
Summary: Implementation of a https://polkadot.network node in Rust based on the Substrate framework.
Version: @@VERSION@@
Release: @@RELEASE@@%{?dist}
License: GPLv3
Group: Applications/System
Source0: %{name}-%{version}.tar.gz
Requires: systemd, shadow-utils
Requires(post): systemd
Requires(preun): systemd
Requires(postun): systemd
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
%description
%{summary}
%prep
%setup -q
%install
rm -rf %{buildroot}
mkdir -p %{buildroot}
cp -a * %{buildroot}
%post
config_file="/etc/default/polkadot"
getent group polkadot >/dev/null || groupadd -r polkadot
getent passwd polkadot >/dev/null || \
useradd -r -g polkadot -d /home/polkadot -m -s /sbin/nologin \
-c "User account for running polkadot as a service" polkadot
if [ ! -e "$config_file" ]; then
echo 'POLKADOT_CLI_ARGS=""' > /etc/default/polkadot
fi
exit 0
%clean
rm -rf %{buildroot}
%files
%defattr(-,root,root,-)
%{_bindir}/*
/usr/lib/systemd/system/polkadot.service