Blame rust-zram-generator.spec

46a3669
# Generated by rust2rpm 17
6030cbe
%bcond_without check
08de400
08de400
%global crate zram-generator
08de400
08de400
Name:           rust-%{crate}
3095258
Version:        0.3.2
d2520be
Release:        2%{?dist}
0bd13b4
Summary:        Systemd unit generator for zram swap devices
08de400
e251a0e
# Upstream license specification: MIT
08de400
License:        MIT
611c1e5
URL:            https://crates.io/crates/zram-generator
611c1e5
Source:         %{crates_source}
31bed76
Source1:        zram-generator.conf
08de400
08de400
ExclusiveArch:  %{rust_arches}
0bd13b4
%if %{__cargo_skip_build}
0bd13b4
BuildArch:      noarch
0bd13b4
%endif
08de400
08de400
BuildRequires:  rust-packaging
611c1e5
e251a0e
%global _description %{expand:
5e437cf
This is a systemd unit generator that enables swap on zram.
5e437cf
(With zram, there is no physical swap device. Part of the avaialable RAM
5e437cf
is used to store compressed pages, essentially trading CPU cycles for memory.)
5e437cf
5e437cf
To activate, install %{crate}-defaults subpackage.}
08de400
611c1e5
%description %{_description}
611c1e5
0bd13b4
%if ! %{__cargo_skip_build}
08de400
%package     -n %{crate}
08de400
Summary:        %{summary}
0bd13b4
# MIT
0bd13b4
# MIT or ASL 2.0
0bd13b4
License:        MIT
6030cbe
Recommends:     /usr/bin/zramctl
08de400
e251a0e
%description -n %{crate} %{_description}
08de400
611c1e5
%files       -n %{crate}
611c1e5
%license LICENSE
611c1e5
%doc zram-generator.conf.example
bad1eab
%doc README.md
611c1e5
%{_systemdgeneratordir}/zram-generator
46a3669
%{_unitdir}/systemd-zram-setup@.service
6030cbe
%{_mandir}/man8/zram-generator.8*
b25a65a
%{_mandir}/man5/zram-generator.conf.5*
31bed76
5e437cf
%package     -n %{crate}-defaults
31bed76
Summary:        Default configuration for %{crate}
e44606d
Requires:       %{crate} = %{version}-%{release}
e29686c
Obsoletes:      zram < 0.4-2
31bed76
BuildArch:      noarch
31bed76
5e437cf
%description -n %{crate}-defaults
31bed76
%{summary}.
31bed76
5e437cf
%files       -n %{crate}-defaults
31bed76
%{_prefix}/lib/systemd/zram-generator.conf
0bd13b4
%endif
0bd13b4
0bd13b4
%package        devel
b25a65a
Summary:        %{summary}
0bd13b4
BuildArch:      noarch
0bd13b4
0bd13b4
%description    devel %{_description}
0bd13b4
0bd13b4
This package contains library source intended for building other packages
0bd13b4
which use "%{crate}" crate.
0bd13b4
0bd13b4
%files          devel
0bd13b4
%license LICENSE
54677ac
%doc README.md
0bd13b4
%{cargo_registry}/%{crate}-%{version_no_tilde}/
0bd13b4
0bd13b4
%package     -n %{name}+default-devel
b25a65a
Summary:        %{summary}
0bd13b4
BuildArch:      noarch
0bd13b4
0bd13b4
%description -n %{name}+default-devel %{_description}
0bd13b4
0bd13b4
This package contains library source intended for building other packages
0bd13b4
which use "default" feature of "%{crate}" crate.
0bd13b4
0bd13b4
%files       -n %{name}+default-devel
0bd13b4
%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml
611c1e5
08de400
%prep
611c1e5
%autosetup -n %{crate}-%{version_no_tilde} -p1
31bed76
cp -a %{S:1} .
08de400
%cargo_prep
08de400
e251a0e
%generate_buildrequires
e251a0e
%cargo_generate_buildrequires
46a3669
echo '/usr/bin/make'
46a3669
echo '/usr/bin/ronn'
41a4240
echo 'systemd-rpm-macros'
e251a0e
08de400
%build
4fbeb5c
export SYSTEMD_UTIL_DIR=%{_systemd_util_dir}
08de400
%cargo_build
46a3669
make systemd_service
6030cbe
LC_ALL=C.UTF-8 ronn --roff --organization="zram-generator %{version_no_tilde}" man/*.md
08de400
08de400
%install
4fbeb5c
export SYSTEMD_UTIL_DIR=%{_systemd_util_dir}
08de400
%cargo_install
08de400
08de400
mkdir -p %{buildroot}%{_systemdgeneratordir}
08de400
mv -v %{buildroot}%{_bindir}/zram-generator %{buildroot}%{_systemdgeneratordir}/
46a3669
install -Dpm0644 -t %{buildroot}%{_unitdir} units/systemd-zram-setup@.service
c008a0a
install -Dpm0644 -t %{buildroot}%{_prefix}/lib/systemd %{SOURCE1}
6030cbe
install -Dpm0644 -t %{buildroot}%{_mandir}/man8 man/zram-generator.8
b25a65a
install -Dpm0644 -t %{buildroot}%{_mandir}/man5 man/zram-generator.conf.5
08de400
08de400
%if %{with check}
08de400
%check
4fbeb5c
export SYSTEMD_UTIL_DIR=%{_systemd_util_dir}
08de400
%cargo_test
08de400
%endif
08de400
08de400
%changelog
d2520be
* Fri Mar 19 2021 Vasiliy Glazov <vascom2@gmail.com> - 0.3.2-2
d2520be
- Fix max-zram-size value to 8GB
d2520be
3095258
* Wed Feb 24 2021 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 0.3.2-1
3095258
- Downgrade logging levels (#1930869)
3095258
c008a0a
* Wed Jan 27 2021 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 0.3.1-2
c008a0a
- Implement https://fedoraproject.org/wiki/Changes/Scale_ZRAM_to_full_memory_size (#1921084)
c008a0a
41a4240
* Sat Jan 23 13:23:10 CET 2021 Igor Raits <ignatenkobrain@fedoraproject.org> - 0.3.1-1
41a4240
- Update to 0.3.1
41a4240
46a3669
* Wed Jan 13 16:57:21 CET 2021 Igor Raits <ignatenkobrain@fedoraproject.org> - 0.3.0~rc.1-1
46a3669
- Update to 0.3.0-rc.1
46a3669
0768aef
* Mon Dec 28 13:34:14 CET 2020 Igor Raits <ignatenkobrain@fedoraproject.org> - 0.2.0-6
0768aef
- Rebuild
0768aef
b25a65a
* Mon Nov 23 2020 Fabio Valentini <decathorpe@gmail.com> - 0.2.0-5
b25a65a
- Allow building against rust-ini 0.16.
b25a65a
57276c2
* Sun Aug 16 15:02:03 GMT 2020 Igor Raits <ignatenkobrain@fedoraproject.org> - 0.2.0-4
57276c2
- Rebuild
57276c2
e29686c
* Sat Aug  1 2020 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 0.2.0-3
e29686c
- Obsolete zram package from zram-generator-defaults
e29686c
244db94
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.0-2
244db94
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
244db94
97184da
* Sat Jul 04 17:30:46 CEST 2020 Igor Raits <ignatenkobrain@fedoraproject.org> - 0.2.0-1
97184da
- Update to 0.2.0
97184da
6030cbe
* Tue Jun 23 19:56:14 CEST 2020 Igor Raits <ignatenkobrain@fedoraproject.org> - 0.2.0~rc.1-1
6030cbe
- Update to 0.2.0-rc.1
6030cbe
31bed76
* Thu Jun 18 11:30:43 CEST 2020 Igor Raits <ignatenkobrain@fedoraproject.org> - 0.2.0~beta.1-3
31bed76
- Create a subpackage with default configuration
31bed76
8f1281f
* Thu Jun 18 10:14:43 CEST 2020 Igor Raits <ignatenkobrain@fedoraproject.org> - 0.2.0~beta.1-2
8f1281f
- Install swap-create unit file
8f1281f
0bd13b4
* Thu Jun 18 09:27:37 CEST 2020 Igor Raits <ignatenkobrain@fedoraproject.org> - 0.2.0~beta.1-1
0bd13b4
- Update to 0.2.0-beta.1
0bd13b4
1d8bf34
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.1.2-2
1d8bf34
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
1d8bf34
58ba025
* Mon Oct  7 2019 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 0.1.2-1
58ba025
- Update to latest version
58ba025
ea16878
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.1.1-5
ea16878
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
ea16878
e251a0e
* Mon Jul 22 21:30:22 CEST 2019 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.1.1-4
e251a0e
- Regenerate
e251a0e
611c1e5
* Sat Mar 09 2019 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.1.1-3
611c1e5
- Adapt to new packaging
611c1e5
46bdab1
* Fri Mar  1 2019 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 0.1.1-2
46bdab1
- Add crude patch to fix build (#1676154)
46bdab1
e378da2
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.1.1-2
e378da2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
e378da2
08de400
* Thu Aug 16 2018 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 0.1.1-1
08de400
- Initial package