PKGBUILD 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  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=9
  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 PKGBUILD.qubes-update-desktop-icons.hook
  27. PKGBUILD-qubes-noupgrade.conf
  28. PKGBUILD-qubes-repo-3.1.conf
  29. PKGBUILD-qubes-repo-3.2.conf
  30. )
  31. noextract=()
  32. md5sums=( '88f4b3d5b156888a9d38f5bc28702ab8' 'bbfb946d6d2787e5abf8e2236502a3d4'
  33. 'c1c1b86eed48cc0f943f21b9a1df8b8e'
  34. '36bf82df048e81250e7ba80b3224bddc'
  35. 'd5898def7bad7fd92ea60f0bf48174e3'
  36. )
  37. build() {
  38. for source in autostart-dropins qubes-rpc qrexec misc Makefile vm-init.d vm-systemd network ; do
  39. (ln -s $srcdir/../$source $srcdir/$source)
  40. done
  41. # Fix for network tools paths
  42. sed 's:/sbin/ifconfig:ifconfig:g' -i network/*
  43. sed 's:/sbin/route:route:g' -i network/*
  44. sed 's:/sbin/ethtool:ethtool:g' -i network/*
  45. sed 's:/sbin/ip:ip:g' -i network/*
  46. sed 's:/bin/grep:grep:g' -i network/*
  47. # Force running all scripts with python2
  48. sed 's:#!/usr/bin/python:#!/usr/bin/python2:' -i misc/*
  49. sed 's:#!/usr/bin/env python:#!/usr/bin/env python2:' -i misc/*
  50. sed 's:#!/usr/bin/python:#!/usr/bin/python2:' -i qubes-rpc/*
  51. sed 's:#!/usr/bin/env python:#!/usr/bin/env python2:' -i qubes-rpc/*
  52. # Fix for archlinux sbindir
  53. sed 's:/usr/sbin/ntpdate:/usr/bin/ntpdate:g' -i qubes-rpc/sync-ntp-clock
  54. sed 's:/usr/sbin/qubes-netwatcher:/usr/bin/qubes-netwatcher:g' -i vm-systemd/qubes-netwatcher.service
  55. sed 's:/usr/sbin/qubes-firewall:/usr/bin/qubes-firewall:g' -i vm-systemd/qubes-firewall.service
  56. for dir in qubes-rpc qrexec misc; do
  57. (cd $dir; make)
  58. done
  59. }
  60. package() {
  61. # Note: Archlinux removed use of directory such as /sbin /bin /usr/sbin (https://mailman.archlinux.org/pipermail/arch-dev-public/2012-March/022625.html)
  62. (cd qrexec; make install DESTDIR=$pkgdir SBINDIR=/usr/bin LIBDIR=/usr/lib SYSLIBDIR=/usr/lib)
  63. make install-vm DESTDIR=$pkgdir SBINDIR=/usr/bin LIBDIR=/usr/lib SYSLIBDIR=/usr/lib DROPIN_DIR=usr/lib/systemd DIST=archlinux
  64. # Remove things non wanted in archlinux
  65. rm -r $pkgdir/etc/yum*
  66. rm -r $pkgdir/etc/init.d
  67. # Remove fedora specific scripts
  68. rm $pkgdir/etc/fstab
  69. # Install systemd script allowing to automount /lib/modules
  70. install -m 644 $srcdir/PKGBUILD.qubes-ensure-lib-modules.service ${pkgdir}/usr/lib/systemd/system/qubes-ensure-lib-modules.service
  71. # Install pacman hook to update desktop icons
  72. mkdir -p ${pkgdir}/usr/share/libalpm/hooks/
  73. install -m 644 $srcdir/PKGBUILD.qubes-update-desktop-icons.hook ${pkgdir}/usr/share/libalpm/hooks/qubes-update-desktop-icons.hook
  74. # Install pacman.d drop-ins (at least 1 drop-in must be installed or pacman will fail)
  75. mkdir -p ${pkgdir}/etc/pacman.d
  76. install -m 644 $srcdir/PKGBUILD-qubes-noupgrade.conf ${pkgdir}/etc/pacman.d/10-qubes-noupgrade.conf
  77. # Install pacman repository
  78. release=`echo $pkgver | cut -d '.' -f 1,2`
  79. echo "Installing repository for release ${release}"
  80. install -m 644 $srcdir/PKGBUILD-qubes-repo-${release}.conf ${pkgdir}/etc/pacman.d/99-qubes-repository-${release}.conf
  81. # Archlinux specific: enable autologin on tty1
  82. mkdir -p $pkgdir/etc/systemd/system/getty@tty1.service.d/
  83. cat <<EOF > $pkgdir/etc/systemd/system/getty@tty1.service.d/autologin.conf
  84. [Service]
  85. ExecStart=
  86. ExecStart=-/usr/bin/agetty --autologin user --noclear %I 38400 linux
  87. EOF
  88. # Archlinux packaging guidelines: /var/run is a symlink to a tmpfs. Don't create it
  89. rm -r $pkgdir/var/run
  90. }
  91. # vim:set ts=2 sw=2 et: