%global forgeurl https://github.com/Jigsaw-Code/outline-sdk %global version 0.0.17 %global commit c7e1aea6e535d0a3df6c6e4b75882322bedcf370 %global date 20241015 %global source_date_epoch_from_changelog 0 %global debug_package %{nil} %forgemeta Name: outline-client Version: %{forgeversion} Release: 1%{?dist} Summary: Outline VPN client License: Apache-2.0 URL: %{forgeurl}/tree/main/x/examples/outline-cli Source0: %{forgesource} Source1: %{name}@.service Source2: %{name}.howto BuildRequires: git-core BuildRequires: golang-bin BuildRequires: systemd-rpm-macros %description Outline VPN client that relies on Shadowsocks. %prep %forgesetup %build export GO_EXTLINK_ENABLED="1" pushd x go build -o ../%{name} ./examples/outline-cli popd %install install -p -d -m 700 %{buildroot}%{_sysconfdir}/outline/client install -p -D -m 755 -t %{buildroot}%{_bindir} %{name} install -p -D -m 644 -t %{buildroot}%{_unitdir} %{SOURCE1} install -p -D -m 644 -t %{buildroot}%{_pkgdocdir} %{SOURCE2} \ x/examples/outline-cli/README.md %post for UNIT in $(systemctl -P Id show %{name}@\*.service) do %systemd_post ${UNIT} done %preun for UNIT in $(systemctl -P Id show %{name}@\*.service) do %systemd_preun ${UNIT} done %postun for UNIT in $(systemctl -P Id show %{name}@\*.service) do %systemd_postun_with_restart ${UNIT} done %files %license LICENSE %doc %{_pkgdocdir} %config %{_sysconfdir}/outline %{_bindir}/%{name} %{_unitdir}/%{name}@.service