forked from mystilleef/FedoraZram
-
Notifications
You must be signed in to change notification settings - Fork 0
/
zram.spec
75 lines (56 loc) · 1.74 KB
/
zram.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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
Summary: Enable compressed swap in memory
Name: zram
Version: 1.0.0
Release: 2%{?dist}
License: GPLv2
Group: System Environment/Daemons
Source0: %{name}-%{version}.tar.bz2
BuildArch: noarch
BuildRequires: systemd-units
Requires(post): systemd-sysv
Requires(post): systemd-units
Requires(preun): systemd-units
Requires(postun): systemd-units
Requires: filesystem >= 2.0.1, initscripts, bc > 1.0
# No debug info for bare scripts, right?
%define debug_package %{nil}
# http://fedoraproject.org/wiki/Changes/UnversionedDocdirs
%{!?_pkgdocdir: %global _pkgdocdir %{_docdir}/%{name}-%{version}}
%global _docdir_fmt %{name}
%description
zram compresses swap partitions into RAM for performance.
You need Linux kernel version 2.6.37.1 or better to use zram.
%prep
%setup -q
%build
%install
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig
mkdir -p $RPM_BUILD_ROOT%{_unitdir}
ln -s $RPM_BUILD_ROOT/usr/lib $RPM_BUILD_ROOT/lib
mkdir -p $RPM_BUILD_ROOT%{_sbindir}
%makeinstall DESTDIR=$RPM_BUILD_ROOT
%post
%systemd_post mkzram.service
%preun
%systemd_preun mkzram.service
%postun
%systemd_postun_with_restart mkzram.service
%files
%doc README.md
%config(noreplace) %{_sysconfdir}/sysconfig/%{name}
%{_unitdir}/mkzram.service
%{_sbindir}/zramstart
%{_sbindir}/zramstop
%{_sbindir}/zramstat
%exclude /lib
%changelog
* Tue Nov 25 2014 Juan Orti <[email protected]> - 1.0.0-1
- Spec file cleanup
* Mon Nov 25 2013 Doncho Gunchev <[email protected]> - 0:1.0.0-2
- http://fedoraproject.org/wiki/Changes/UnversionedDocdirs
- Added kmod-staging dependency
- Test on Fedora 19
* Mon Sep 02 2013 Doncho Gunchev <[email protected]> - 0:1.0.0-1
- Add Darren Steven's build fix for fedora 18
* Tue Mar 19 2013 Doncho Gunchev <[email protected]> - 0:1.0.0-0
- Initial package