webbuilder_pel7ppc64bebuilder0
2 years ago
3 changed files with 93 additions and 0 deletions
@ -0,0 +1,17 @@ |
|||||||
|
[Unit] |
||||||
|
Description=Mercury |
||||||
|
After=syslog.target |
||||||
|
After=network.target |
||||||
|
|
||||||
|
[Service] |
||||||
|
# Modify these two values and uncomment them if you have |
||||||
|
# repos with lots of files and get an HTTP error 500 because |
||||||
|
# of that |
||||||
|
### |
||||||
|
#LimitMEMLOCK=infinity |
||||||
|
#LimitNOFILE=65535 |
||||||
|
Type=simple |
||||||
|
ExecStart=/usr/bin/mercury -config /etc/mercury/$i.toml |
||||||
|
|
||||||
|
[Install] |
||||||
|
WantedBy=multi-user.target |
@ -0,0 +1,10 @@ |
|||||||
|
[Unit] |
||||||
|
Description=Mercury |
||||||
|
|
||||||
|
[Timer] |
||||||
|
OnUnitActiveSec=10s |
||||||
|
OnBootSec=10s |
||||||
|
OnCalendar=*-*-* *:00/30:05 |
||||||
|
|
||||||
|
[Install] |
||||||
|
WantedBy=multi-user.target |
@ -0,0 +1,66 @@ |
|||||||
|
%global _hardened_build 1 |
||||||
|
|
||||||
|
Name : mercury |
||||||
|
Version : 20220601 |
||||||
|
Release : 1%{dist} |
||||||
|
License : MIT |
||||||
|
URL : https://github.com/kgaughan/mercury |
||||||
|
Summary : A Planet-style feed aggregator |
||||||
|
Source0 : mercury@.service |
||||||
|
Source1 : mercury@.timer |
||||||
|
BuildRequires: golang |
||||||
|
BuildRequires: git |
||||||
|
Requires : git |
||||||
|
|
||||||
|
|
||||||
|
%description |
||||||
|
Mercury is intended a replacement for Sam Ruby's Planet Venus. |
||||||
|
A planet is a kind of feed aggregator. |
||||||
|
It takes a list of newsfeeds (Atom, RSS, &c.), splices them together, and spits a set of HTML pages and/or a feed. |
||||||
|
|
||||||
|
|
||||||
|
%prep |
||||||
|
%setup -T -q -c %{name}-%{version} |
||||||
|
export GOPATH=`pwd` |
||||||
|
mkdir -p go/src/github.com/kgaughan |
||||||
|
cd go/src/github.com/kgaughan |
||||||
|
git clone https://github.com/kgaughan/mercury |
||||||
|
|
||||||
|
|
||||||
|
%build |
||||||
|
export GOPATH=`pwd` |
||||||
|
export GO111MODULE=on |
||||||
|
cd go/src/github.com/kgaughan/mercury |
||||||
|
go build -v -ldflags "-extldflags -s -w -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \n') -buildid "%{version}" -X 'main.Version="%{version}"' -X 'main.MakeVersion="%{release}"'" |
||||||
|
|
||||||
|
|
||||||
|
%install |
||||||
|
install -p -D -m 0644 %{SOURCE0} %{buildroot}%{_unitdir}/mercury@.service |
||||||
|
install -p -D -m 0644 %{SOURCE1} %{buildroot}%{_unitdir}/mercury@.timer |
||||||
|
mkdir -p %{buildroot}/%{_sysconfdir}/%{name}/ |
||||||
|
install -p -D -m 0644 go/src/github.com/kgaughan/mercury/mercury.toml %{buildroot}%{_sysconfdir}/%{name}/config.toml |
||||||
|
cp -rv go/src/github.com/kgaughan/mercury/theme/ %{buildroot}%{_sysconfdir}/%{name}/theme/ |
||||||
|
install -p -D -m 0555 go/src/github.com/kgaughan/mercury/mercury %{buildroot}%{_bindir}/mercury |
||||||
|
|
||||||
|
|
||||||
|
%post |
||||||
|
%systemd_post mercury@.service |
||||||
|
|
||||||
|
|
||||||
|
%preun |
||||||
|
%systemd_preun mercury@.service |
||||||
|
|
||||||
|
|
||||||
|
%postun |
||||||
|
%systemd_postun mercury@.service |
||||||
|
|
||||||
|
|
||||||
|
%files |
||||||
|
%config(noreplace) %{_sysconfdir}/%{name}/config.toml |
||||||
|
%config(noreplace) %{_sysconfdir}/%{name}/theme/ |
||||||
|
%{_bindir}/mercury |
||||||
|
%{_unitdir}/mercury@.service |
||||||
|
%{_unitdir}/mercury@.timer |
||||||
|
|
||||||
|
|
||||||
|
%changelog |
Loading…
Reference in new issue