123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114 |
- # This is an example PKGBUILD file. Use this as a start to creating your own,
- # and remove these comments. For more information, see 'man PKGBUILD'.
- # NOTE: Please fill out the license field for your package! If it is unknown,
- # then please put 'unknown'.
- # Maintainer: Olivier Medoc <o_medoc@yahoo.fr>
- pkgname=qubes-vm-core
- pkgver=`cat version`
- pkgrel=9
- epoch=
- pkgdesc="The Qubes core files for installation inside a Qubes VM."
- arch=("x86_64")
- url="http://qubes-os.org/"
- license=('GPL')
- groups=()
- 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)
- makedepends=(gcc make pkg-config "qubes-vm-utils>=3.1.3" qubes-libvchan qubes-db-vm qubes-vm-xen libx11 python2 python3)
- checkdepends=()
- optdepends=(gnome-keyring gnome-settings-daemon networkmanager iptables tinyproxy python2-nautilus gpk-update-viewer)
- provides=()
- conflicts=()
- replaces=()
- backup=()
- options=()
- install=PKGBUILD.install
- changelog=
- source=( PKGBUILD.qubes-ensure-lib-modules.service PKGBUILD.qubes-update-desktop-icons.hook
- PKGBUILD-qubes-noupgrade.conf
- PKGBUILD-qubes-repo-3.1.conf
- PKGBUILD-qubes-repo-3.2.conf
- )
- noextract=()
- md5sums=( '88f4b3d5b156888a9d38f5bc28702ab8' 'bbfb946d6d2787e5abf8e2236502a3d4'
- 'c1c1b86eed48cc0f943f21b9a1df8b8e'
- '36bf82df048e81250e7ba80b3224bddc'
- 'd5898def7bad7fd92ea60f0bf48174e3'
- )
- build() {
- for source in autostart-dropins qubes-rpc qrexec misc Makefile vm-init.d vm-systemd network ; do
- (ln -s $srcdir/../$source $srcdir/$source)
- done
- # Fix for network tools paths
- sed 's:/sbin/ifconfig:ifconfig:g' -i network/*
- sed 's:/sbin/route:route:g' -i network/*
- sed 's:/sbin/ethtool:ethtool:g' -i network/*
- sed 's:/sbin/ip:ip:g' -i network/*
- sed 's:/bin/grep:grep:g' -i network/*
- # Force running all scripts with python2
- sed 's:#!/usr/bin/python:#!/usr/bin/python2:' -i misc/*
- sed 's:#!/usr/bin/env python:#!/usr/bin/env python2:' -i misc/*
- sed 's:#!/usr/bin/python:#!/usr/bin/python2:' -i qubes-rpc/*
- sed 's:#!/usr/bin/env python:#!/usr/bin/env python2:' -i qubes-rpc/*
- # Fix for archlinux sbindir
- sed 's:/usr/sbin/ntpdate:/usr/bin/ntpdate:g' -i qubes-rpc/sync-ntp-clock
- sed 's:/usr/sbin/qubes-firewall:/usr/bin/qubes-firewall:g' -i vm-systemd/qubes-firewall.service
- for dir in qubes-rpc qrexec misc; do
- (cd $dir; make)
- done
- }
- package() {
- # Note: Archlinux removed use of directory such as /sbin /bin /usr/sbin (https://mailman.archlinux.org/pipermail/arch-dev-public/2012-March/022625.html)
- (cd qrexec; make install DESTDIR=$pkgdir SBINDIR=/usr/bin LIBDIR=/usr/lib SYSLIBDIR=/usr/lib)
- make install-vm DESTDIR=$pkgdir SBINDIR=/usr/bin LIBDIR=/usr/lib SYSLIBDIR=/usr/lib DROPIN_DIR=usr/lib/systemd DIST=archlinux
- # Remove things non wanted in archlinux
- rm -r $pkgdir/etc/yum*
- rm -r $pkgdir/etc/init.d
- # Remove fedora specific scripts
- rm $pkgdir/etc/fstab
- # Install systemd script allowing to automount /lib/modules
- install -m 644 $srcdir/PKGBUILD.qubes-ensure-lib-modules.service ${pkgdir}/usr/lib/systemd/system/qubes-ensure-lib-modules.service
- # Install pacman hook to update desktop icons
- mkdir -p ${pkgdir}/usr/share/libalpm/hooks/
- install -m 644 $srcdir/PKGBUILD.qubes-update-desktop-icons.hook ${pkgdir}/usr/share/libalpm/hooks/qubes-update-desktop-icons.hook
- # Install pacman.d drop-ins (at least 1 drop-in must be installed or pacman will fail)
- mkdir -p ${pkgdir}/etc/pacman.d
- install -m 644 $srcdir/PKGBUILD-qubes-noupgrade.conf ${pkgdir}/etc/pacman.d/10-qubes-noupgrade.conf
- # Install pacman repository
- release=`echo $pkgver | cut -d '.' -f 1,2`
- echo "Installing repository for release ${release}"
- install -m 644 $srcdir/PKGBUILD-qubes-repo-${release}.conf ${pkgdir}/etc/pacman.d/99-qubes-repository-${release}.conf
- # Archlinux specific: enable autologin on tty1
- mkdir -p $pkgdir/etc/systemd/system/getty@tty1.service.d/
- cat <<EOF > $pkgdir/etc/systemd/system/getty@tty1.service.d/autologin.conf
- [Service]
- ExecStart=
- ExecStart=-/usr/bin/agetty --autologin user --noclear %I 38400 linux
- EOF
- # Archlinux packaging guidelines: /var/run is a symlink to a tmpfs. Don't create it
- rm -r $pkgdir/var/run
- }
- # vim:set ts=2 sw=2 et:
|