]> git.pld-linux.org Git - packages/dmcache.git/blame - dmcache.spec
- pl
[packages/dmcache.git] / dmcache.spec
CommitLineData
85de950f 1# TODO
4c7a488e 2# - make it use kernel headers, not -source
85de950f
ER
3#
4# Conditional build:
5%bcond_without dist_kernel # allow non-distribution kernel
6%bcond_without kernel # don't build kernel modules
7%bcond_without userspace # don't build userspace programs
8%bcond_with verbose # verbose build (V=1)
9
10%if %{without kernel}
11%undefine with_dist_kernel
12%endif
13
85de950f 14%define _rel 0.1
483e9c26 15Summary: DM-Cache: A Generic Block-level Disk Cache
64218660 16Summary(pl.UTF-8): DM-Cache - ogólna pamięć podręczna na poziomie urządzeń blokowych
85de950f
ER
17Name: dmcache
18Version: 0.1
19Release: %{_rel}
20License: GPL
21Group: Base/Kernel
4c7a488e
ER
22Source0: http://www.acis.ufl.edu/~ming/dmcache/dmc-setup.pl
23# Source0-md5: f9a214936265781d30a11fbc1d6c0878
85de950f
ER
24Patch0: linux-%{name}.patch
25URL: http://www.acis.ufl.edu/~ming/dmcache/index.html
26BuildRequires: patchutils
27%if %{with kernel}
4c7a488e
ER
28%if %{with dist_kernel}
29BuildRequires: kernel%{_alt_kernel}-module-build >= 3:2.6.20.2
30BuildRequires: kernel%{_alt_kernel}-source >= 3:2.6.20.2
31%endif
85de950f
ER
32BuildRequires: rpmbuild(macros) >= 1.379
33%endif
4c7a488e 34%{?with_userspace:BuildRequires: perl-tools-pod}
85de950f
ER
35BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
36
37%description
483e9c26
ER
38Dm-cache provides a generic block-level disk cache for storage
39networking. It is built upon the Linux device-mapper, a generic block
85de950f
ER
40device virtualization infrastructure. It can be transparently plugged
41into a client of any storage system, including SAN, iSCSI and AoE, and
42supports dynamic customization for policy-guided optimizations.
43Experimental evaluation based on file system benchmarks and typical
44applications show that dm-cache can significantly improve the
45performance and scalability of a storage system by orders of
46magnitude.
47
64218660
JB
48%description -l pl.UTF-8
49dm-cache udostępnia ogólną pamięć podręczną na poziomie urządzeń
50blokowych dla dysków, z myślą o sieciowym dostępie do danych. Jest
51zbudowana w oparciu o linuksowy device-mapper - ogólną infrastrukturę
52wirtualizacji urządzeń blokowych. Może być w sposób przezroczysty
53włączony w klienta dowolnego systemu składowania danych, w tym SAN,
54iSCSI i AoE, ponadto obsługuje dynamiczne dostosowywanie do
55optymalizacji sterowanych polityką. Eksperymentalne szacowanie oparte
56na testach wydajności systemu plików i typowych aplikacji pokazuje, że
57dm-cache może znacząco poprawić wydajność i skalowalność systemu
58składowania danych o rzędy wielkości.
59
6d0262e4 60%package -n kernel%{_alt_kernel}-drivers-dmcache
64218660
JB
61Summary: dm-cache Linux kernel driver
62Summary(pl.UTF-8): Sterownik jądra Linuksa dm-cache
85de950f
ER
63Release: %{_rel}@%{_kernel_ver_str}
64Group: Base/Kernel
65Requires(post,postun): /sbin/depmod
66%if %{with dist_kernel}
67%requires_releq_kernel
68Requires(postun): %releq_kernel
69%endif
70
6d0262e4 71%description -n kernel%{_alt_kernel}-drivers-dmcache
64218660 72dm-cache Linux kernel driver.
85de950f 73
6d0262e4 74%description -n kernel%{_alt_kernel}-drivers-dmcache -l pl.UTF-8
64218660 75Sterownik jądra Linuksa dm-cache.
85de950f
ER
76
77%prep
78%setup -qcT
4c7a488e 79install %{SOURCE0} .
85de950f
ER
80filterdiff -x '*/Kconfig' -x '*/Makefile' %{PATCH0} | %{__patch} -p1
81# prepare makefile:
82cat > drivers/md/Makefile << EOF
85de950f 83obj-m += dm-cache.o
6d0262e4 84
fcbc2f35 85EXTRA_CFLAGS="-I%{_kernelsrcdir}/drivers/md"
85de950f
ER
86EOF
87
88%build
89%if %{with userspace}
4c7a488e 90pod2man dmc-setup.pl > dmc-setup.1
85de950f
ER
91%endif
92
93%if %{with kernel}
6d0262e4 94%build_kernel_modules -C drivers/md -m dm-cache
85de950f
ER
95%endif
96
97%install
98rm -rf $RPM_BUILD_ROOT
99%if %{with userspace}
4c7a488e
ER
100install -d $RPM_BUILD_ROOT{%{_sbindir},%{_mandir}/man1}
101install dmc-setup.pl $RPM_BUILD_ROOT%{_sbindir}/dmc-setup
102install dmc-setup.1 $RPM_BUILD_ROOT%{_mandir}/man1
85de950f
ER
103%endif
104
105%if %{with kernel}
6d0262e4 106%install_kernel_modules -m drivers/md/dm-cache -d kernel/drivers/md
85de950f
ER
107%endif
108
109%clean
110rm -rf $RPM_BUILD_ROOT
111
6d0262e4 112%post -n kernel%{_alt_kernel}-drivers-dmcache
85de950f
ER
113%depmod %{_kernel_ver}
114
6d0262e4 115%postun -n kernel%{_alt_kernel}-drivers-dmcache
85de950f
ER
116%depmod %{_kernel_ver}
117
118%if %{with kernel}
6d0262e4 119%files -n kernel%{_alt_kernel}-drivers-dmcache
85de950f 120%defattr(644,root,root,755)
6d0262e4 121/lib/modules/%{_kernel_ver}/kernel/drivers/md/*.ko*
85de950f
ER
122%endif
123
124%if %{with userspace}
125%files
126%defattr(644,root,root,755)
4c7a488e
ER
127%attr(755,root,root) %{_sbindir}/dmc-setup
128%{_mandir}/man1/dmc-setup.1*
85de950f 129%endif
This page took 0.07371 seconds and 4 git commands to generate.