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