%global debug_package %{nil} Name: lichen Version: 1.1.0 Release: 1%{?dist} Summary: Command-line tool to manage license files and headers License: MIT URL: https://github.com/philocalyst/lichen BuildArch: %_target_cpu BuildRequires: curl # base URL for GitHub releases %global src_base_url https://github.com/philocalyst/lichen/releases/download/v%{version} # pick the right prebuilt for each arch %ifarch x86_64 %global bin_arch x86_64-unknown-linux-musl %endif %ifarch aarch64 %global bin_arch aarch64-unknown-linux-musl %endif %ifarch armv7hl armv6hl %global bin_arch arm-unknown-linux-musleabihf %endif # plain tarball name, and the directory it unpacks into %global tarball lic-%{bin_arch}.tar.gz %global srcdir lic-%{bin_arch} Source0: %{tarball} %description Lichen is a command-line tool designed to help manage license files and headers within your software projects. It simplifies generating full license texts and applying standardized license header comments to source code files, ensuring compliance and consistency. Features include: * SPDX-based full license text generation * License-header application with correct comment syntax * Project config via .lichen.toml * Multiple licenses in a single repo %prep # fetch the GitHub tarball if it’s not already in SOURCES/ if [ ! -f %{_sourcedir}/%{tarball} ]; then curl -fL -o %{_sourcedir}/%{tarball} \ %{src_base_url}/%{tarball} fi # unpack into lic-/… %setup -q -c %install # main binary install -D -m0755 %{srcdir}/lic \ %{buildroot}%{_bindir}/lic # bash completion install -D -m0644 %{srcdir}/lic.bash \ %{buildroot}%{_datadir}/bash-completion/completions/lic # fish completion install -D -m0644 %{srcdir}/lic.fish \ %{buildroot}%{_datadir}/fish/vendor_completions.d/lic.fish # zsh completion install -D -m0644 %{srcdir}/_lic \ %{buildroot}%{_datadir}/zsh/site-functions/_lic # elvish completion install -D -m0644 %{srcdir}/lic.elv \ %{buildroot}%{_datadir}/elvish/vendor-completions.d/lic.elv # PowerShell completion install -D -m0644 %{srcdir}/_lic.ps1 \ %{buildroot}%{_datadir}/powershell/_lic.ps1 %files %{_bindir}/lic %{_datadir}/bash-completion/completions/lic %{_datadir}/fish/vendor_completions.d/lic.fish %{_datadir}/zsh/site-functions/_lic %{_datadir}/elvish/vendor-completions.d/lic.elv %{_datadir}/powershell/_lic.ps1 %changelog * Wed Apr 30 2025 Your Name - 1.1.0-1 - initial packaging of prebuilt binaries + all completion scripts