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