]> git.pld-linux.org Git - packages/dmcache.git/blob - dmcache.spec
- try compile outside kernel src
[packages/dmcache.git] / dmcache.spec
1 # TODO
2 # - build fails as internal kernel headers are used like:
3 #include "dm.h"
4 #include "dm-io.h"
5 #include "dm-bio-list.h"
6 #include "kcopyd.h"
7 #
8 # Conditional build:
9 %bcond_without  dist_kernel     # allow non-distribution kernel
10 %bcond_without  kernel          # don't build kernel modules
11 %bcond_without  userspace       # don't build userspace programs
12 %bcond_with     verbose         # verbose build (V=1)
13
14 %if %{without kernel}
15 %undefine       with_dist_kernel
16 %endif
17
18 #
19 # main package.
20 #
21 %define         _rel    0.1
22 Summary:        DM-Cache: A Generic Block-level Disk Cache
23 Name:           dmcache
24 Version:        0.1
25 Release:        %{_rel}
26 License:        GPL
27 Group:          Base/Kernel
28 # http://www.acis.ufl.edu/~ming/dmcache/patch-2.6.21
29 Patch0:         linux-%{name}.patch
30 URL:            http://www.acis.ufl.edu/~ming/dmcache/index.html
31 BuildRequires:  patchutils
32 %if %{with kernel}
33 %{?with_dist_kernel:BuildRequires:      kernel%{_alt_kernel}-module-build >= 3:2.6.20.2}
34 BuildRequires:  rpmbuild(macros) >= 1.379
35 %endif
36 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
37
38 %description
39 Dm-cache provides a generic block-level disk cache for storage
40 networking. It is built upon the Linux device-mapper, a generic block
41 device virtualization infrastructure. It can be transparently plugged
42 into a client of any storage system, including SAN, iSCSI and AoE, and
43 supports dynamic customization for policy-guided optimizations.
44 Experimental evaluation based on file system benchmarks and typical
45 applications show that dm-cache can significantly improve the
46 performance and scalability of a storage system by orders of
47 magnitude.
48
49 %package -n kernel%{_alt_kernel}-block-dmcache
50 Summary:        Linux driver for dmcache
51 Summary(pl.UTF-8):      Sterownik dla Linuksa do dmcache
52 Release:        %{_rel}@%{_kernel_ver_str}
53 Group:          Base/Kernel
54 Requires(post,postun):  /sbin/depmod
55 %if %{with dist_kernel}
56 %requires_releq_kernel
57 Requires(postun):       %releq_kernel
58 %endif
59
60 %description -n kernel%{_alt_kernel}-block-dmcache
61 This is driver for dmcache for Linux.
62
63 This package contains Linux module.
64
65 %description -n kernel%{_alt_kernel}-block-dmcache -l pl.UTF-8
66 Sterownik dla Linuksa do dmcache.
67
68 Ten pakiet zawiera moduł jądra Linuksa.
69
70 %prep
71 %setup -qcT
72 filterdiff -x '*/Kconfig' -x '*/Makefile' %{PATCH0} | %{__patch} -p1
73 # prepare makefile:
74 cat > drivers/md/Makefile << EOF
75
76 obj-m += dm-cache.o
77 EOF
78
79 %build
80 %if %{with userspace}
81 %endif
82
83 %if %{with kernel}
84 %build_kernel_modules -C drivers/md -m dmcache
85 %endif
86
87 %install
88 rm -rf $RPM_BUILD_ROOT
89 %if %{with userspace}
90 %endif
91
92 %if %{with kernel}
93 %install_kernel_modules -m dmcache -d block
94 %endif
95
96 %clean
97 rm -rf $RPM_BUILD_ROOT
98
99 %post   -n kernel%{_alt_kernel}-block-dmcache
100 %depmod %{_kernel_ver}
101
102 %postun -n kernel%{_alt_kernel}-block-dmcache
103 %depmod %{_kernel_ver}
104
105 %if %{with kernel}
106 %files -n kernel%{_alt_kernel}-block-dmcache
107 %defattr(644,root,root,755)
108 /lib/modules/%{_kernel_ver}/block/*.ko*
109 %endif
110
111 %if %{with userspace}
112 %files
113 %defattr(644,root,root,755)
114 %endif
This page took 0.099144 seconds and 4 git commands to generate.