PKGBUILD 4.2 KB

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