Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add openSUSE support #3

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added go.txz
Binary file not shown.
65 changes: 65 additions & 0 deletions yggdrasil-opensuse.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
Name: yggdrasil
Version: 0.3.14
Release: 6
Summary: End-to-end encrypted IPv6 networking

License: GPL-3.0-only
Group: Productivity/Networking/Other
URL: https://yggdrasil-network.github.io
Source: v%{version}
Source1: go.txz

%{?systemd_requires}
BuildRequires: systemd go >= 1.13 git
Requires(pre): shadow
Conflicts: yggdrasil-develop

%description
Yggdrasil is a proof-of-concept to explore a wholly different approach to
network routing. Whereas current computer networks depend heavily on very
centralised design and configuration, Yggdrasil breaks this mould by making
use of a global spanning tree to form a scalable IPv6 encrypted mesh network.

%define debug_package %{nil}

%prep
%setup -qn yggdrasil-go-%{version}

%build

tar xf %SOURCE1
export GOPATH="$(pwd)/go/"
export PKGSRC="github.com/yggdrasil-network/yggdrasil-go/src/yggdrasil"
export PKGNAME="%{name}"
export PKGVER="%{version}"
go build -buildmode=pie ./cmd/yggdrasil
go build -buildmode=pie ./cmd/yggdrasilctl

%install
rm -rf %{buildroot}
install -m 0755 -D yggdrasil %{buildroot}/%{_bindir}/yggdrasil
install -m 0755 -D yggdrasilctl %{buildroot}/%{_bindir}/yggdrasilctl
install -m 0644 -D contrib/systemd/yggdrasil.service %{buildroot}%{_prefix}/lib/systemd/system/yggdrasil.service
mkdir -p %{buildroot}%{_sbindir}
ln -sf service %{buildroot}%{_sbindir}/rcyggdrasil

%files
%{_bindir}/yggdrasil
%{_bindir}/yggdrasilctl
%{_prefix}/lib/systemd/system/yggdrasil.service
%{_sbindir}/rcyggdrasil

%pre
getent group yggdrasil >/dev/null || groupadd -r yggdrasil
%service_add_pre yggdrasil.service

%post
%service_add_post yggdrasil.service

%preun
%service_del_preun yggdrasil.service

%postun
%service_del_postun yggdrasil.service

%changelog