Mageia Bugzilla – Attachment 1487 Details for
Bug 4396
stop removing sdk & add virtualbox-devel and python-virtualbox subpackage
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
New Account
|
Forgot Password
[patch]
patch that enables sdk build
virtualbox-4.1.8-ship-sdk.patch (text/plain), 3.31 KB, created by
Kamil Rytarowski
on 2012-02-03 12:55:02 CET
(
hide
)
Description:
patch that enables sdk build
Filename:
MIME Type:
Creator:
Kamil Rytarowski
Created:
2012-02-03 12:55:02 CET
Size:
3.31 KB
patch
obsolete
>Index: SPECS/virtualbox.spec >=================================================================== >--- SPECS/virtualbox.spec (wersja 204179) >+++ SPECS/virtualbox.spec (kopia robocza) >@@ -11,9 +11,11 @@ > > %define vboxlibdir %{_libdir}/%{name} > %define vboxdatadir %{_datadir}/%{name} >+%define vboxpydir %{python_sitedir}/%{name} > > %define build_additions 1 > %define build_doc 1 >+%define build_sdk 1 > > %ifarch %{ix86} > %define vbox_platform linux.x86 >@@ -175,6 +177,26 @@ > This package contains the user manual PDF file for %{name}. > %endif > >+%if %{build_sdk} >+%package devel >+Summary: %{name} SDK >+Group: Development/Libraries >+Requires: %{name} = %{version}-%{release} >+Requires: python-%{name} = %{version}-%{release} >+ >+%description devel >+This package contains the SDK for %{name}. >+ >+ >+%package -n python-%{name} >+Summary: %{name} SDK >+Group: Development/Libraries >+Requires: %{name} = %{version}-%{release} >+ >+%description -n python-%{name} >+Python XPCOM bindings to %{name}. >+%endif >+ > %prep > %setup -q -n %{distname} > %apply_patches >@@ -216,8 +238,6 @@ > kmk %_smp_mflags all > > %install >-rm -rf %{buildroot} >- > # install vbox components > mkdir -p %{buildroot}%{vboxlibdir} %{buildroot}%{vboxdatadir} > >@@ -364,9 +384,8 @@ > popd > > # install menu entries >- > mkdir -p %{buildroot}%{_datadir}/applications >-cat > %{buildroot}%{_datadir}/applications/mageia-%{name}.desktop << EOF >+cat > %{buildroot}%{_datadir}/applications/%{_real_vendor}-%{name}.desktop << EOF > [Desktop Entry] > Name=VirtualBox > Comment=Run several virtual systems on a single host computer >@@ -379,7 +398,7 @@ > Icon=%{name} > Type=Application > Terminal=false >-Categories=X-MandrivaLinux-MoreApplications-Emulators;Emulator; >+Categories=Emulator; > MimeType=application/x-virtualbox-vbox;application/x-virtualbox-vbox-extpack;application/x-virtualbox-ovf;application/x-virtualbox-ova; > EOF > >@@ -390,8 +409,21 @@ > # add missing makefile for kernel module > install -m644 src/VBox/HostDrivers/Support/linux/Makefile %{buildroot}%{_usr}/src/%{name}-%{version}-%{release}/ > >+%if %{build_sdk} >+mkdir -p %{buildroot}%{vboxpydir} >+ >+pushd obj/bin/sdk/installer >+VBOX_INSTALL_PATH=%{vboxlibdir} \ >+ python vboxapisetup.py install --prefix %{_prefix} --root %{buildroot} >+popd >+cp -rp obj/bin/sdk/. %{buildroot}%{vboxlibdir}/sdk >+rm -rf %{buildroot}%{vboxlibdir}/sdk/installer >+%else >+rm -rf %{buildroot}%{vboxlibdir}/sdk >+%endif >+ > # remove unpackaged files >-rm -rf %{buildroot}%{vboxlibdir}/{src,sdk,testcase} >+rm -rf %{buildroot}%{vboxlibdir}/{src,testcase} > rm -f %{buildroot}%{vboxlibdir}/tst* > rm -f %{buildroot}%{vboxlibdir}/vboxkeyboard.tar.gz > rm -f %{buildroot}%{vboxlibdir}/SUP* >@@ -405,9 +437,6 @@ > install -D -m644 out/%{vbox_platform}/release/bin/UserManual.pdf %{buildroot}/%{_defaultdocdir}/%{name}/UserManual.pdf > %endif > >-%clean >-rm -rf %{buildroot} >- > %post > %_post_service %{name} > >@@ -508,7 +537,7 @@ > %dir /var/run/%{oname} > # desktop integration > %{_datadir}/icons/hicolor/*/*/*.png >-%{_datadir}/applications/mageia-%{name}.desktop >+%{_datadir}/applications/%{_real_vendor}-%{name}.desktop > %{_datadir}/mime/packages/virtualbox.xml > > %files -n dkms-%{name} >@@ -539,3 +568,12 @@ > %files doc > %doc %{_defaultdocdir}/%{name}/UserManual.pdf > %endif >+ >+%if %{build_sdk} >+%files devel >+%{vboxlibdir}/sdk >+ >+%files -n python-%{name} >+%{vboxpydir} >+%{vboxpydir}/vboxapi* >+%endif
Index: SPECS/virtualbox.spec =================================================================== --- SPECS/virtualbox.spec (wersja 204179) +++ SPECS/virtualbox.spec (kopia robocza) @@ -11,9 +11,11 @@ %define vboxlibdir %{_libdir}/%{name} %define vboxdatadir %{_datadir}/%{name} +%define vboxpydir %{python_sitedir}/%{name} %define build_additions 1 %define build_doc 1 +%define build_sdk 1 %ifarch %{ix86} %define vbox_platform linux.x86 @@ -175,6 +177,26 @@ This package contains the user manual PDF file for %{name}. %endif +%if %{build_sdk} +%package devel +Summary: %{name} SDK +Group: Development/Libraries +Requires: %{name} = %{version}-%{release} +Requires: python-%{name} = %{version}-%{release} + +%description devel +This package contains the SDK for %{name}. + + +%package -n python-%{name} +Summary: %{name} SDK +Group: Development/Libraries +Requires: %{name} = %{version}-%{release} + +%description -n python-%{name} +Python XPCOM bindings to %{name}. +%endif + %prep %setup -q -n %{distname} %apply_patches @@ -216,8 +238,6 @@ kmk %_smp_mflags all %install -rm -rf %{buildroot} - # install vbox components mkdir -p %{buildroot}%{vboxlibdir} %{buildroot}%{vboxdatadir} @@ -364,9 +384,8 @@ popd # install menu entries - mkdir -p %{buildroot}%{_datadir}/applications -cat > %{buildroot}%{_datadir}/applications/mageia-%{name}.desktop << EOF +cat > %{buildroot}%{_datadir}/applications/%{_real_vendor}-%{name}.desktop << EOF [Desktop Entry] Name=VirtualBox Comment=Run several virtual systems on a single host computer @@ -379,7 +398,7 @@ Icon=%{name} Type=Application Terminal=false -Categories=X-MandrivaLinux-MoreApplications-Emulators;Emulator; +Categories=Emulator; MimeType=application/x-virtualbox-vbox;application/x-virtualbox-vbox-extpack;application/x-virtualbox-ovf;application/x-virtualbox-ova; EOF @@ -390,8 +409,21 @@ # add missing makefile for kernel module install -m644 src/VBox/HostDrivers/Support/linux/Makefile %{buildroot}%{_usr}/src/%{name}-%{version}-%{release}/ +%if %{build_sdk} +mkdir -p %{buildroot}%{vboxpydir} + +pushd obj/bin/sdk/installer +VBOX_INSTALL_PATH=%{vboxlibdir} \ + python vboxapisetup.py install --prefix %{_prefix} --root %{buildroot} +popd +cp -rp obj/bin/sdk/. %{buildroot}%{vboxlibdir}/sdk +rm -rf %{buildroot}%{vboxlibdir}/sdk/installer +%else +rm -rf %{buildroot}%{vboxlibdir}/sdk +%endif + # remove unpackaged files -rm -rf %{buildroot}%{vboxlibdir}/{src,sdk,testcase} +rm -rf %{buildroot}%{vboxlibdir}/{src,testcase} rm -f %{buildroot}%{vboxlibdir}/tst* rm -f %{buildroot}%{vboxlibdir}/vboxkeyboard.tar.gz rm -f %{buildroot}%{vboxlibdir}/SUP* @@ -405,9 +437,6 @@ install -D -m644 out/%{vbox_platform}/release/bin/UserManual.pdf %{buildroot}/%{_defaultdocdir}/%{name}/UserManual.pdf %endif -%clean -rm -rf %{buildroot} - %post %_post_service %{name} @@ -508,7 +537,7 @@ %dir /var/run/%{oname} # desktop integration %{_datadir}/icons/hicolor/*/*/*.png -%{_datadir}/applications/mageia-%{name}.desktop +%{_datadir}/applications/%{_real_vendor}-%{name}.desktop %{_datadir}/mime/packages/virtualbox.xml %files -n dkms-%{name} @@ -539,3 +568,12 @@ %files doc %doc %{_defaultdocdir}/%{name}/UserManual.pdf %endif + +%if %{build_sdk} +%files devel +%{vboxlibdir}/sdk + +%files -n python-%{name} +%{vboxpydir} +%{vboxpydir}/vboxapi* +%endif
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 4396
:
1487
|
1488