3 %bcond_without dist_kernel # without sources of distribution kernel
5 Summary: Linux Framework for User-Space Devices
6 Summary(pl): Struktura linuksowa dla urz±dzeñ w przestrzeni u¿ytkownika
12 Group: Development/Libraries
13 Source0: ftp://ftp.circlemud.org/pub/jelson/fusd/%{name}-%{version}.tar.gz
14 # Source0-md5: 64b601e4b72eab00927ec8732ef462b5
15 URL: http://www.circlemud.org/~jelson/software/fusd/
16 %{?with_dist_kernel:BuildRequires: kernel-headers}
17 BuildRequires: %{kgcc_package}
18 BuildRequires: python-devel >= 2.2.1
19 BuildRequires: rpmbuild(macros) >= 1.118
20 BuildRequires: sed >= 4.0
21 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
24 FUSD (pronounced fused) is a Linux framework for proxying device file
25 callbacks into user-space, allowing device files to be implemented by
26 daemons instead of kernel code. Despite being implemented in
27 user-space, FUSD devices can look and act just like any other file
28 under /dev which is implemented by kernel callbacks.
31 FUSD jest linuksow± struktur± przekierowywania odwo³añ do plików
32 urz±dzeñ do przestrzeni u¿ytkownika, co umo¿liwia implementacjê tych
33 plików urz±dzeñ za pomoc± demonów zamiast poprzez kod j±dra. Pomimo,
34 ¿e zaimplementowane w przestrzeni u¿ytkownika, urz±dzenia FUSD
35 wygl±daj± i dzia³aj± tak jak ka¿dy inny plik w /dev zaimplementowany
36 poprzez funkcje j±dra.
38 %package -n kernel-misc-kfusd
39 Summary: Linux kernel FUSD modules
40 Summary(pl): Modu³y FUSD dla j±dra Linuksa
41 Release: %{_rel}@%{_kernel_ver_str}
43 %{?with_dist_kernel:%requires_releq_kernel_up}
44 PreReq: modutils >= 2.4.6-4
45 Requires(post,postun): /sbin/depmod
47 %description -n kernel-misc-kfusd
48 Linux kernel FUSD modules.
50 %description -n kernel-misc-kfusd -l pl
51 Modu³y FUSD dla j±dra Linuksa.
53 %package -n kernel-smp-misc-kfusd
54 Summary: Linux SMP kernel FUSD modules
55 Summary(pl): Modu³y SMP FUSD dla j±dra Linuksa
56 Release: %{_rel}@%{_kernel_ver_str}
58 %{?with_dist_kernel:%requires_releq_kernel_smp}
59 PreReq: modutils >= 2.4.6-4
60 Requires(post,postun): /sbin/depmod
62 %description -n kernel-smp-misc-kfusd
63 Linux SMP kernel FUSD modules.
65 %description -n kernel-smp-misc-kfusd -l pl
66 Modu³y SMP FUSD dla j±dra Linuksa.
68 %package -n python-fusd
69 Summary: Python bindings for FUSD
70 Summary(pl): Wi±zania Pythona dla FUSD
72 Group: Libraries/Python
73 %pyrequires_eq python-modules
75 %description -n python-fusd
76 Python bindings for FUSD.
78 %description -n python-fusd -l pl
79 Wi±zania Pythona dla FUSD.
86 sed -i -e 's#CC := .*#CC := %{kgcc}#g' make.include
87 sed -i -e 's#CFLAGS := .*#CFLAGS := -fPIC %{rpmcflags}#g' make.include
88 sed -i -e 's#KERNEL_HOME := .*#KERNEL_HOME := %{_kernelsrcdir}#g' Makefile
92 sed -i -e 's#CFLAGS := .*#CFLAGS := -fPIC %{rpmcflags} -DCONFIG_SMP#g' make.include
99 rm -rf $RPM_BUILD_ROOT
100 install -d $RPM_BUILD_ROOT{%{_libdir},%{_includedir}/%{name}}
101 install -d $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}{,smp}/misc
103 install obj.UP/libfusd.a $RPM_BUILD_ROOT%{_libdir}
104 install include/*.h $RPM_BUILD_ROOT%{_includedir}/%{name}
105 install obj.UP/kfusd.*o $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/misc
106 install obj.*-linux/kfusd.*o $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}smp/misc
109 python setup.py install \
110 --root=$RPM_BUILD_ROOT \
114 rm -rf $RPM_BUILD_ROOT
116 %post -n kernel-misc-kfusd
117 %depmod %{_kernel_ver}
119 %postun -n kernel-misc-kfusd
120 %depmod %{_kernel_ver}
122 %post -n kernel-smp-misc-kfusd
123 %depmod %{_kernel_ver}smp
125 %postun -n kernel-smp-misc-kfusd
126 %depmod %{_kernel_ver}smp
129 %defattr(644,root,root,755)
130 %doc ChangeLog README fusd/* examples
131 %{_includedir}/%{name}
134 %files -n kernel-misc-kfusd
135 %defattr(644,root,root,755)
136 /lib/modules/%{_kernel_ver}/*/kfusd*
138 %files -n kernel-smp-misc-kfusd
139 %defattr(644,root,root,755)
140 /lib/modules/%{_kernel_ver}smp/*/kfusd*
142 %files -n python-fusd
143 %defattr(644,root,root,755)
145 %attr(755,root,root) %{py_sitedir}/*.so
146 %{py_sitedir}/*.py[co]