# # spec file for package mise # # Copyright (c) 2024 Jo Carllyle # # Please submit bugfixes or comments via https://github.com/calyle/rpm-spec-templates # %global debug_package %{nil} %global pkgname mise Name: %{pkgname} Version: 2026.8.15 Release: 1%{?dist} Summary: The front-end to your dev env License: MIT URL: https://github.com/jdx/%{pkgname} Source0: %{url}/archive/v%{version}/%{pkgname}-%{version}.tar.gz Patch0: mise-fix-metadata-auto.diff BuildRequires: rust BuildRequires: cargo BuildRequires: gcc BuildRequires: cmake BuildRequires: pkgconfig(openssl) %if 0%{?suse_version} BuildRequires: curl # nasm is required by aws-lc-sys on x86_64 to compile ASM crypto routines. # Available in standard Fedora repos; on RHEL/EPEL it lives in CRB (not # enabled in COPR by default) so we use prebuilt NASM objects there instead # (see AWS_LC_SYS_PREBUILT_NASM in the %%build section). %endif %if 0%{?fedora} %ifarch x86_64 BuildRequires: nasm %endif %endif %description The front-end to your dev env %package bash-completion Summary: Bash completion for %{name} Group: System/Shells Requires: %{name} = %{version}-%{release} Requires: bash-completion, usage Supplements: (%{name} and bash-completion) BuildArch: noarch %description bash-completion Bash command line completion support for %{name}. %package zsh-completion Summary: Zsh completion for %{name} Group: System/Shells Requires: %{name} = %{version}-%{release} Requires: zsh, usage Supplements: (%{name} and zsh) BuildArch: noarch %description zsh-completion Zsh command line completion support for %{name}. %package fish-completion Summary: Fish completion for %{name} Group: System/Shells Requires: %{name} = %{version}-%{release} Requires: fish, usage Supplements: (%{name} and fish) BuildArch: noarch %description fish-completion Fish command line completion support for %{name}. %package fish-setup-file Summary: Fish setup script for %{name} Group: System/Shells Requires: %{name} = %{version}-%{release} Requires: fish Supplements: (%{name} and fish) BuildArch: noarch %description fish-setup-file Fish setup script for %{name} %package bash-setup-file Summary: Bash setup script for %{name} Group: System/Shells Requires: %{name} = %{version}-%{release} Requires: bash Supplements: (%{name} and bash) BuildArch: noarch %description bash-setup-file Bash setup script for %{name} %package zsh-setup-file Summary: Zsh setup script for %{name} Group: System/Shells Requires: %{name} = %{version}-%{release} Requires: zsh Supplements: (%{name} and zsh) BuildArch: noarch %description zsh-setup-file Zsh setup script for %{name} %prep %autosetup -p1 %build # aws-lc-sys compiles and links its memcmp compiler probe in one command. It # intentionally ignores CFLAGS, but still applies Fedora's LDFLAGS, whose # hardened linker specs produce a PIE executable. Add the matching compiler # flag so the probe's object file is position-independent as well. %if 0%{?fedora} %ifarch x86_64 export LDFLAGS="${LDFLAGS:-} -fPIE" %endif %endif # On RHEL/EPEL x86_64, nasm lives in CRB which is not enabled in COPR # chroots. Use prebuilt NASM objects bundled inside the aws-lc-sys crate # instead. This works at all Cargo profile/optimization levels including # release (unlike AWS_LC_SYS_NO_ASM which is debug-only and panics at # release profile). %if 0%{?rhel} %ifarch x86_64 export AWS_LC_SYS_PREBUILT_NASM=1 %endif %endif # install toolchain curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y source "$HOME/.cargo/env" # build release cargo build --profile release --bin mise RUSTFLAGS='-C strip=symbols' cargo tree --workspace --edges no-build,no-dev,no-proc-macro --no-dedupe --target all \ --prefix none --format '{l}: {p}' | sort -u | sed -e "s: ($(pwd)[^)]*)::g" -e 's: / :/:g' -e 's:/: OR :g' > LICENSE.dependencies ./target/release/%{pkgname} completion zsh > target/_%{pkgname} ./target/release/%{pkgname} completion bash > target/%{pkgname} ./target/release/%{pkgname} completion fish > target/%{pkgname}.fish cat << 'EOF' > target/%{pkgname}-bash-setup.sh # Activate mise. See https://mise.jdx.dev/installing-mise.html#shells [[ "$SHELL" =~ "bash" ]] && eval "$(mise activate bash)" EOF cat << 'EOF' > target/%{pkgname}-zsh-setup.sh # Activate mise. See https://mise.jdx.dev/installing-mise.html#shells [[ "$SHELL" =~ "zsh" ]] && eval "$(mise activate zsh)" EOF cat << 'EOF' > target/%{pkgname}_cf.fish # Activate mise. See https://mise.jdx.dev/installing-mise.html#shells if [ "$MISE_FISH_AUTO_ACTIVATE" != "0" ] mise activate fish | source end EOF # Disable self-update for package manager installation touch .disable-self-update %install install -Dspm755 -T target/release/%{pkgname} %{buildroot}%{_bindir}/%{pkgname} install -Dpm644 -T man/man1/%{pkgname}.1 %{buildroot}%{_mandir}/man1/%{pkgname}.1 install -Dpm644 -T target/_%{pkgname} %{buildroot}%{_datadir}/zsh/site-functions/_%{pkgname} install -Dpm644 -T target/%{pkgname} %{buildroot}%{_datadir}/bash-completion/completions/%{pkgname} install -Dpm644 -T target/%{pkgname}.fish %{buildroot}%{_datadir}/fish/vendor_completions.d/%{pkgname}.fish install -Dpm644 -T target/%{pkgname}_cf.fish %{buildroot}%{_sysconfdir}/fish/conf.d/%{pkgname}.fish install -Dpm644 -T .disable-self-update %{buildroot}%{_libdir}/%{pkgname}/.disable-self-update install -Dpm644 -T target/%{pkgname}-bash-setup.sh %{buildroot}%{_sysconfdir}/profile.d/%{pkgname}-bash-setup.sh install -Dpm644 -T target/%{pkgname}-zsh-setup.sh %{buildroot}%{_sysconfdir}/profile.d/%{pkgname}-zsh-setup.sh %files %license LICENSE LICENSE.dependencies %{_bindir}/%{pkgname} %{_mandir}/man1/* %dir %{_libdir}/%{pkgname} %{_libdir}/%{pkgname}/.disable-self-update %files bash-completion %{_datadir}/bash-completion/* %files zsh-completion %{_datadir}/zsh/* %files fish-completion %{_datadir}/fish/* %files fish-setup-file %{_sysconfdir}/fish/* %files bash-setup-file %{_sysconfdir}/profile.d/%{pkgname}-bash-setup.sh %files zsh-setup-file %{_sysconfdir}/profile.d/%{pkgname}-zsh-setup.sh %changelog * Sun Aug 30 2026 Jo Carllyle <96739684+calyle@users.noreply.github.com> - See GitHub for full changelog