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