2013-04-12 16:43:46 +02:00
# 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`
2016-01-21 18:21:44 +01:00
pkgrel = 6
2013-04-12 16:43:46 +02:00
epoch =
pkgdesc = "The Qubes core files for installation inside a Qubes VM."
arch = ( "x86_64" )
url = "http://qubes-os.org/"
license = ( 'GPL' )
groups = ( )
2015-12-27 20:24:25 +01:00
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)
2016-01-16 11:54:04 +01:00
makedepends = ( gcc make pkg-config "qubes-vm-utils>=3.1.3" qubes-libvchan qubes-db-vm qubes-vm-xen libx11 python2 python3)
2013-04-12 16:43:46 +02:00
checkdepends = ( )
2015-07-08 15:00:50 +02:00
optdepends = ( gnome-keyring gnome-settings-daemon networkmanager iptables tinyproxy python2-nautilus gpk-update-viewer)
2013-04-12 16:43:46 +02:00
provides = ( )
conflicts = ( )
replaces = ( )
backup = ( )
options = ( )
install = PKGBUILD.install
changelog =
2014-02-03 20:53:03 +01:00
source = ( PKGBUILD.qubes-ensure-lib-modules.service)
2013-04-12 16:43:46 +02:00
noextract = ( )
2014-02-03 20:53:03 +01:00
md5sums = ( '88f4b3d5b156888a9d38f5bc28702ab8' ) #generate with 'makepkg -g'
2013-04-12 16:43:46 +02:00
build( ) {
2015-10-16 14:34:15 +02:00
for source in autostart-dropins qubes-rpc qrexec misc Makefile vm-init.d vm-systemd network ; do
2013-04-12 16:43:46 +02:00
( 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/*
2015-10-17 10:15:54 +02:00
# Force running all scripts with python2
2015-07-30 15:54:41 +02:00
sed 's:#!/usr/bin/python:#!/usr/bin/python2:' -i misc/*
2015-10-17 10:15:54 +02:00
sed 's:#!/usr/bin/env python:#!/usr/bin/env python2:' -i misc/*
2015-07-30 15:54:41 +02:00
sed 's:#!/usr/bin/python:#!/usr/bin/python2:' -i qubes-rpc/*
2015-10-17 10:15:54 +02:00
sed 's:#!/usr/bin/env python:#!/usr/bin/env python2:' -i qubes-rpc/*
2015-07-30 15:54:41 +02:00
2013-08-07 11:21:26 +02:00
# Fix for archlinux sbindir
2013-08-13 09:36:35 +02:00
sed 's:/usr/sbin/ntpdate:/usr/bin/ntpdate:g' -i qubes-rpc/sync-ntp-clock
sed 's:/usr/sbin/qubes-netwatcher:/usr/bin/qubes-netwatcher:g' -i vm-systemd/qubes-netwatcher.service
sed 's:/usr/sbin/qubes-firewall:/usr/bin/qubes-firewall:g' -i vm-systemd/qubes-firewall.service
2013-08-07 11:21:26 +02:00
2013-04-12 16:43:46 +02:00
for dir in qubes-rpc qrexec misc; do
( cd $dir ; make)
done
}
package( ) {
2013-08-07 11:21:26 +02:00
# Note: Archlinux removed use of directory such as /sbin /bin /usr/sbin (https://mailman.archlinux.org/pipermail/arch-dev-public/2012-March/022625.html)
2015-10-15 04:34:55 +02:00
2015-01-06 15:59:15 +01:00
( cd qrexec; make install DESTDIR = $pkgdir SBINDIR = /usr/bin LIBDIR = /usr/lib SYSLIBDIR = /usr/lib)
2013-04-12 16:43:46 +02:00
2015-12-08 15:31:59 +01:00
make install-vm DESTDIR = $pkgdir SBINDIR = /usr/bin LIBDIR = /usr/lib SYSLIBDIR = /usr/lib DROPIN_DIR = usr/lib/systemd DIST = archlinux
2013-04-26 09:31:20 +02:00
2013-04-12 16:43:46 +02:00
# 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
2014-02-03 20:53:03 +01:00
# Install systemd script allowing to automount /lib/modules
2015-01-06 15:59:15 +01:00
install -m 644 $srcdir /PKGBUILD.qubes-ensure-lib-modules.service ${ pkgdir } /usr/lib/systemd/system/qubes-ensure-lib-modules.service
2014-02-03 20:53:03 +01:00
2014-02-16 17:29:40 +01:00
# 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
2015-01-06 15:59:15 +01:00
# Archlinux packaging guidelines: /var/run is a symlink to a tmpfs. Don't create it
rm -r $pkgdir /var/run
2013-04-12 16:43:46 +02:00
}
# vim:set ts=2 sw=2 et: