2020-06-18 07:28:52 +00:00
|
|
|
# Generated by rust2rpm 15
|
2020-06-18 07:33:53 +00:00
|
|
|
# * https://github.com/systemd/zram-generator/issues/36
|
|
|
|
%bcond_with check
|
2018-08-28 18:41:40 +00:00
|
|
|
|
|
|
|
%global crate zram-generator
|
|
|
|
|
|
|
|
Name: rust-%{crate}
|
2020-06-18 07:28:52 +00:00
|
|
|
Version: 0.2.0~beta.1
|
2020-06-18 09:32:09 +00:00
|
|
|
Release: 3%{?dist}
|
2020-06-18 07:28:52 +00:00
|
|
|
Summary: Systemd unit generator for zram swap devices
|
2018-08-28 18:41:40 +00:00
|
|
|
|
2019-07-22 19:31:22 +00:00
|
|
|
# Upstream license specification: MIT
|
2018-08-28 18:41:40 +00:00
|
|
|
License: MIT
|
2019-03-09 14:00:52 +00:00
|
|
|
URL: https://crates.io/crates/zram-generator
|
|
|
|
Source: %{crates_source}
|
2020-06-18 09:32:09 +00:00
|
|
|
Source1: zram-generator.conf
|
2018-08-28 18:41:40 +00:00
|
|
|
|
|
|
|
ExclusiveArch: %{rust_arches}
|
2020-06-18 07:28:52 +00:00
|
|
|
%if %{__cargo_skip_build}
|
|
|
|
BuildArch: noarch
|
|
|
|
%endif
|
2018-08-28 18:41:40 +00:00
|
|
|
|
|
|
|
BuildRequires: rust-packaging
|
2020-06-17 22:50:58 +00:00
|
|
|
BuildRequires: systemd-rpm-macros
|
2019-03-09 14:00:52 +00:00
|
|
|
|
2019-07-22 19:31:22 +00:00
|
|
|
%global _description %{expand:
|
2020-06-18 09:30:24 +00:00
|
|
|
This is a systemd unit generator that enables swap on zram.
|
|
|
|
(With zram, there is no physical swap device. Part of the avaialable RAM
|
|
|
|
is used to store compressed pages, essentially trading CPU cycles for memory.)
|
|
|
|
|
|
|
|
To activate, install %{crate}-defaults subpackage.}
|
2018-08-28 18:41:40 +00:00
|
|
|
|
2019-03-09 14:00:52 +00:00
|
|
|
%description %{_description}
|
|
|
|
|
2020-06-18 07:28:52 +00:00
|
|
|
%if ! %{__cargo_skip_build}
|
2018-08-28 18:41:40 +00:00
|
|
|
%package -n %{crate}
|
|
|
|
Summary: %{summary}
|
2020-06-18 07:28:52 +00:00
|
|
|
# MIT
|
|
|
|
# MIT or ASL 2.0
|
|
|
|
License: MIT
|
2020-06-18 09:21:56 +00:00
|
|
|
# for zramctl
|
|
|
|
Recommends: util-linux
|
2018-08-28 18:41:40 +00:00
|
|
|
|
2019-07-22 19:31:22 +00:00
|
|
|
%description -n %{crate} %{_description}
|
2018-08-28 18:41:40 +00:00
|
|
|
|
2019-03-09 14:00:52 +00:00
|
|
|
%files -n %{crate}
|
|
|
|
%license LICENSE
|
|
|
|
%doc zram-generator.conf.example
|
|
|
|
%doc README.md TODO
|
|
|
|
%{_systemdgeneratordir}/zram-generator
|
2020-06-18 08:17:03 +00:00
|
|
|
%{_unitdir}/swap-create@.service
|
2020-06-18 09:32:09 +00:00
|
|
|
|
2020-06-18 09:30:24 +00:00
|
|
|
%package -n %{crate}-defaults
|
2020-06-18 09:32:09 +00:00
|
|
|
Summary: Default configuration for %{crate}
|
|
|
|
BuildArch: noarch
|
|
|
|
|
2020-06-18 09:30:24 +00:00
|
|
|
%description -n %{crate}-defaults
|
2020-06-18 09:32:09 +00:00
|
|
|
%{summary}.
|
|
|
|
|
2020-06-18 09:30:24 +00:00
|
|
|
%files -n %{crate}-defaults
|
2020-06-18 09:32:09 +00:00
|
|
|
%{_prefix}/lib/systemd/zram-generator.conf
|
2020-06-18 07:28:52 +00:00
|
|
|
%endif
|
|
|
|
|
|
|
|
%package devel
|
2020-06-18 09:32:09 +00:00
|
|
|
Summary: %{SUMMARY}
|
2020-06-18 07:28:52 +00:00
|
|
|
BuildArch: noarch
|
|
|
|
|
|
|
|
%description devel %{_description}
|
|
|
|
|
|
|
|
This package contains library source intended for building other packages
|
|
|
|
which use "%{crate}" crate.
|
|
|
|
|
|
|
|
%files devel
|
|
|
|
%license LICENSE
|
2020-06-18 07:38:47 +00:00
|
|
|
%doc README.md TODO
|
2020-06-18 07:28:52 +00:00
|
|
|
%{cargo_registry}/%{crate}-%{version_no_tilde}/
|
|
|
|
|
|
|
|
%package -n %{name}+default-devel
|
2020-06-18 09:32:09 +00:00
|
|
|
Summary: %{SUMMARY}
|
2020-06-18 07:28:52 +00:00
|
|
|
BuildArch: noarch
|
|
|
|
|
|
|
|
%description -n %{name}+default-devel %{_description}
|
|
|
|
|
|
|
|
This package contains library source intended for building other packages
|
|
|
|
which use "default" feature of "%{crate}" crate.
|
|
|
|
|
|
|
|
%files -n %{name}+default-devel
|
|
|
|
%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml
|
2019-03-09 14:00:52 +00:00
|
|
|
|
2018-08-28 18:41:40 +00:00
|
|
|
%prep
|
2019-03-09 14:00:52 +00:00
|
|
|
%autosetup -n %{crate}-%{version_no_tilde} -p1
|
2020-06-18 09:32:09 +00:00
|
|
|
cp -a %{S:1} .
|
2018-08-28 18:41:40 +00:00
|
|
|
%cargo_prep
|
|
|
|
|
2019-07-22 19:31:22 +00:00
|
|
|
%generate_buildrequires
|
|
|
|
%cargo_generate_buildrequires
|
|
|
|
|
2018-08-28 18:41:40 +00:00
|
|
|
%build
|
|
|
|
%cargo_build
|
|
|
|
|
|
|
|
%install
|
|
|
|
%cargo_install
|
|
|
|
|
|
|
|
mkdir -p %{buildroot}%{_systemdgeneratordir}
|
|
|
|
mv -v %{buildroot}%{_bindir}/zram-generator %{buildroot}%{_systemdgeneratordir}/
|
2020-06-18 08:14:56 +00:00
|
|
|
install -Dpm0644 -t %{buildroot}%{_unitdir} units/swap-create@.service
|
2020-06-18 09:32:09 +00:00
|
|
|
install -Dpm0644 -t %{buildroot}%{_prefix}/lib/systemd zram-generator.conf
|
2018-08-28 18:41:40 +00:00
|
|
|
|
|
|
|
%if %{with check}
|
|
|
|
%check
|
|
|
|
%cargo_test
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%changelog
|
2020-06-18 09:32:09 +00:00
|
|
|
* 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
|
|
|
|
|
2020-06-18 08:14:56 +00:00
|
|
|
* Thu Jun 18 10:14:43 CEST 2020 Igor Raits <ignatenkobrain@fedoraproject.org> - 0.2.0~beta.1-2
|
|
|
|
- Install swap-create unit file
|
|
|
|
|
2020-06-18 07:28:52 +00:00
|
|
|
* Thu Jun 18 09:27:37 CEST 2020 Igor Raits <ignatenkobrain@fedoraproject.org> - 0.2.0~beta.1-1
|
|
|
|
- Update to 0.2.0-beta.1
|
|
|
|
|
2020-01-30 22:40:25 +00:00
|
|
|
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.1.2-2
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
|
|
|
|
2019-10-07 17:02:15 +00:00
|
|
|
* Mon Oct 7 2019 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 0.1.2-1
|
|
|
|
- Update to latest version
|
|
|
|
|
2019-07-26 22:33:21 +00:00
|
|
|
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.1.1-5
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
|
|
|
|
2019-07-22 19:31:22 +00:00
|
|
|
* Mon Jul 22 21:30:22 CEST 2019 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.1.1-4
|
|
|
|
- Regenerate
|
|
|
|
|
2019-03-09 14:00:52 +00:00
|
|
|
* Sat Mar 09 2019 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.1.1-3
|
|
|
|
- Adapt to new packaging
|
|
|
|
|
2019-03-01 15:34:51 +00:00
|
|
|
* Fri Mar 1 2019 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 0.1.1-2
|
|
|
|
- Add crude patch to fix build (#1676154)
|
|
|
|
|
2019-02-02 14:39:36 +00:00
|
|
|
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.1.1-2
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
|
|
|
|
2018-08-28 18:41:40 +00:00
|
|
|
* Thu Aug 16 2018 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 0.1.1-1
|
|
|
|
- Initial package
|