]> git.pld-linux.org Git - packages/fusd.git/blob - fusd.spec
BR: rpmbuild(macros) >= 1.710
[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.UTF-8):      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.710
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.UTF-8
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.UTF-8):      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.UTF-8
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.UTF-8):      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.UTF-8
66 Moduły SMP FUSD dla jądra Linuksa.
67
68 %package -n python-fusd
69 Summary:        Python bindings for FUSD
70 Summary(pl.UTF-8):      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.UTF-8
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 %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 %py_install
110
111 %clean
112 rm -rf $RPM_BUILD_ROOT
113
114 %post   -n kernel-misc-kfusd
115 %depmod %{_kernel_ver}
116
117 %postun -n kernel-misc-kfusd
118 %depmod %{_kernel_ver}
119
120 %post   -n kernel-smp-misc-kfusd
121 %depmod %{_kernel_ver}smp
122
123 %postun -n kernel-smp-misc-kfusd
124 %depmod %{_kernel_ver}smp
125
126 %files
127 %defattr(644,root,root,755)
128 %doc ChangeLog README fusd/* examples
129 %{_includedir}/%{name}
130 %{_libdir}/*.a
131
132 %files -n kernel-misc-kfusd
133 %defattr(644,root,root,755)
134 /lib/modules/%{_kernel_ver}/*/kfusd*
135
136 %files -n kernel-smp-misc-kfusd
137 %defattr(644,root,root,755)
138 /lib/modules/%{_kernel_ver}smp/*/kfusd*
139
140 %files -n python-fusd
141 %defattr(644,root,root,755)
142 %doc python/README
143 %attr(755,root,root) %{py_sitedir}/*.so
144 %{py_sitedir}/*.py[co]
This page took 0.095569 seconds and 3 git commands to generate.