-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
nuspawn.spec
40 lines (32 loc) · 1012 Bytes
/
nuspawn.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
Name: nuspawn
Vendor: tulilirockz
Version: 0.7.5+{{{ git_ref }}}
Release: 0%{?dist}
Summary: Helper for Nspawn and Machinectl
License: 3.0-BSD
URL: https://github.com/%{vendor}/%{name}
VCS: {{{ git_dir_vcs }}}
Source: {{{ git_dir_pack }}}
BuildArch: noarch
Supplements: systemd
Requires: nu
%description
Wraps systemd-nspawn for fetching and easier usage
%global debug_package %{nil}
%global pname nuspawn
%prep
{{{ git_dir_setup_macro }}}
%build
%install
mkdir -p %{buildroot}%{_libexecdir}/%{pname} %{buildroot}/%{_bindir}
sed -i 's/\%GIT_COMMIT\%/{{ git_ref }}/g' src/lib/meta.nu
sed -i 's/\%VERSION\%/%{VERSION}/g' src/lib/meta.nu
sed -i 's~\.\/lib~\/usr\/libexec/%{pname}~' src/%{pname}
install -D -m 0755 src/%{pname} %{buildroot}%{_bindir}/%{pname}
cp -r src/lib/* %{buildroot}%{_libexecdir}/%{pname}
%files
%license LICENSE
%{_libexecdir}/%{name}/*
%attr(0755,root,root) %{_bindir}/%{pname}
%changelog
%autochangelog