Browse Source

soju package creation irc bouncer

Signed-off-by: tuibuilder_pel7x64builder0 <tuibuilder@powerel.org>
master
tuibuilder_pel7x64builder0 4 years ago
parent
commit
0c7b1b5f55
  1. 14
      SOURCES/soju.service
  2. 65
      SPECS/soju.spec

14
SOURCES/soju.service

@ -0,0 +1,14 @@ @@ -0,0 +1,14 @@
[Unit]
Description=soju
After=syslog.target
After=network.target

[Service]
Type=simple
User=root
Group=root
ExecStart=/usr/bin/sojud -config /etc/soju/soju.conf
Restart=always

[Install]
WantedBy=multi-user.target

65
SPECS/soju.spec

@ -0,0 +1,65 @@ @@ -0,0 +1,65 @@
%global _hardened_build 1
%define debug_package %{nil}

Name: soju
Version: 0.1.1
Release: 1%{?dist}
Summary: A user-friendly IRC bouncer
Group: System/Library
License: MIT
URL: https://github.com/42wim/matterircd
Source0: soju.service
BuildRequires: golang


%description
A user-friendly IRC bouncer :
- Multi-user
- Support multiple clients for a single user, with proper backlog synchronization
- Support connecting to multiple upstream servers via a single IRC connection to the bouncer


%prep
%setup -q -T -c %{name}-%{version}
export GOPATH=`pwd`
mkdir -p src/git.sr.ht/~emersion/
cd src/git.sr.ht/~emersion/
git clone https://git.sr.ht/~emersion/soju


%build
export GOPATH=`pwd`
cd src/git.sr.ht/~emersion/soju
git checkout tags/v%{version}
go build -v -trimpath --ldflags "-extldflags -s -w -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \n') -buildid %{version}" -o sojud ./cmd/soju
go build -v -trimpath --ldflags "-extldflags -s -w -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \n') -buildid %{version}" -o soju-ctl ./cmd/sojuctl


%install
install -p -D -m 0644 %{SOURCE0} %{buildroot}%{_unitdir}/soju.service
install -p -D -m 0555 src/git.sr.ht/~emersion/soju/sojud %{buildroot}%{_bindir}/sojud
install -p -D -m 0555 src/git.sr.ht/~emersion/soju/soju-ctl %{buildroot}%{_bindir}/soju-ctl
install -p -D -m 0644 src/git.sr.ht/~emersion/soju/config.in %{buildroot}%{_sysconfdir}/soju/soju.conf


%post
%systemd_post soju.service


%preun
%systemd_preun soju.service


%postun
%systemd_postun soju.service


%files
%doc
%config(noreplace) %{_sysconfdir}/soju/soju.conf
%{_unitdir}/soju.service
%{_bindir}/sojud
%{_bindir}/soju-ctl


%changelog
Loading…
Cancel
Save