]> git.pld-linux.org Git - packages/VirtualBox.git/blob - VirtualBox.spec
- merged BRs from vbox.spec, added some versions based on ./configure
[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 amd64, but looking into autogenerated env.sh suggests that
15 #   code may be compiled exclusively for i686. Probably x86_64 must be put in EA for Th.
16 #
17 # Conditional build:
18 %bcond_without  dist_kernel     # without distribution kernel
19 %bcond_without  smp             # without SMP kernel modules
20 #
21 %define         _snap   20070116
22 Summary:        VirtualBox
23 Summary(pl):    VirtualBox
24 Name:           VirtualBox
25 Version:        1.3.3
26 Release:        0.1
27 License:        GPL v2
28 Group:          Applications/Emulators
29 Source0:        %{name}-%{version}_%{_snap}.tar.bz2
30 # Source0-md5:  8554cf552c3ad07b2ae5229c3f8825dc
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 >= 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:  zlib-devel >= 1.2.1
50 ExclusiveArch:  %{ix86} amd64
51 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
52
53 %ifarch amd64
54 %define         _outdir amd64
55 %else
56 %define         _outdir x86
57 %endif
58
59 %description
60 InnoTek VirtualBox is a general-purpose full virtualizer for x86
61 hardware. Targeted at server, desktop and embedded use, it is now the
62 only professional-quality virtualization solution that is also Open
63 Source Software.
64
65 Some of the features of VirtualBox are:
66
67 Modularity: VirtualBox has an extremely modular design with
68 well-defined internal programming interfaces and a client/server
69 design. This makes it easy to control it from several interfaces at
70 once: for example, you can start a virtual machine in a typical
71 virtual machine GUI and then control that machine from the command
72 line. VirtualBox also comes with a full Software Development Kit: even
73 though it is Open Source Software, you don't have to hack the source
74 to write a new interface for VirtualBox.
75
76 Virtual machine descriptions in XML: the configuration settings of
77 virtual machines are stored entirely in XML and are independent of the
78 local machines. Virtual machine definitions can therefore easily be
79 ported to other computers.
80
81 %description -l pl
82 InnoTek VirtualBox jest emulatorem sprzêtu x86. Kireowany do
83 zastosowañ serwerowych, desktopowych oraz embedded jest obecnie
84 jedynym wysokiej jako¶ci rozwi±zaniem wirtualizacyjnym dostêpnym
85 równie¿ jako Otwarte Oprogramowanie.
86
87 Przyk³adowe mo¿liwo¶ci VirtualBox:
88
89 Modularno¶æ: VirtualBox jest wysoce zmodularyzowanym produktem z
90 dobrze zaprojektowanym wewnêtrznym interfejsem programowym typu
91 klient/serwer. Dziêki temu mo¿na ³atwo kontrolowaæ go za pomoc±
92 ró¿nych interfejsów. Mo¿na na przyk³ad uruchomiæ maszynê wirtualn± z
93 poziomu interfejsu graficznego, a pó¼niej kontrolowaæ j± z linii
94 poleceñ. VirtualBox dostarcza równie¿ pe³ny pakiet deweloperski, co
95 pozwala stworzyæ dowolny inny interfejs zarz±dzania maszyn± wirtualn±.
96
97 Opisy maszyn wirtualnych w XML: konfiguracje poszczególnych maszyn
98 wirtualnych s± w ca³o¶ci przechowywane w XMLu i s± niezale¿ne od
99 lokalnej maszyny. Dziêki temu mo¿na szybko i ³atwo przenie¶æ
100 konfiguracjê maszyny wirtualnej na inny komputer.
101
102 %package -n kernel%{_alt_kernel}-misc-vboxdrv
103 Summary:        Kernel module for VirtualBox
104 Summary(pl):    Modu³ j±dra dla VirtualBox
105 Release:        %{_rel}@%{_kernel_ver_str}
106 Group:          Base/Kernel
107 Requires(post,postun):  /sbin/depmod
108 Requires:       dev >= 2.9.0-7
109 %if %{with dist_kernel}
110 %requires_releq_kernel_up
111 Requires(postun):       %releq_kernel_up
112 %endif
113 Provides:       kernel(vboxdrv) = %{version}-%{_rel}
114
115 %description -n kernel%{_alt_kernel}-misc-vboxdrv
116 Kernel module vboxdrv for VirtualBox.
117
118 %description -n kernel%{_alt_kernel}-misc-vboxdrv -l pl
119 Modu³ j±dra vboxdrv dla VirtualBox.
120
121 %package -n kernel%{_alt_kernel}-smp-misc-vboxdrv
122 Summary:        Kernel SMP module for VirtualBox
123 Summary(pl):    Modu³ j±dra SMP dla VirtualBox
124 Release:        %{_rel}@%{_kernel_ver_str}
125 Group:          Base/Kernel
126 Requires(post,postun):  /sbin/depmod
127 Requires:       dev >= 2.9.0-7
128 %if %{with dist_kernel}
129 %requires_releq_kernel_smp
130 Requires(postun):       %releq_kernel_smp
131 %endif
132 Provides:       kernel(vboxdrv) = %{version}-%{_rel}
133
134 %description -n kernel%{_alt_kernel}-smp-misc-vboxdrv
135 Kernel SMP module vboxdrv for VirtualBox.
136
137 %description -n kernel%{_alt_kernel}-smp-misc-vboxdrv -l pl
138 Modu³ j±dra SMP vboxdrv dla VirtualBox.
139
140 %prep
141 %setup -q -n vbox
142 %patch0 -p0
143 %patch1 -p0
144
145 %build
146 ./configure \
147         --with-gcc="%{__cc}" \
148         --with-g++="%{__cxx}"
149 . ./env.sh
150 kmk
151
152 cd out/linux.%{_outdir}/release/bin/src
153 for cfg in %{?with_dist_kernel:%{?with_smp:smp} up}%{!?with_dist_kernel:nondist}; do
154         if [ ! -r "%{_kernelsrcdir}/config-$cfg" ]; then
155                 exit 1
156         fi
157         rm -rf o
158         install -d o/include/linux
159         ln -sf %{_kernelsrcdir}/config-$cfg o/.config
160         ln -sf %{_kernelsrcdir}/Module.symvers-$cfg o/Module.symvers
161         ln -sf %{_kernelsrcdir}/include/linux/autoconf-$cfg.h o/include/linux/autoconf.h
162 %if %{with dist_kernel}
163         %{__make} -j1 -C %{_kernelsrcdir} O=$PWD/o prepare scripts
164 %else
165         touch o/include/config/MARKER
166         ln -sf %{_kernelsrcdir}/scripts o/scripts
167 %endif
168         ln -sf ../../include/VBox o/include/VBox
169         ln -sf ../../include/iprt o/include/iprt
170         %{__make} -C %{_kernelsrcdir} clean \
171                 SYSSRC=%{_kernelsrcdir} \
172                 SYSOUT=$PWD/o \
173                 M=$PWD O=$PWD/o \
174                 %{?with_verbose:V=1}
175         %{__make} -C %{_kernelsrcdir} modules \
176                 CC="%{__cc}" CPP="%{__cpp}" \
177                 SYSSRC=%{_kernelsrcdir} \
178                 SYSOUT=$PWD/o \
179                 M=$PWD O=$PWD/o \
180                 %{?with_verbose:V=1}
181         mv vboxdrv.ko vboxdrv-$cfg.ko
182 done
183
184 %install
185 rm -rf $RPM_BUILD_ROOT
186
187 install -d \
188         $RPM_BUILD_ROOT%{_bindir} \
189         $RPM_BUILD_ROOT%{_libdir}/VirtualBox
190
191 install out/linux.%{_outdir}/release/bin/{VBox{BFE,Manage,SDL,SVC,XPCOMIPCD},VirtualBox} \
192         $RPM_BUILD_ROOT%{_bindir}
193 install out/linux.%{_outdir}/release/bin/VBox{DD,DD2,REM,REMImp,RT,VMM,XML,XPCOM,XPCOMIPCC}.so \
194         $RPM_BUILD_ROOT%{_libdir}/VirtualBox
195 install out/linux.%{_outdir}/release/bin/{VBox{DD,DD2}{GC.gc,R0.r0},VMM{GC.gc,R0.r0}} \
196         $RPM_BUILD_ROOT%{_libdir}/VirtualBox
197
198 %if %{with kernel}
199 install -d $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}{,smp}/misc
200 %if %{with smp} && %{with dist_kernel}
201 install out/linux.%{_outdir}/release/bin/src/vboxdrv-smp.ko \
202         $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}smp/misc/vboxdrv.ko
203 %endif
204 %endif
205
206 %clean
207 rm -rf $RPM_BUILD_ROOT
208
209 %post   -n kernel%{_alt_kernel}-misc-vboxdrv
210 %depmod %{_kernel_ver}
211
212 %postun -n kernel%{_alt_kernel}-misc-vboxdrv
213 %depmod %{_kernel_ver}
214
215 %if %{with smp} && %{with dist_kernel}
216 %post   -n kernel%{_alt_kernel}-smp-misc-vboxdrv
217 %depmod %{_kernel_ver}smp
218
219 %postun -n kernel%{_alt_kernel}-smp-misc-vboxdrv
220 %depmod %{_kernel_ver}smp
221 %endif
222
223 %files
224 %defattr(644,root,root,755)
225 %attr(755,root,root) %{_bindir}/VBox*
226 %attr(755,root,root) %{_bindir}/VirtualBox
227 %dir %{_libdir}/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.40668 seconds and 4 git commands to generate.