]> git.pld-linux.org Git - packages/VirtualBox.git/blob - VirtualBox.spec
- just new fresh source
[packages/VirtualBox.git] / VirtualBox.spec
1 #
2 # TODO:
3 # - Doesn't compile without /usr/src/linux/include/linux/autoconf.h so one must
4 #   symlink it before building package. This is because during compilation kernel
5 #   module is being build. Since we are building kernel modules later
6 #   sources/makefiles probably needs some hacking to drop this requirement.
7 # - Home page says that some addons should be compiled, I don't see any except.
8 #   vboxaddon kernel module and {vboxmouse,vboxvideo)_drv.so. Are they required?
9 # - BR list was a quickie so it may be incomplete or too big.
10 # - R list probably required.
11 # - .desktop file, some wrapper to launch VirtualBox (LD_LIBRARY_PATH must include
12 #   %{_libdir}/VirtualBox), maybe some init script to launch VBoxSVC.
13 # - Devel stuff is not packaged yet.
14 # - Now its EA ix86 x8664, but looking into autogenerated env.sh suggests that
15 #   code may be compiled exclusively for i686.
16 # - use %kernel_build macros
17 #
18 # Conditional build:
19 %bcond_without  dist_kernel     # without distribution kernel
20 %bcond_without  smp             # without SMP kernel modules
21 #
22 Summary:        VirtualBox
23 Summary(pl.UTF-8):      VirtualBox
24 Name:           VirtualBox
25 Version:        1.3.4
26 Release:        0.1
27 License:        GPL v2
28 Group:          Applications/Emulators
29 Source0:        http://www.virtualbox.org/download/%{version}/VirtualBox-OSE-%{version}.tar.bz2
30 # Source0-md5:  67853add4afc2eace5d8f45cfe9a32c5
31 Patch0:         %{name}-configure.patch
32 Patch1:         %{name}-qt-paths.patch
33 URL:            http://www.virtualbox.org/
34 BuildRequires:  SDL-devel
35 BuildRequires:  bash
36 BuildRequires:  bcc
37 BuildRequires:  bin86
38 BuildRequires:  gcc >= 5:3.2.3
39 BuildRequires:  iasl
40 %{?with_dist_kernel:BuildRequires:      kernel%{_alt_kernel}-module-build >= 3:2.6.7}
41 BuildRequires:  libIDL-devel
42 BuildRequires:  libuuid-devel
43 BuildRequires:  libxslt-progs
44 BuildRequires:  qt-devel >= 6:3.3.6
45 BuildRequires:  rpmbuild(macros) >= 1.329
46 BuildRequires:  xalan-c-devel >= 1.10.0
47 #BuildRequires: xcursor-devel
48 BuildRequires:  xerces-c-devel >= 2.6.0
49 BuildRequires:  xorg-lib-libXcursor-devel
50 BuildRequires:  zlib-devel >= 1.2.1
51 ExclusiveArch:  %{ix86} %{x8664}
52 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
53
54 %ifarch %{x8664}
55 %define         _outdir amd64
56 %else
57 %define         _outdir x86
58 %endif
59
60 %description
61 InnoTek VirtualBox is a general-purpose full virtualizer for x86
62 hardware. Targeted at server, desktop and embedded use, it is now the
63 only professional-quality virtualization solution that is also Open
64 Source Software.
65
66 Some of the features of VirtualBox are:
67
68 Modularity: VirtualBox has an extremely modular design with
69 well-defined internal programming interfaces and a client/server
70 design. This makes it easy to control it from several interfaces at
71 once: for example, you can start a virtual machine in a typical
72 virtual machine GUI and then control that machine from the command
73 line. VirtualBox also comes with a full Software Development Kit: even
74 though it is Open Source Software, you don't have to hack the source
75 to write a new interface for VirtualBox.
76
77 Virtual machine descriptions in XML: the configuration settings of
78 virtual machines are stored entirely in XML and are independent of the
79 local machines. Virtual machine definitions can therefore easily be
80 ported to other computers.
81
82 %description -l pl.UTF-8
83 InnoTek VirtualBox jest emulatorem sprzętu x86. Kierowany do
84 zastosowań serwerowych, desktopowych oraz wbudowanych jest obecnie
85 jedynym wysokiej jakości rozwiązaniem wirtualizacyjnym dostępnym
86 również jako Otwarte Oprogramowanie.
87
88 Przykładowe cechy VirtualBoksa:
89
90 Modularność: VirtualBox jest wysoce zmodularyzowanym produktem z
91 dobrze zaprojektowanym wewnętrznym interfejsem programowym typu
92 klient/serwer. Dzięki temu można łatwo kontrolować go za pomocą
93 różnych interfejsów. Można na przykład uruchomić maszynę wirtualną z
94 poziomu interfejsu graficznego, a później kontrolować ją z linii
95 poleceń. VirtualBox dostarcza również pełny pakiet deweloperski, co
96 pozwala stworzyć dowolny inny interfejs zarządzania maszyną wirtualną.
97
98 Opisy maszyn wirtualnych w XML-u: konfiguracje poszczególnych maszyn
99 wirtualnych są w całości przechowywane w XML-u i są niezależne od
100 lokalnej maszyny. Dzięki temu można szybko i łatwo przenieść
101 konfigurację maszyny wirtualnej na inny komputer.
102
103 %package -n kernel%{_alt_kernel}-misc-vboxdrv
104 Summary:        Linux kernel module for VirtualBox
105 Summary(pl.UTF-8):      Moduł jądra Linuksa dla VirtualBoksa
106 Release:        %{_rel}@%{_kernel_ver_str}
107 Group:          Base/Kernel
108 Requires(post,postun):  /sbin/depmod
109 Requires:       dev >= 2.9.0-7
110 %if %{with dist_kernel}
111 %requires_releq_kernel_up
112 Requires(postun):       %releq_kernel_up
113 %endif
114 Provides:       kernel(vboxdrv) = %{version}-%{_rel}
115
116 %description -n kernel%{_alt_kernel}-misc-vboxdrv
117 Linux kernel module vboxdrv for VirtualBox.
118
119 %description -n kernel%{_alt_kernel}-misc-vboxdrv -l pl.UTF-8
120 Moduł jądra Linuksa vboxdrv dla VirtualBoksa.
121
122 %package -n kernel%{_alt_kernel}-smp-misc-vboxdrv
123 Summary:        Linux SMP kernel module for VirtualBox
124 Summary(pl.UTF-8):      Moduł jądra Linuksa SMP dla VirtualBoksa
125 Release:        %{_rel}@%{_kernel_ver_str}
126 Group:          Base/Kernel
127 Requires(post,postun):  /sbin/depmod
128 Requires:       dev >= 2.9.0-7
129 %if %{with dist_kernel}
130 %requires_releq_kernel_smp
131 Requires(postun):       %releq_kernel_smp
132 %endif
133 Provides:       kernel(vboxdrv) = %{version}-%{_rel}
134
135 %description -n kernel%{_alt_kernel}-smp-misc-vboxdrv
136 Linux SMP kernel module vboxdrv for VirtualBox.
137
138 %description -n kernel%{_alt_kernel}-smp-misc-vboxdrv -l pl.UTF-8
139 Moduł jądra Linuksa SMP vboxdrv dla VirtualBoksa.
140
141 %prep
142 %setup -q -n vbox
143 %patch0 -p0
144 %patch1 -p0
145
146 %build
147 ./configure \
148         --with-gcc="%{__cc}" \
149         --with-g++="%{__cxx}"
150 . ./env.sh
151 kmk
152
153 cd out/linux.%{_outdir}/release/bin/src
154 for cfg in %{?with_dist_kernel:%{?with_smp:smp} up}%{!?with_dist_kernel:nondist}; do
155         if [ ! -r "%{_kernelsrcdir}/config-$cfg" ]; then
156                 exit 1
157         fi
158         rm -rf o
159         install -d o/include/linux
160         ln -sf %{_kernelsrcdir}/config-$cfg o/.config
161         ln -sf %{_kernelsrcdir}/Module.symvers-$cfg o/Module.symvers
162         ln -sf %{_kernelsrcdir}/include/linux/autoconf-$cfg.h o/include/linux/autoconf.h
163 %if %{with dist_kernel}
164         %{__make} -j1 -C %{_kernelsrcdir} O=$PWD/o prepare scripts
165 %else
166         touch o/include/config/MARKER
167         ln -sf %{_kernelsrcdir}/scripts o/scripts
168 %endif
169         ln -sf ../../include/VBox o/include/VBox
170         ln -sf ../../include/iprt o/include/iprt
171         %{__make} -C %{_kernelsrcdir} clean \
172                 SYSSRC=%{_kernelsrcdir} \
173                 SYSOUT=$PWD/o \
174                 M=$PWD O=$PWD/o \
175                 %{?with_verbose:V=1}
176         %{__make} -C %{_kernelsrcdir} modules \
177                 CC="%{__cc}" CPP="%{__cpp}" \
178                 SYSSRC=%{_kernelsrcdir} \
179                 SYSOUT=$PWD/o \
180                 M=$PWD O=$PWD/o \
181                 %{?with_verbose:V=1}
182         mv vboxdrv.ko vboxdrv-$cfg.ko
183 done
184
185 %install
186 rm -rf $RPM_BUILD_ROOT
187
188 install -d \
189         $RPM_BUILD_ROOT%{_bindir} \
190         $RPM_BUILD_ROOT%{_libdir}/VirtualBox
191
192 install out/linux.%{_outdir}/release/bin/{VBox{BFE,Manage,SDL,SVC,XPCOMIPCD},VirtualBox} \
193         $RPM_BUILD_ROOT%{_bindir}
194 install out/linux.%{_outdir}/release/bin/VBox{DD,DD2,REM,REMImp,RT,VMM,XML,XPCOM,XPCOMIPCC}.so \
195         $RPM_BUILD_ROOT%{_libdir}/VirtualBox
196 install out/linux.%{_outdir}/release/bin/{VBox{DD,DD2}{GC.gc,R0.r0},VMM{GC.gc,R0.r0}} \
197         $RPM_BUILD_ROOT%{_libdir}/VirtualBox
198
199 %if %{with kernel}
200 install -d $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}{,smp}/misc
201 %if %{with smp} && %{with dist_kernel}
202 install out/linux.%{_outdir}/release/bin/src/vboxdrv-smp.ko \
203         $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}smp/misc/vboxdrv.ko
204 %endif
205 %endif
206
207 %clean
208 rm -rf $RPM_BUILD_ROOT
209
210 %post   -n kernel%{_alt_kernel}-misc-vboxdrv
211 %depmod %{_kernel_ver}
212
213 %postun -n kernel%{_alt_kernel}-misc-vboxdrv
214 %depmod %{_kernel_ver}
215
216 %if %{with smp} && %{with dist_kernel}
217 %post   -n kernel%{_alt_kernel}-smp-misc-vboxdrv
218 %depmod %{_kernel_ver}smp
219
220 %postun -n kernel%{_alt_kernel}-smp-misc-vboxdrv
221 %depmod %{_kernel_ver}smp
222 %endif
223
224 %files
225 %defattr(644,root,root,755)
226 %attr(755,root,root) %{_bindir}/VBox*
227 %attr(755,root,root) %{_bindir}/VirtualBox
228 %{_libdir}/VirtualBox
229
230 %files  -n kernel%{_alt_kernel}-misc-vboxdrv
231 %defattr(644,root,root,755)
232
233 %if %{with smp} && %{with dist_kernel}
234 %files  -n kernel%{_alt_kernel}-smp-misc-vboxdrv
235 %defattr(644,root,root,755)
236 %endif
This page took 0.183652 seconds and 4 git commands to generate.