]> git.pld-linux.org Git - packages/linux-one.git/blob - linux-one.spec
fe73a5e4bc4a9c88e5de561302b975a836280089
[packages/linux-one.git] / linux-one.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     3
13 %define         pname   linux-one
14 Summary:        One IPC Linux kernel module
15 Summary(pl.UTF-8):      Moduł IPC One dla jądra Linuksa
16 Name:           %{pname}%{_alt_kernel}
17 Version:        1.6.0
18 Release:        %{rel}
19 License:        GPL v2+
20 Group:          Base/Kernel
21 # when packaged in DirectFB tarball
22 #Source0:       http://www.directfb.org/downloads/Core/DirectFB/DirectFB-%{version}.tar.gz
23 # but currently:
24 # $ git clone git://git.directfb.org/git/directfb/core/DirectFB.git DirectFB.git
25 # $ tar cf linux-one.tar -C DirectFB.git/lib/One linux-one
26 Source0:        %{pname}.tar.xz
27 # Source0-md5:  d794442fccb99b82c9c3d0b2d5609aaa
28 Source1:        OneTypes.h
29 URL:            http://www.directfb.org/
30 %if %{with kernel}
31 %{?with_dist_kernel:BuildRequires:      kernel-module-build >= 3:2.6.20.2}
32 BuildRequires:  rpmbuild(macros) >= 1.379
33 %endif
34 BuildRequires:  sed >= 4.0
35 BuildRequires:  tar >= 1:1.22
36 BuildRequires:  xz
37 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
38
39 %description
40 One IPC Linux kernel module.
41
42 Linux One is the new IPC API used by Coma.
43
44 %description -l pl.UTF-8
45 Moduł IPC One dla jądra Linuksa.
46
47 Linux One to nowe API IPC wykorzystywane przez Comę.
48
49 %package 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 devel
56 Header file for One IPC device.
57
58 Linux One is the new IPC API used by Coma.
59
60 %description 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-misc-one
66 Summary:        One IPC module for Linux kernel
67 Summary(pl.UTF-8):      Moduł IPC One 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 Obsoletes:      kernel-one
76
77 %description -n kernel-misc-one
78 One IPC module for Linux kernel.
79
80 Linux One is the new IPC API used by Coma.
81
82 %description -n kernel-misc-one -l pl.UTF-8
83 Moduł IPC One dla jądra Linuksa.
84
85 Linux One to nowe API IPC wykorzystywane przez Comę.
86
87 %prep
88 %setup -q -n %{pname}
89
90 sed -i -e 's/^obj-[^ ]*/obj-m/' src/Makefile-2.6
91 echo "EXTRA_CFLAGS = -I`pwd`/include -I`pwd`/src/single" >> src/Makefile-2.6
92
93 cp %{SOURCE1} include
94
95 %build
96 %if %{with kernel}
97 cd src
98 ln -sf Makefile-2.6 Makefile
99 # NOTE: build_kernel_modules (as of rpm macros 1.649) doesn't allow line breaking
100 %build_kernel_modules -m linux-one ONECORE=single
101 %endif
102
103 %install
104 rm -rf $RPM_BUILD_ROOT
105
106 %if %{with userspace}
107 install -d $RPM_BUILD_ROOT%{_includedir}/linux
108 install include/linux/one.h $RPM_BUILD_ROOT%{_includedir}/linux
109 %endif
110
111 %if %{with kernel}
112 cd src
113 %install_kernel_modules -m linux-one -d misc
114 %endif
115
116 %clean
117 rm -rf $RPM_BUILD_ROOT
118
119 %post   -n kernel-misc-one
120 %depmod %{_kernel_ver}
121
122 %postun -n kernel-misc-one
123 %depmod %{_kernel_ver}
124
125 %if %{with userspace}
126 %files devel
127 %defattr(644,root,root,755)
128 %doc README TODO
129 %{_includedir}/linux/one.h
130 %endif
131
132 %if %{with kernel}
133 %files -n kernel-misc-one
134 %defattr(644,root,root,755)
135 /lib/modules/%{_kernel_ver}/misc/linux-one.ko*
136 %endif
This page took 0.054987 seconds and 2 git commands to generate.