]> git.pld-linux.org Git - packages/linux-fusion.git/blob - linux-fusion.spec
- rebuild for kernel-3.10.10-1
[packages/linux-fusion.git] / linux-fusion.spec
1 #
2 # Conditional build:
3 %bcond_without  dist_kernel     # allow non-distribution kernel
4 %bcond_without  kernel          # don't build kernel modules
5 %bcond_without  userspace       # don't build userspace programs
6 %bcond_with     verbose         # verbose build (V=1)
7 #
8 %if %{without kernel}
9 %undefine       with_dist_kernel
10 %endif
11 %if "%{_alt_kernel}" != "%{nil}"
12 %undefine       with_userspace
13 %endif
14
15 %define         rel     6
16 %define         pname   linux-fusion
17 Summary:        Fusion and One Linux kernel modules
18 Summary(pl.UTF-8):      Moduły Fusion i One dla jądra Linuksa
19 Name:           %{pname}%{_alt_kernel}
20 Version:        9.0.2
21 Release:        %{rel}
22 License:        GPL v2+
23 Group:          Base/Kernel
24 Source0:        http://www.directfb.org/downloads/Core/linux-fusion/%{pname}-%{version}.tar.gz
25 # Source0-md5:  f025373d2fe6d58e572f27410dadcf1f
26 URL:            http://www.directfb.org/
27 %if %{with kernel}
28 %{?with_dist_kernel:BuildRequires:      kernel-module-build >= 3:2.6.20.2}
29 BuildRequires:  rpmbuild(macros) >= 1.379
30 %endif
31 BuildRequires:  sed >= 4.0
32 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
33
34 %description
35 Fusion and One Linux kernel modules.
36
37 %description -l pl.UTF-8
38 Moduły Fusion i One dla jądra Linuksa.
39
40 %package devel
41 Summary:        Header file for Fusion device
42 Summary(pl.UTF-8):      Plik nagłówkowy dla urządzenia Fusion
43 Group:          Development/Libraries
44 Requires:       linux-libc-headers
45
46 %description devel
47 Header file for Fusion device.
48
49 %description devel -l pl.UTF-8
50 Plik nagłówkowy dla urządzenia Fusion.
51
52 %package -n linux-one-devel
53 Summary:        Header file for One IPC device
54 Summary(pl.UTF-8):      Plik nagłówkowy dla urządzenia IPC One
55 Group:          Development/Libraries
56 Requires:       linux-libc-headers
57
58 %description -n linux-one-devel
59 Header file for One IPC device.
60
61 Linux One is the new IPC API used by Coma.
62
63 %description -n linux-one-devel -l pl.UTF-8
64 Plik nagłówkowy dla urządzenia IPC One.
65
66 Linux One to nowe API IPC wykorzystywane przez Comę.
67
68 %package -n kernel%{_alt_kernel}-char-fusion
69 Summary:        Fusion module for Linux kernel
70 Summary(pl.UTF-8):      Moduł Fusion dla jądra Linuksa
71 Release:        %{rel}@%{_kernel_ver_str}
72 Group:          Base/Kernel
73 Requires(post,postun):  /sbin/depmod
74 %if %{with dist_kernel}
75 %requires_releq_kernel
76 Requires(postun):       %releq_kernel
77 %endif
78
79 %description -n kernel%{_alt_kernel}-char-fusion
80 Fusion module for Linux kernel.
81
82 %description -n kernel%{_alt_kernel}-char-fusion -l pl.UTF-8
83 Moduł Fusion dla jądra Linuksa.
84
85 %package -n kernel%{_alt_kernel}-misc-one
86 Summary:        One IPC module for Linux kernel
87 Summary(pl.UTF-8):      Moduł IPC One dla jądra Linuksa
88 Release:        %{rel}@%{_kernel_ver_str}
89 Group:          Base/Kernel
90 Requires(post,postun):  /sbin/depmod
91 %if %{with dist_kernel}
92 %requires_releq_kernel
93 Requires(postun):       %releq_kernel
94 %endif
95
96 %description -n kernel%{_alt_kernel}-misc-one
97 One IPC module for Linux kernel.
98
99 Linux One is the new IPC API used by Coma.
100
101 %description -n kernel%{_alt_kernel}-misc-one -l pl.UTF-8
102 Moduł IPC One dla jądra Linuksa.
103
104 Linux One to nowe API IPC wykorzystywane przez Comę.
105
106 %prep
107 %setup -q -n %{pname}-%{version}
108
109 %{__sed} -i -e 's/^obj-[^ ]*/obj-m/' linux/drivers/char/fusion/Makefile-2.6
110 %{__sed} -i -e 's/^obj-[^ ]*/obj-m/' one/Makefile-2.6
111 echo "EXTRA_CFLAGS = -I`pwd`/linux/include -I`pwd`/linux/drivers/char/fusion -I`pwd`/linux/drivers/char/fusion/single" >> linux/drivers/char/fusion/Makefile-2.6
112 echo "EXTRA_CFLAGS = -I`pwd`/include -I`pwd`/one/single" >> one/Makefile-2.6
113
114 %build
115 %if %{with kernel}
116 cd linux/drivers/char/fusion
117 ln -sf Makefile-2.6 Makefile
118 # NOTE: build_kernel_modules (as of rpm macros 1.649) doesn't allow line breaking
119 %build_kernel_modules -m fusion FUSIONCORE=single
120 cd ../../../../one
121 ln -sf Makefile-2.6 Makefile
122 %build_kernel_modules -m linux-one ONECORE=single
123 %endif
124
125 %install
126 rm -rf $RPM_BUILD_ROOT
127
128 %if %{with userspace}
129 install -d $RPM_BUILD_ROOT%{_includedir}/linux
130 install linux/include/linux/fusion.h $RPM_BUILD_ROOT%{_includedir}/linux
131 install include/linux/one.h $RPM_BUILD_ROOT%{_includedir}/linux
132 %endif
133
134 %if %{with kernel}
135 cd linux/drivers/char/fusion
136 %install_kernel_modules -m fusion -d kernel/drivers/char
137 cd ../../../../one
138 %install_kernel_modules -m linux-one -d misc
139 %endif
140
141 %clean
142 rm -rf $RPM_BUILD_ROOT
143
144 %post   -n kernel%{_alt_kernel}-char-fusion
145 %depmod %{_kernel_ver}
146
147 %postun -n kernel%{_alt_kernel}-char-fusion
148 %depmod %{_kernel_ver}
149
150 %post   -n kernel%{_alt_kernel}-misc-one
151 %depmod %{_kernel_ver}
152
153 %postun -n kernel%{_alt_kernel}-misc-one
154 %depmod %{_kernel_ver}
155
156 %if %{with userspace}
157 %files devel
158 %defattr(644,root,root,755)
159 %doc ChangeLog README TODO
160 %{_includedir}/linux/fusion.h
161
162 %files -n linux-one-devel
163 %defattr(644,root,root,755)
164 %doc README.linux-one TODO.linux-one
165 %{_includedir}/linux/one.h
166 %endif
167
168 %if %{with kernel}
169 %files -n kernel%{_alt_kernel}-char-fusion
170 %defattr(644,root,root,755)
171 /lib/modules/%{_kernel_ver}/kernel/drivers/char/fusion.ko*
172
173 %files -n kernel%{_alt_kernel}-misc-one
174 %defattr(644,root,root,755)
175 /lib/modules/%{_kernel_ver}/misc/linux-one.ko*
176 %endif
This page took 0.033712 seconds and 3 git commands to generate.