%global debug_package %{nil} %global _bin_name ocm Name: openvpn-cred-management Version: 0.0.git.45.96605ba3 Release: 1%{?dist} Summary: A wrapper around easy-rsa for personal convenience. License: MIT URL: https://github.com/cyqsimon/openvpn-cred-management VCS: git+https://github.com/cyqsimon/openvpn-cred-management.git#96605ba3bbec53e651d977c2df0826147a3454d5: Source: openvpn-cred-management-96605ba3.tar.gz Requires: easy-rsa BuildRequires: gcc %description A wrapper around easy-rsa for personal convenience. Not tested whatsoever so you probably shouldn't use it. %prep %setup -T -b 0 -q -n openvpn-cred-management # use latest stable version from rustup curl -Lf "https://sh.rustup.rs" | sh -s -- --profile minimal -y %build source ~/.cargo/env # bin cargo build --release # completions for SHELL in bash zsh fish; do /target/release/%{_bin_name} complete --shell $SHELL > "%{_bin_name}.$SHELL" done %install # bin install -Dpm 755 target/release/%{_bin_name} %{buildroot}%{_bindir}/%{_bin_name} # completions install -Dpm 644 %{_bin_name}.bash %{buildroot}%{_datadir}/bash-completion/completions/%{_bin_name} install -Dpm 644 %{_bin_name}.zsh %{buildroot}%{_datadir}/zsh/site-functions/_%{_bin_name} install -Dpm 644 %{_bin_name}.fish %{buildroot}%{_datadir}/fish/completions/%{_bin_name}.fish %files %license LICENSE %{_bindir}/%{_bin_name} %changelog