PKGBUILD 3.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  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=6
  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-vm-utils>=3.1.3" python2 python3 python2-xdg ethtool ntp net-tools gnome-packagekit imagemagick fakeroot notification-daemon dconf pygtk zenity qubes-libvchan qubes-db-vm haveged python2-gobject python2-dbus xdg-utils notification-daemon)
  16. makedepends=(gcc make pkg-config "qubes-vm-utils>=3.1.3" qubes-libvchan qubes-db-vm qubes-vm-xen libx11 python2 python3)
  17. checkdepends=()
  18. optdepends=(gnome-keyring gnome-settings-daemon networkmanager iptables tinyproxy python2-nautilus gpk-update-viewer)
  19. provides=()
  20. conflicts=()
  21. replaces=()
  22. backup=()
  23. options=()
  24. install=PKGBUILD.install
  25. changelog=
  26. source=(PKGBUILD.qubes-ensure-lib-modules.service)
  27. noextract=()
  28. md5sums=('88f4b3d5b156888a9d38f5bc28702ab8') #generate with 'makepkg -g'
  29. build() {
  30. for source in autostart-dropins qubes-rpc qrexec misc Makefile vm-init.d vm-systemd network ; do
  31. (ln -s $srcdir/../$source $srcdir/$source)
  32. done
  33. # Fix for network tools paths
  34. sed 's:/sbin/ifconfig:ifconfig:g' -i network/*
  35. sed 's:/sbin/route:route:g' -i network/*
  36. sed 's:/sbin/ethtool:ethtool:g' -i network/*
  37. sed 's:/sbin/ip:ip:g' -i network/*
  38. sed 's:/bin/grep:grep:g' -i network/*
  39. # Force running all scripts with python2
  40. sed 's:#!/usr/bin/python:#!/usr/bin/python2:' -i misc/*
  41. sed 's:#!/usr/bin/env python:#!/usr/bin/env python2:' -i misc/*
  42. sed 's:#!/usr/bin/python:#!/usr/bin/python2:' -i qubes-rpc/*
  43. sed 's:#!/usr/bin/env python:#!/usr/bin/env python2:' -i qubes-rpc/*
  44. # Fix for archlinux sbindir
  45. sed 's:/usr/sbin/ntpdate:/usr/bin/ntpdate:g' -i qubes-rpc/sync-ntp-clock
  46. sed 's:/usr/sbin/qubes-netwatcher:/usr/bin/qubes-netwatcher:g' -i vm-systemd/qubes-netwatcher.service
  47. sed 's:/usr/sbin/qubes-firewall:/usr/bin/qubes-firewall:g' -i vm-systemd/qubes-firewall.service
  48. for dir in qubes-rpc qrexec misc; do
  49. (cd $dir; make)
  50. done
  51. }
  52. package() {
  53. # Note: Archlinux removed use of directory such as /sbin /bin /usr/sbin (https://mailman.archlinux.org/pipermail/arch-dev-public/2012-March/022625.html)
  54. (cd qrexec; make install DESTDIR=$pkgdir SBINDIR=/usr/bin LIBDIR=/usr/lib SYSLIBDIR=/usr/lib)
  55. make install-vm DESTDIR=$pkgdir SBINDIR=/usr/bin LIBDIR=/usr/lib SYSLIBDIR=/usr/lib DROPIN_DIR=usr/lib/systemd DIST=archlinux
  56. # Remove things non wanted in archlinux
  57. rm -r $pkgdir/etc/yum*
  58. rm -r $pkgdir/etc/init.d
  59. # Remove fedora specific scripts
  60. rm $pkgdir/etc/fstab
  61. # Install systemd script allowing to automount /lib/modules
  62. install -m 644 $srcdir/PKGBUILD.qubes-ensure-lib-modules.service ${pkgdir}/usr/lib/systemd/system/qubes-ensure-lib-modules.service
  63. # Archlinux specific: enable autologin on tty1
  64. mkdir -p $pkgdir/etc/systemd/system/getty@tty1.service.d/
  65. cat <<EOF > $pkgdir/etc/systemd/system/getty@tty1.service.d/autologin.conf
  66. [Service]
  67. ExecStart=
  68. ExecStart=-/usr/bin/agetty --autologin user --noclear %I 38400 linux
  69. EOF
  70. # Archlinux packaging guidelines: /var/run is a symlink to a tmpfs. Don't create it
  71. rm -r $pkgdir/var/run
  72. }
  73. # vim:set ts=2 sw=2 et: