VirtualBox

Changeset 58386 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Oct 23, 2015 10:52:35 AM (9 years ago)
Author:
vboxsync
Message:

Installer/linux (host): simplify putting files in place in the deb and RPM packages. Now /usr/lib/virtualbox mirrors the contents of VirtualBox.tar and the spec/rules files only take care of exceptions. This should simplify adding new files to all packages.

Location:
trunk/src/VBox/Installer/linux
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Installer/linux/debian/rules

    r58379 r58386  
    213213        install -d -g 0 -o 0 $(prefix)/usr/lib
    214214        install -d -g 0 -o 0 $(prefix)/usr/bin
    215         install -d -g 0 -o 0 $(prefix)/usr/lib/$(package)
    216215        install -d -g 0 -o 0 $(prefix)/usr/share/$(package)
    217216        install -d -g 0 -o 0 $(prefix)/usr/share/doc/$(verpkg)
     
    236235        done)
    237236        $(if $(NOQT),,rmdir $(archdir)/icons)
    238         install -d -g 0 -o 0 $(prefix)/usr/lib/$(package)/ExtensionPacks
    239237        $(if $(NOQT),,mv $(archdir)/virtualbox.xml debian/$(verpkg).sharedmimeinfo)
    240238        install -d -g 0 -o 0 $(prefix)/usr/share/lintian/overrides
     
    243241            debian/lintian-override.in > \
    244242           $(prefix)/usr/share/lintian/overrides/$(verpkg)
    245         mv $(archdir)/VBoxEFI32.fd $(prefix)/usr/lib/$(package)
    246         mv $(archdir)/VBoxEFI64.fd $(prefix)/usr/lib/$(package)
    247243        mv $(archdir)/VBox.png \
    248244           $(prefix)/usr/share/pixmaps/VBox.png
    249         mv $(archdir)/*.rc $(prefix)/usr/lib/$(package)
    250         mv $(archdir)/*.r0 $(prefix)/usr/lib/$(package)
    251         mv $(archdir)/*.rel $(prefix)/usr/lib/$(package) || true
    252         mv $(archdir)/VBoxNetDHCP $(prefix)/usr/lib/$(package)
    253         mv $(archdir)/VBoxNetAdpCtl $(prefix)/usr/lib/$(package)
    254         if [ -f $(archdir)/VBoxVolInfo ]; then \
    255             mv $(archdir)/VBoxVolInfo $(prefix)/usr/lib/$(package); \
    256         fi
    257         mv $(archdir)/VBoxXPCOMIPCD $(prefix)/usr/lib/$(package)
    258         mv $(archdir)/components $(prefix)/usr/lib/$(package)/components
    259         mv $(archdir)/*.so $(prefix)/usr/lib/$(package)
    260         mv $(archdir)/*.so.4 $(prefix)/usr/lib/$(package) || true
    261         $(if $(NOQT),,mv $(archdir)/VBoxTestOGL $(prefix)/usr/lib/$(package))
    262         $(if $(NOQT),,mv $(archdir)/nls $(prefix)/usr/share/$(package))
    263245        mv $(archdir)/src  $(prefix)/usr/share/$(package)
    264246        rm $(archdir)/VBox.sh
    265         export VBOX_INSTALL_PATH=/usr/lib/$(package) && \
    266             cd $(builddir)/bin/sdk/installer && \
    267             python ./vboxapisetup.py install --root $(prefix)
    268         rm -rf $(archdir)/sdk/installer
    269         mv $(archdir)/vboxshell.py $(prefix)/usr/lib/$(package)
    270         mv $(archdir)/sdk $(prefix)/usr/lib/$(package)
    271247        install -D -g 0 -o 0 -m 644 VBox.sh $(prefix)/usr/bin/VBox
    272248        mv $(archdir)/VBoxSysInfo.sh $(prefix)/usr/share/$(package)
    273         for i in VBoxManage VBoxSVC $(if $(HEADLESS),,VBoxSDL) \
    274             $(if $(NOQT),,VirtualBox) VBoxHeadless \
    275             VBoxExtPackHelperApp VBoxBalloonCtrl VBoxAutostart \
    276             $(if $(NOWEBSVC),,vboxwebsrv webtest) \
    277         $(if $(NOVBOXIMG),,vbox-img) VBoxNetNAT; do \
    278             mv $(archdir)/$$i $(prefix)/usr/lib/$(package); done
    279         $(if $(VNC),mv $(archdir)/ExtensionPacks/VNC $(prefix)/usr/lib/$(package)/ExtensionPacks,)
    280249        if [ -r $(archdir)/VBoxDTrace ]; then \
    281250            mv $(archdir)/VBoxDTrace $(prefix)/usr/bin; \
    282             mv $(archdir)/dtrace $(prefix)/usr/lib/$(package); \
    283251        fi
    284252        mv $(archdir)/VBoxTunctl $(prefix)/usr/bin
     
    296264            done)
    297265ifeq ($(ose),)
    298         $(if $(NOQT),,mv $(archdir)/kchmviewer $(prefix)/usr/lib/$(package))
    299266        dh_installdocs \
    300267            $(archdir)/UserManual*.pdf $(archdir)/VirtualBox*.chm \
     
    306273        $(if $(HEADLESS),,mv $(archdir)/rdesktop-vrdp $(prefix)/usr/bin)
    307274        $(if $(HEADLESS),,mv $(archdir)/rdesktop-vrdp-keymaps $(prefix)/usr/share/$(package))
    308         if [ -d $(archdir)/accessible ]; then mv $(archdir)/accessible $(prefix)/usr/lib/virtualbox; fi
    309275else
    310276        dh_installdocs \
     
    314280            mv $(archdir)/$$i $(prefix)/usr/share/$(package); done
    315281endif
    316         for i in vboxdrv.sh vboxballoonctrl-service.sh vboxautostart-service.sh \
    317             vboxweb-service.sh postinst-common.sh prerm-common.sh routines.sh \
    318             VBoxCreateUSBNode.sh; do \
    319             mv $(archdir)/$$i $(prefix)/usr/lib/$(package); \
    320         done
    321         rmdir $(archdir)/additions
    322         $(if $(VNC),rmdir $(archdir)/ExtensionPacks)
    323282        rm -r $(archdir)/helpers
    324283        rm -r $(archdir)/scripts
    325         rmdir $(archdir)
     284        mv $(archdir) $(prefix)/usr/lib/$(package)
     285        export VBOX_INSTALL_PATH=/usr/lib/$(package) && \
     286            cd $(builddir)/bin/sdk/installer && \
     287            python ./vboxapisetup.py install --root $(prefix)
     288        rm -rf $(prefix)/usr/lib/$(package)/sdk/installer
    326289        ln -s ../VBoxVMM.so $(prefix)/usr/lib/$(package)/components/VBoxVMM.so
    327290        rmdir $(prefix)/opt
  • trunk/src/VBox/Installer/linux/rpm/VirtualBox.tmpl.spec

    r58241 r58386  
    1717%define %SPEC% 1
    1818%define %OSE% 1
     19%define VBOXDOCDIR %{_defaultdocdir}/%NAME%-%VER%
    1920%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
    2021
     
    6970install -m 755 -d $RPM_BUILD_ROOT/usr/share/pixmaps
    7071install -m 755 -d $RPM_BUILD_ROOT/usr/share/icons/hicolor
    71 install -m 755 -d $RPM_BUILD_ROOT%{_defaultdocdir}/virtualbox
     72install -m 755 -d $RPM_BUILD_ROOT%{VBOXDOCDIR}
    7273install -m 755 -d $RPM_BUILD_ROOT/usr/lib/virtualbox
    73 install -m 755 -d $RPM_BUILD_ROOT/usr/lib/virtualbox/ExtensionPacks
    7474install -m 755 -d $RPM_BUILD_ROOT/usr/share/virtualbox
    7575install -m 755 -d $RPM_BUILD_ROOT/usr/share/mime/packages
    76 mv VBoxEFI32.fd $RPM_BUILD_ROOT/usr/lib/virtualbox || true
    77 mv VBoxEFI64.fd $RPM_BUILD_ROOT/usr/lib/virtualbox || true
    78 mv *.rc $RPM_BUILD_ROOT/usr/lib/virtualbox
    79 mv *.r0 $RPM_BUILD_ROOT/usr/lib/virtualbox
    80 mv *.rel $RPM_BUILD_ROOT/usr/lib/virtualbox || true
    81 mv VBoxNetDHCP $RPM_BUILD_ROOT/usr/lib/virtualbox
    82 mv VBoxNetNAT $RPM_BUILD_ROOT/usr/lib/virtualbox
    83 mv VBoxNetAdpCtl $RPM_BUILD_ROOT/usr/lib/virtualbox
    84 if [ -f VBoxVolInfo ]; then
    85   mv VBoxVolInfo $RPM_BUILD_ROOT/usr/lib/virtualbox
    86 fi
    87 mv VBoxXPCOMIPCD $RPM_BUILD_ROOT/usr/lib/virtualbox
    88 mv components $RPM_BUILD_ROOT/usr/lib/virtualbox/components
    89 mv *.so $RPM_BUILD_ROOT/usr/lib/virtualbox
    90 mv *.so.4 $RPM_BUILD_ROOT/usr/lib/virtualbox || true
    91 ln -s ../VBoxVMM.so $RPM_BUILD_ROOT/usr/lib/virtualbox/components/VBoxVMM.so
    92 mv VBoxTestOGL $RPM_BUILD_ROOT/usr/lib/virtualbox
    93 mv vboxshell.py $RPM_BUILD_ROOT/usr/lib/virtualbox
    9476(export VBOX_INSTALL_PATH=/usr/lib/virtualbox && \
    9577  cd ./sdk/installer && \
    9678  %{__python} ./vboxapisetup.py install --prefix %{_prefix} --root $RPM_BUILD_ROOT)
    9779rm -rf sdk/installer
    98 mv sdk $RPM_BUILD_ROOT/usr/lib/virtualbox
    9980mv nls $RPM_BUILD_ROOT/usr/share/virtualbox
    10081cp -a src $RPM_BUILD_ROOT/usr/share/virtualbox
    10182mv VBox.sh $RPM_BUILD_ROOT/usr/bin/VBox
    10283mv VBoxSysInfo.sh $RPM_BUILD_ROOT/usr/share/virtualbox
    103 mv VBoxCreateUSBNode.sh $RPM_BUILD_ROOT/usr/lib/virtualbox
    10484cp icons/128x128/virtualbox.png $RPM_BUILD_ROOT/usr/share/pixmaps/virtualbox.png
    10585cd icons
     
    11696rmdir icons
    11797mv virtualbox.xml $RPM_BUILD_ROOT/usr/share/mime/packages
    118 for i in VBoxManage VBoxSVC VirtualBox VBoxHeadless VBoxDTrace VBoxExtPackHelperApp VBoxBalloonCtrl VBoxAutostart vbox-img; do
    119   mv $i $RPM_BUILD_ROOT/usr/lib/virtualbox; done
    120 if %WEBSVC%; then
    121   for i in vboxwebsrv webtest; do
    122     mv $i $RPM_BUILD_ROOT/usr/lib/virtualbox; done
    123 fi
    124 test -f VBoxSDL && mv VBoxSDL $RPM_BUILD_ROOT/usr/lib/virtualbox
    125 for i in VirtualBox VBoxHeadless VBoxNetDHCP VBoxNetNAT VBoxNetAdpCtl; do
    126   chmod 4511 $RPM_BUILD_ROOT/usr/lib/virtualbox/$i; done
    127 if [ -f $RPM_BUILD_ROOT/usr/lib/virtualbox/VBoxVolInfo ]; then
    128   chmod 4511 $RPM_BUILD_ROOT/usr/lib/virtualbox/VBoxVolInfo
    129 fi
    130 test -f VBoxSDL && chmod 4511 $RPM_BUILD_ROOT/usr/lib/virtualbox/VBoxSDL
    131 if [ -d ExtensionPacks/VNC ]; then
    132   mv ExtensionPacks/VNC $RPM_BUILD_ROOT/usr/lib/virtualbox/ExtensionPacks
    133 fi
    13498mv VBoxTunctl $RPM_BUILD_ROOT/usr/bin
    13599%if %{?is_ose:0}%{!?is_ose:1}
     
    159123  fi
    160124done
     125rm -r src
    161126%endif
    162127%if %{?is_ose:0}%{!?is_ose:1}
    163   mv kchmviewer $RPM_BUILD_ROOT/usr/lib/virtualbox
    164128  for i in rdesktop-vrdp.tar.gz rdesktop-vrdp-keymaps; do
    165129    mv $i $RPM_BUILD_ROOT/usr/share/virtualbox; done
     
    168132for i in additions/VBoxGuestAdditions.iso; do
    169133  mv $i $RPM_BUILD_ROOT/usr/share/virtualbox; done
    170 if [ -d accessible ]; then
    171   mv accessible $RPM_BUILD_ROOT/usr/lib/virtualbox
    172 fi
    173 mv vboxdrv.sh $RPM_BUILD_ROOT/usr/lib/virtualbox
    174 mv vboxballoonctrl-service.sh $RPM_BUILD_ROOT/usr/lib/virtualbox
    175 mv vboxautostart-service.sh $RPM_BUILD_ROOT/usr/lib/virtualbox
    176 mv vboxweb-service.sh $RPM_BUILD_ROOT/usr/lib/virtualbox
    177 mv postinst-common.sh $RPM_BUILD_ROOT/usr/lib/virtualbox
    178 mv prerm-common.sh $RPM_BUILD_ROOT/usr/lib/virtualbox
    179 mv routines.sh $RPM_BUILD_ROOT/usr/lib/virtualbox
    180134ln -s VBox $RPM_BUILD_ROOT/usr/bin/VirtualBox
    181135ln -s VBox $RPM_BUILD_ROOT/usr/bin/virtualbox
     
    198152mv virtualbox.desktop $RPM_BUILD_ROOT/usr/share/applications/virtualbox.desktop
    199153mv VBox.png $RPM_BUILD_ROOT/usr/share/pixmaps/VBox.png
     154%{!?is_ose: mv LICENSE $RPM_BUILD_ROOT%{VBOXDOCDIR}}
     155mv UserManual*.pdf $RPM_BUILD_ROOT%{VBOXDOCDIR}
     156%{!?is_ose: mv VirtualBox*.chm $RPM_BUILD_ROOT%{VBOXDOCDIR}}
     157mv * $RPM_BUILD_ROOT/usr/lib/virtualbox
     158ln -s ../VBoxVMM.so $RPM_BUILD_ROOT/usr/lib/virtualbox/components/VBoxVMM.so
     159for i in VirtualBox VBoxHeadless VBoxNetDHCP VBoxNetNAT VBoxNetAdpCtl; do
     160  chmod 4511 $RPM_BUILD_ROOT/usr/lib/virtualbox/$i; done
     161if [ -f $RPM_BUILD_ROOT/usr/lib/virtualbox/VBoxVolInfo ]; then
     162  chmod 4511 $RPM_BUILD_ROOT/usr/lib/virtualbox/VBoxVolInfo
     163fi
     164test -f $RPM_BUILD_ROOT/usr/lib/virtualbox/VBoxSDL && \
     165  chmod 4511 $RPM_BUILD_ROOT/usr/lib/virtualbox/VBoxSDL
    200166
    201167
     
    318284%files
    319285%defattr(-,root,root)
    320 %doc %{!?is_ose: LICENSE}
    321 %doc UserManual*.pdf
    322 %doc %{!?is_ose: VirtualBox*.chm}
     286%doc %{VBOXDOCDIR}/*
    323287%{?rpm_suse: %{py_sitedir}/*}
    324288%{!?rpm_suse: %{python_sitelib}/*}
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette