]> git.pld-linux.org Git - packages/fusd.git/blob - fusd.spec
1d29cc904545c7f3ffc68556b56d1ae002f0ac86
[packages/fusd.git] / fusd.spec
1 #
2 # Conditional build:
3 %bcond_without  dist_kernel     # without sources of distribution kernel
4 #
5 Summary:        Linux Framework for User-Space Devices
6 Summary(pl):    Struktura linuksowa dla urz±dzeñ w przestrzeni u¿ytkownika
7 Name:           fusd
8 Version:        1.10
9 %define _rel    1
10 Release:        %{_rel}
11 License:        BSD
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)
22
23 %description
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.
29
30 %description -l pl
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.
37
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}
42 Group:          Base/Kernel
43 %{?with_dist_kernel:%requires_releq_kernel_up}
44 PreReq:         modutils >= 2.4.6-4
45 Requires(post,postun):  /sbin/depmod
46
47 %description -n kernel-misc-kfusd
48 Linux kernel FUSD modules.
49
50 %description -n kernel-misc-kfusd -l pl
51 Modu³y FUSD dla j±dra Linuksa.
52
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}
57 Group:          Base/Kernel
58 %{?with_dist_kernel:%requires_releq_kernel_smp}
59 PreReq:         modutils >= 2.4.6-4
60 Requires(post,postun):  /sbin/depmod
61
62 %description -n kernel-smp-misc-kfusd
63 Linux SMP kernel FUSD modules.
64
65 %description -n kernel-smp-misc-kfusd -l pl
66 Modu³y SMP FUSD dla j±dra Linuksa.
67
68 %package -n python-fusd
69 Summary:        Python bindings for FUSD
70 Summary(pl):    Wi±zania Pythona dla FUSD
71 Release:        %{_rel}
72 Group:          Libraries/Python
73 %pyrequires_eq  python-modules
74
75 %description -n python-fusd
76 Python bindings for FUSD.
77
78 %description -n python-fusd -l pl
79 Wi±zania Pythona dla FUSD.
80
81 %prep
82 %setup -q
83 tar xzf doc/*.tar.gz
84
85 %build
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
89 %{__make}
90 mv obj.* obj.UP
91 %{__make} clean
92 sed -i -e 's#CFLAGS := .*#CFLAGS := -fPIC %{rpmcflags} -DCONFIG_SMP#g' make.include
93 %{__make}
94
95 cd python
96 python setup.py build
97
98 %install
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
102
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
107
108 cd python
109 python setup.py install \
110         --root=$RPM_BUILD_ROOT \
111         --optimize=2
112
113 %clean
114 rm -rf $RPM_BUILD_ROOT
115
116 %post   -n kernel-misc-kfusd
117 %depmod %{_kernel_ver}
118
119 %postun -n kernel-misc-kfusd
120 %depmod %{_kernel_ver}
121
122 %post   -n kernel-smp-misc-kfusd
123 %depmod %{_kernel_ver}smp
124
125 %postun -n kernel-smp-misc-kfusd
126 %depmod %{_kernel_ver}smp
127
128 %files
129 %defattr(644,root,root,755)
130 %doc ChangeLog README fusd/* examples
131 %{_includedir}/%{name}
132 %{_libdir}/*.a
133
134 %files -n kernel-misc-kfusd
135 %defattr(644,root,root,755)
136 /lib/modules/%{_kernel_ver}/*/kfusd*
137
138 %files -n kernel-smp-misc-kfusd
139 %defattr(644,root,root,755)
140 /lib/modules/%{_kernel_ver}smp/*/kfusd*
141
142 %files -n python-fusd
143 %defattr(644,root,root,755)
144 %doc python/README
145 %attr(755,root,root) %{py_sitedir}/*.so
146 %{py_sitedir}/*.py[co]
This page took 0.067676 seconds and 2 git commands to generate.