]>
Commit | Line | Data |
---|---|---|
006bcc7c JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without dist_kernel # allow non-distribution kernel | |
4 | %bcond_without kernel # don't build kernel modules | |
006bcc7c JB |
5 | %bcond_without userspace # don't build userspace programs |
6 | %bcond_with verbose # verbose build (V=1) | |
52a371d7 | 7 | # |
f29254e6 | 8 | %if %{without kernel} |
006bcc7c JB |
9 | %undefine with_dist_kernel |
10 | %endif | |
afbeb18d JR |
11 | %if "%{_alt_kernel}" != "%{nil}" |
12 | %undefine with_userspace | |
13 | %endif | |
006bcc7c | 14 | |
17e87d7c | 15 | %define rel 6 |
fb70470f | 16 | %define pname linux-fusion |
6edb6a11 JB |
17 | Summary: Fusion and One Linux kernel modules |
18 | Summary(pl.UTF-8): Moduły Fusion i One dla jądra Linuksa | |
fb70470f | 19 | Name: %{pname}%{_alt_kernel} |
0a49b425 | 20 | Version: 9.0.2 |
31041c89 | 21 | Release: %{rel} |
006bcc7c JB |
22 | License: GPL v2+ |
23 | Group: Base/Kernel | |
412dbd1f | 24 | Source0: http://www.directfb.org/downloads/Core/linux-fusion/%{pname}-%{version}.tar.gz |
0a49b425 | 25 | # Source0-md5: f025373d2fe6d58e572f27410dadcf1f |
006bcc7c JB |
26 | URL: http://www.directfb.org/ |
27 | %if %{with kernel} | |
1a6461a5 JB |
28 | %{?with_dist_kernel:BuildRequires: kernel-module-build >= 3:2.6.20.2} |
29 | BuildRequires: rpmbuild(macros) >= 1.379 | |
006bcc7c JB |
30 | %endif |
31 | BuildRequires: sed >= 4.0 | |
32 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
33 | ||
34 | %description | |
6edb6a11 | 35 | Fusion and One Linux kernel modules. |
006bcc7c | 36 | |
08d37a65 | 37 | %description -l pl.UTF-8 |
6edb6a11 | 38 | Moduły Fusion i One dla jądra Linuksa. |
006bcc7c JB |
39 | |
40 | %package devel | |
41 | Summary: Header file for Fusion device | |
6f0ad2f4 | 42 | Summary(pl.UTF-8): Plik nagłówkowy dla urządzenia Fusion |
006bcc7c JB |
43 | Group: Development/Libraries |
44 | Requires: linux-libc-headers | |
45 | ||
46 | %description devel | |
47 | Header file for Fusion device. | |
48 | ||
08d37a65 JR |
49 | %description devel -l pl.UTF-8 |
50 | Plik nagłówkowy dla urządzenia Fusion. | |
006bcc7c | 51 | |
6edb6a11 JB |
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 | ||
fb70470f | 68 | %package -n kernel%{_alt_kernel}-char-fusion |
006bcc7c | 69 | Summary: Fusion module for Linux kernel |
6f0ad2f4 | 70 | Summary(pl.UTF-8): Moduł Fusion dla jądra Linuksa |
31041c89 | 71 | Release: %{rel}@%{_kernel_ver_str} |
006bcc7c JB |
72 | Group: Base/Kernel |
73 | Requires(post,postun): /sbin/depmod | |
74 | %if %{with dist_kernel} | |
fb70470f JR |
75 | %requires_releq_kernel |
76 | Requires(postun): %releq_kernel | |
006bcc7c JB |
77 | %endif |
78 | ||
fb70470f | 79 | %description -n kernel%{_alt_kernel}-char-fusion |
006bcc7c JB |
80 | Fusion module for Linux kernel. |
81 | ||
fb70470f | 82 | %description -n kernel%{_alt_kernel}-char-fusion -l pl.UTF-8 |
08d37a65 | 83 | Moduł Fusion dla jądra Linuksa. |
006bcc7c | 84 | |
fb70470f | 85 | %package -n kernel%{_alt_kernel}-misc-one |
6edb6a11 JB |
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} | |
fb70470f JR |
92 | %requires_releq_kernel |
93 | Requires(postun): %releq_kernel | |
6edb6a11 JB |
94 | %endif |
95 | ||
fb70470f | 96 | %description -n kernel%{_alt_kernel}-misc-one |
6edb6a11 JB |
97 | One IPC module for Linux kernel. |
98 | ||
99 | Linux One is the new IPC API used by Coma. | |
100 | ||
fb70470f | 101 | %description -n kernel%{_alt_kernel}-misc-one -l pl.UTF-8 |
6edb6a11 JB |
102 | Moduł IPC One dla jądra Linuksa. |
103 | ||
104 | Linux One to nowe API IPC wykorzystywane przez Comę. | |
105 | ||
006bcc7c | 106 | %prep |
7108b3fc | 107 | %setup -q -n %{pname}-%{version} |
006bcc7c | 108 | |
6edb6a11 JB |
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 | |
ff217dd6 | 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 |
6edb6a11 | 112 | echo "EXTRA_CFLAGS = -I`pwd`/include -I`pwd`/one/single" >> one/Makefile-2.6 |
006bcc7c JB |
113 | |
114 | %build | |
115 | %if %{with kernel} | |
116 | cd linux/drivers/char/fusion | |
117 | ln -sf Makefile-2.6 Makefile | |
ead03d42 JB |
118 | # NOTE: build_kernel_modules (as of rpm macros 1.649) doesn't allow line breaking |
119 | %build_kernel_modules -m fusion FUSIONCORE=single | |
6edb6a11 JB |
120 | cd ../../../../one |
121 | ln -sf Makefile-2.6 Makefile | |
122 | %build_kernel_modules -m linux-one ONECORE=single | |
006bcc7c JB |
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 | |
6edb6a11 | 131 | install include/linux/one.h $RPM_BUILD_ROOT%{_includedir}/linux |
006bcc7c JB |
132 | %endif |
133 | ||
134 | %if %{with kernel} | |
135 | cd linux/drivers/char/fusion | |
32ece010 | 136 | %install_kernel_modules -m fusion -d kernel/drivers/char |
6edb6a11 | 137 | cd ../../../../one |
fb70470f | 138 | %install_kernel_modules -m linux-one -d misc |
006bcc7c JB |
139 | %endif |
140 | ||
141 | %clean | |
142 | rm -rf $RPM_BUILD_ROOT | |
143 | ||
fb70470f | 144 | %post -n kernel%{_alt_kernel}-char-fusion |
006bcc7c JB |
145 | %depmod %{_kernel_ver} |
146 | ||
fb70470f | 147 | %postun -n kernel%{_alt_kernel}-char-fusion |
006bcc7c JB |
148 | %depmod %{_kernel_ver} |
149 | ||
fb70470f | 150 | %post -n kernel%{_alt_kernel}-misc-one |
6edb6a11 JB |
151 | %depmod %{_kernel_ver} |
152 | ||
fb70470f | 153 | %postun -n kernel%{_alt_kernel}-misc-one |
6edb6a11 JB |
154 | %depmod %{_kernel_ver} |
155 | ||
006bcc7c JB |
156 | %if %{with userspace} |
157 | %files devel | |
158 | %defattr(644,root,root,755) | |
6edb6a11 | 159 | %doc ChangeLog README TODO |
006bcc7c | 160 | %{_includedir}/linux/fusion.h |
6edb6a11 JB |
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 | |
006bcc7c JB |
166 | %endif |
167 | ||
168 | %if %{with kernel} | |
fb70470f | 169 | %files -n kernel%{_alt_kernel}-char-fusion |
006bcc7c JB |
170 | %defattr(644,root,root,755) |
171 | /lib/modules/%{_kernel_ver}/kernel/drivers/char/fusion.ko* | |
6edb6a11 | 172 | |
fb70470f | 173 | %files -n kernel%{_alt_kernel}-misc-one |
6edb6a11 | 174 | %defattr(644,root,root,755) |
fb70470f | 175 | /lib/modules/%{_kernel_ver}/misc/linux-one.ko* |
f29254e6 | 176 | %endif |