Create a subpackage with default configuration
Signed-off-by: Igor Raits <ignatenkobrain@fedoraproject.org>
This commit is contained in:
parent
45e43a23b2
commit
31bed76071
@ -6,13 +6,14 @@
|
|||||||
|
|
||||||
Name: rust-%{crate}
|
Name: rust-%{crate}
|
||||||
Version: 0.2.0~beta.1
|
Version: 0.2.0~beta.1
|
||||||
Release: 2%{?dist}
|
Release: 3%{?dist}
|
||||||
Summary: Systemd unit generator for zram swap devices
|
Summary: Systemd unit generator for zram swap devices
|
||||||
|
|
||||||
# Upstream license specification: MIT
|
# Upstream license specification: MIT
|
||||||
License: MIT
|
License: MIT
|
||||||
URL: https://crates.io/crates/zram-generator
|
URL: https://crates.io/crates/zram-generator
|
||||||
Source: %{crates_source}
|
Source: %{crates_source}
|
||||||
|
Source1: zram-generator.conf
|
||||||
|
|
||||||
ExclusiveArch: %{rust_arches}
|
ExclusiveArch: %{rust_arches}
|
||||||
%if %{__cargo_skip_build}
|
%if %{__cargo_skip_build}
|
||||||
@ -45,10 +46,20 @@ Recommends: /usr/bin/systemd-detect-virt
|
|||||||
%doc README.md TODO
|
%doc README.md TODO
|
||||||
%{_systemdgeneratordir}/zram-generator
|
%{_systemdgeneratordir}/zram-generator
|
||||||
%{_unitdir}/swap-create@.service
|
%{_unitdir}/swap-create@.service
|
||||||
|
|
||||||
|
%package -n %{crate}-default
|
||||||
|
Summary: Default configuration for %{crate}
|
||||||
|
BuildArch: noarch
|
||||||
|
|
||||||
|
%description -n %{crate}-default
|
||||||
|
%{summary}.
|
||||||
|
|
||||||
|
%files
|
||||||
|
%{_prefix}/lib/systemd/zram-generator.conf
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%package devel
|
%package devel
|
||||||
Summary: %{summary}
|
Summary: %{SUMMARY}
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
|
||||||
%description devel %{_description}
|
%description devel %{_description}
|
||||||
@ -62,7 +73,7 @@ which use "%{crate}" crate.
|
|||||||
%{cargo_registry}/%{crate}-%{version_no_tilde}/
|
%{cargo_registry}/%{crate}-%{version_no_tilde}/
|
||||||
|
|
||||||
%package -n %{name}+default-devel
|
%package -n %{name}+default-devel
|
||||||
Summary: %{summary}
|
Summary: %{SUMMARY}
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
|
||||||
%description -n %{name}+default-devel %{_description}
|
%description -n %{name}+default-devel %{_description}
|
||||||
@ -75,6 +86,7 @@ which use "default" feature of "%{crate}" crate.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup -n %{crate}-%{version_no_tilde} -p1
|
%autosetup -n %{crate}-%{version_no_tilde} -p1
|
||||||
|
cp -a %{S:1} .
|
||||||
%cargo_prep
|
%cargo_prep
|
||||||
|
|
||||||
%generate_buildrequires
|
%generate_buildrequires
|
||||||
@ -90,6 +102,7 @@ echo 'systemd-rpm-macros'
|
|||||||
mkdir -p %{buildroot}%{_systemdgeneratordir}
|
mkdir -p %{buildroot}%{_systemdgeneratordir}
|
||||||
mv -v %{buildroot}%{_bindir}/zram-generator %{buildroot}%{_systemdgeneratordir}/
|
mv -v %{buildroot}%{_bindir}/zram-generator %{buildroot}%{_systemdgeneratordir}/
|
||||||
install -Dpm0644 -t %{buildroot}%{_unitdir} units/swap-create@.service
|
install -Dpm0644 -t %{buildroot}%{_unitdir} units/swap-create@.service
|
||||||
|
install -Dpm0644 -t %{buildroot}%{_prefix}/lib/systemd zram-generator.conf
|
||||||
|
|
||||||
%if %{with check}
|
%if %{with check}
|
||||||
%check
|
%check
|
||||||
@ -97,6 +110,9 @@ install -Dpm0644 -t %{buildroot}%{_unitdir} units/swap-create@.service
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Jun 18 11:30:43 CEST 2020 Igor Raits <ignatenkobrain@fedoraproject.org> - 0.2.0~beta.1-3
|
||||||
|
- Create a subpackage with default configuration
|
||||||
|
|
||||||
* Thu Jun 18 10:14:43 CEST 2020 Igor Raits <ignatenkobrain@fedoraproject.org> - 0.2.0~beta.1-2
|
* Thu Jun 18 10:14:43 CEST 2020 Igor Raits <ignatenkobrain@fedoraproject.org> - 0.2.0~beta.1-2
|
||||||
- Install swap-create unit file
|
- Install swap-create unit file
|
||||||
|
|
||||||
|
1
zram-generator.conf
Normal file
1
zram-generator.conf
Normal file
@ -0,0 +1 @@
|
|||||||
|
[zram0]
|
Loading…
Reference in New Issue
Block a user