PKGBUILD 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. # This is an example PKGBUILD file. Use this as a start to creating your own,
  2. # and remove these comments. For more information, see 'man PKGBUILD'.
  3. # NOTE: Please fill out the license field for your package! If it is unknown,
  4. # then please put 'unknown'.
  5. # Maintainer: Olivier Medoc <o_medoc@yahoo.fr>
  6. pkgname=qubes-vm-core
  7. pkgver=`cat version`
  8. pkgrel=3
  9. epoch=
  10. pkgdesc="The Qubes core files for installation inside a Qubes VM."
  11. arch=("x86_64")
  12. url="http://qubes-os.org/"
  13. license=('GPL')
  14. groups=()
  15. depends=(qubes-libvchan qubes-vm-utils)
  16. makedepends=(qubes-vm-utils)
  17. checkdepends=()
  18. optdepends=()
  19. provides=()
  20. conflicts=()
  21. replaces=()
  22. backup=()
  23. options=()
  24. install=PKGBUILD.install
  25. changelog=
  26. source=()
  27. noextract=()
  28. md5sums=() #generate with 'makepkg -g'
  29. build() {
  30. for source in qubes-rpc qrexec misc Makefile.core vm-init.d vm-systemd network ; do
  31. (ln -s $srcdir/../$source $srcdir/$source)
  32. done
  33. # Fix for building with python2
  34. export PYTHON=python2
  35. sed 's:python:python2:g' -i misc/Makefile
  36. # Fix for network tools paths
  37. sed 's:/sbin/ifconfig:ifconfig:g' -i network/*
  38. sed 's:/sbin/route:route:g' -i network/*
  39. sed 's:/sbin/ethtool:ethtool:g' -i network/*
  40. sed 's:/sbin/ip:ip:g' -i network/*
  41. sed 's:/bin/grep:grep:g' -i network/*
  42. for dir in qubes-rpc qrexec misc; do
  43. (cd $dir; make)
  44. done
  45. }
  46. package() {
  47. (cd qrexec; make install DESTDIR=$pkgdir)
  48. make -f ./Makefile.core install-vm DESTDIR=$pkgdir DIST=archlinux
  49. # Convert module loading to ARCHLINUX
  50. mkdir -p $pkgdir/etc/modules-load.d/
  51. #misc/qubes-core.modules
  52. echo xen-evtchn > $pkgdir/etc/modules-load.d/qubes_core.conf
  53. echo xen-blkback >> $pkgdir/etc/modules-load.d/qubes_core.conf
  54. # Note : need to compile pvusb drivers for this last one?
  55. echo xen-usbfront >> $pkgdir/etc/modules-load.d/qubes_core.conf
  56. #misc/qubes-misc.modules
  57. #install -D misc/qubes_misc.modules $pkgdir/etc/sysconfig/modules/qubes_misc.modules
  58. echo dummy-hcd > $pkgdir/etc/modules-load.d/qubes_misc.conf
  59. # Note: appears in the gui package but required for qrexec agent to work
  60. echo u2mfn > $pkgdir/etc/modules-load.d/qubes_u2mfn.conf
  61. # Remove things non wanted in archlinux
  62. rm -r $pkgdir/etc/yum*
  63. rm -r $pkgdir/etc/init.d
  64. # Remove fedora specific scripts
  65. rm $pkgdir/etc/fstab
  66. }
  67. # vim:set ts=2 sw=2 et: