-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathspk.spec
43 lines (34 loc) · 986 Bytes
/
spk.spec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
Name: spk
Version: 0.31.0
Release: 1
Summary: Package manager for SPFS.
License: NONE
URL: https://github.com/imageworks/spk
Source0: https://github.com/imageworks/spk/archive/refs/tags/v%{version}.tar.gz
BuildRequires: gcc
BuildRequires: git
BuildRequires: gcc-c++
BuildRequires: libcap-devel
BuildRequires: openssl-devel
BuildRequires: python3-devel
BuildRequires: python3-pip
Requires: bash
Requires: spfs >= 0.28.1
%define debug_package %{nil}
%description
Package manager for SPFS
%prep
%setup -q -n %{name}-%{version}
%build
cargo build --release
%install
mkdir -p %{buildroot}/usr/local/bin
install -m 0755 %{_builddir}/%{name}-%{version}/target/release/spk %{buildroot}/usr/local/bin/spk-%{version}
%files
/usr/local/bin/spk-%{version}
%preun
[ -e /usr/local/bin/spk ] && unlink /usr/local/bin/spk
%posttrans
# must run at the absolute end in case we are updating
# and the uninstallation of the old version removes the symlink
ln -sf spk-%{version} /usr/local/bin/spk