PKGBUILD 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  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=18
  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 imagemagick ntp zenity notification-daemon haveged)
  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=(PKGBUILD.qubes-ensure-lib-modules.service)
  27. noextract=()
  28. md5sums=('88f4b3d5b156888a9d38f5bc28702ab8') #generate with 'makepkg -g'
  29. build() {
  30. for source in qubes-rpc qrexec misc Makefile 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. # Fix for archlinux sbindir
  43. sed 's:/usr/sbin/ntpdate:/usr/bin/ntpdate:g' -i qubes-rpc/sync-ntp-clock
  44. sed 's:/usr/sbin/qubes-netwatcher:/usr/bin/qubes-netwatcher:g' -i vm-systemd/qubes-netwatcher.service
  45. sed 's:/usr/sbin/qubes-firewall:/usr/bin/qubes-firewall:g' -i vm-systemd/qubes-firewall.service
  46. for dir in qubes-rpc qrexec misc; do
  47. (cd $dir; make)
  48. done
  49. }
  50. package() {
  51. # Note: Archlinux removed use of directory such as /sbin /bin /usr/sbin (https://mailman.archlinux.org/pipermail/arch-dev-public/2012-March/022625.html)
  52. (cd qrexec; make install DESTDIR=$pkgdir SBINDIR=/usr/bin)
  53. make install-vm DESTDIR=$pkgdir SBINDIR=/usr/bin DIST=archlinux
  54. # Change the place for iptable rules to match archlinux standard
  55. mkdir -p $pkgdir/etc/iptables
  56. mv $pkgdir/etc/sysconfig/iptables $pkgdir/etc/iptables/iptables.rules
  57. mv $pkgdir/etc/sysconfig/ip6tables $pkgdir/etc/iptables/ip6tables.rules
  58. # Remove things non wanted in archlinux
  59. rm -r $pkgdir/etc/yum*
  60. rm -r $pkgdir/etc/init.d
  61. # Remove fedora specific scripts
  62. rm $pkgdir/etc/fstab
  63. # Install systemd script allowing to automount /lib/modules
  64. install -m 644 $srcdir/PKGBUILD.qubes-ensure-lib-modules.service $pkgdir/lib/systemd/system/qubes-ensure-lib-modules.service
  65. # Archlinux specific: enable autologin on tty1
  66. mkdir -p $pkgdir/etc/systemd/system/getty@tty1.service.d/
  67. cat <<EOF > $pkgdir/etc/systemd/system/getty@tty1.service.d/autologin.conf
  68. [Service]
  69. ExecStart=
  70. ExecStart=-/usr/bin/agetty --autologin user --noclear %I 38400 linux
  71. EOF
  72. }
  73. # vim:set ts=2 sw=2 et: