@@ -20,9 +20,10 @@ URL: https://github.com/jdx/%{pkgname}
2020Source0: %{url }/archive/v%{version }/%{pkgname }-%{version }.tar.gz
2121Patch0: mise-fix-metadata-auto.diff
2222
23- BuildRequires: clang-devel
23+ BuildRequires: rust
24+ BuildRequires: cargo
25+ BuildRequires: gcc
2426BuildRequires: pkgconfig(openssl)
25- BuildRequires: cmake
2627%if 0%{?suse_version }
2728BuildRequires: curl
2829%endif
@@ -95,7 +96,7 @@ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
9596source " $HOME /.cargo/env"
9697cargo install cargo-license
9798# build release
98- cargo build --release --all-features
99+ cargo build --profile release --bin mise
99100cargo license --color never > LICENSE.dependencies
100101./target/release/%{pkgname } completion zsh > target/_%{pkgname }
101102./target/release/%{pkgname } completion bash > target/%{pkgname }
@@ -113,6 +114,8 @@ if [ "$MISE_FISH_AUTO_ACTIVATE" != "0" ]
113114end
114115EOF
115116
117+ # Disable self-update for package manager installation
118+ touch .disable-self-update
116119
117120%install
118121install -Dspm755 -T target/release/%{pkgname } %{buildroot }%{_bindir }/%{pkgname }
@@ -122,16 +125,15 @@ install -Dpm644 -T target/%{pkgname} %{buildroot}%{_datadir}/bash-compl
122125install -Dpm644 -T target/%{pkgname }.fish %{buildroot }%{_datadir }/fish/vendor_completions.d/%{pkgname }.fish
123126install -Dpm644 -T target/%{pkgname }.sh %{buildroot }%{_sysconfdir }/profile.d/%{pkgname }.sh
124127install -Dpm644 -T target/%{pkgname }_cf.fish %{buildroot }%{_sysconfdir }/fish/conf.d/%{pkgname }.fish
125- install -dm755 %{buildroot }/usr/lib/%{pkgname }
126- touch %{buildroot }/usr/lib/%{pkgname }/.disable-self-update
128+ install -Dpm644 -T .disable-self-update %{buildroot }%{_libdir }/%{pkgname }/.disable-self-update
127129
128130
129131%files
130132%license LICENSE LICENSE.dependencies
131133%{_bindir }/%{pkgname }
132134%{_mandir }/man1/*
133- %dir /usr/lib /%{pkgname }
134- /usr/lib /%{pkgname }/.disable-self-update
135+ %dir %{ _libdir } /%{pkgname }
136+ %{ _libdir } /%{pkgname }/.disable-self-update
135137
136138%files bash-completion
137139%{_datadir }/bash-completion/*
0 commit comments