aboutsummaryrefslogtreecommitdiffstats
path: root/main/xinit
diff options
context:
space:
mode:
Diffstat (limited to 'main/xinit')
-rw-r--r--main/xinit/06_move_serverauthfile_into_tmp.patch20
-rw-r--r--main/xinit/APKBUILD48
-rw-r--r--main/xinit/xinitrc49
-rw-r--r--main/xinit/xserverrc2
-rw-r--r--main/xinit/xsession10
5 files changed, 129 insertions, 0 deletions
diff --git a/main/xinit/06_move_serverauthfile_into_tmp.patch b/main/xinit/06_move_serverauthfile_into_tmp.patch
new file mode 100644
index 0000000000..99e8a6754d
--- /dev/null
+++ b/main/xinit/06_move_serverauthfile_into_tmp.patch
@@ -0,0 +1,20 @@
+Move startx auth files in /tmp so they are removed on reboot.
+http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=357736
+The trap patch didn't seem to work on reboot.
+---
+ startx.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+Index: xinit/startx.cpp
+===================================================================
+--- xinit.orig/startx.cpp
++++ xinit/startx.cpp
+@@ -273,7 +273,7 @@
+ dummy=0
+
+ XCOMM create a file with auth information for the server. ':0' is a dummy.
+- xserverauthfile=$HOME/.serverauth.$$
++ xserverauthfile=`mktemp -p /tmp serverauth.XXXXXXXXXX`
+ trap "rm -f '$xserverauthfile'" HUP INT QUIT ILL TRAP KILL BUS TERM
+ xauth -q -f "$xserverauthfile" << EOF
+ add :$dummy . $mcookie
diff --git a/main/xinit/APKBUILD b/main/xinit/APKBUILD
new file mode 100644
index 0000000000..8b809843fc
--- /dev/null
+++ b/main/xinit/APKBUILD
@@ -0,0 +1,48 @@
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=xinit
+pkgver=1.2.1
+pkgrel=3
+pkgdesc="X.Org initialisation program "
+url="http://xorg.freedesktop.org/"
+arch="all"
+license="GPL"
+subpackages="$pkgname-doc"
+depends="xauth mcookie"
+makedepends="pkgconfig libx11-dev"
+source="http://xorg.freedesktop.org/releases/individual/app/xinit-$pkgver.tar.bz2
+ 06_move_serverauthfile_into_tmp.patch
+ xinitrc
+ xsession
+ xserverrc"
+
+prepare() {
+ cd "$srcdir"/xinit-$pkgver
+ for i in $source; do
+ case $i in
+ *.patch) patch -p1 -i "$srcdir"/$i
+ esac
+ done
+}
+
+build() {
+ cd "$srcdir"/xinit-$pkgver
+ ./configure --prefix=/usr \
+ --with-xinitdir=/etc/X11/xinit \
+ || return 1
+ make || return 1
+}
+
+package() {
+ cd "$srcdir"/xinit-$pkgver
+ make DESTDIR="$pkgdir" install || return 1
+ chmod +x "$pkgdir"/usr/bin/startx
+ install -m755 -d "$pkgdir"/etc/skel
+ install -m755 -D "$srcdir"/xinitrc "$pkgdir"/etc/X11/xinit/xinitrc
+ install -m755 "$srcdir"/xsession "$pkgdir"/etc/skel/.xsession || return 1
+ install -m755 "$srcdir"/xserverrc "$pkgdir"/etc/X11/xinit/xserverrc || return 1
+}
+md5sums="56f2d202b3dc10fcd21931a67bb270f7 xinit-1.2.1.tar.bz2
+abd072ec435ce084cf4e89c58f83d45c 06_move_serverauthfile_into_tmp.patch
+af322d72972d5722b7fc0a9e8f025b15 xinitrc
+4f04d2891ea87f50fde518267b7a1154 xsession
+4d29a1104997609e10206a4c1408237d xserverrc"
diff --git a/main/xinit/xinitrc b/main/xinit/xinitrc
new file mode 100644
index 0000000000..0055713592
--- /dev/null
+++ b/main/xinit/xinitrc
@@ -0,0 +1,49 @@
+#!/bin/sh
+# $Xorg: xinitrc.cpp,v 1.3 2000/08/17 19:54:30 cpqbld Exp $
+
+userresources=$HOME/.Xresources
+usermodmap=$HOME/.Xmodmap
+xinitdir=/etc/X11
+sysresources=$xinitdir/Xresources
+sysmodmap=$xinitdir/Xmodmap
+
+# merge in defaults and keymaps
+
+if [ -f $sysresources ]; then
+ xrdb -merge $sysresources
+fi
+
+if [ -f $sysmodmap ]; then
+ xmodmap $sysmodmap
+fi
+
+if [ -f $userresources ]; then
+ xrdb -merge $userresources
+fi
+
+if [ -f $usermodmap ]; then
+ xmodmap $usermodmap
+fi
+
+# First try ~/.xinitrc
+if [ -f "$HOME/.xinitrc" ]; then
+ XINITRC="$HOME/.xinitrc"
+ if [ -x $XINITRC ]; then
+ # if the x bit is set on .xinitrc
+ # it means the xinitrc is not a
+ # shell script but something else
+ exec $XINITRC "$@"
+ else
+ exec /bin/sh "$HOME/.xinitrc" "$@"
+ fi
+fi
+
+# If not present, try the system default
+exec startxfce4
+
+
+# Fall back to fluxbox
+exec startfluxbox
+
+# Start only terminal as last resort
+exec terminal || exec aterm
diff --git a/main/xinit/xserverrc b/main/xinit/xserverrc
new file mode 100644
index 0000000000..2537aedcbf
--- /dev/null
+++ b/main/xinit/xserverrc
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec /usr/bin/X -nolisten tcp
diff --git a/main/xinit/xsession b/main/xinit/xsession
new file mode 100644
index 0000000000..819c248cd5
--- /dev/null
+++ b/main/xinit/xsession
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+#
+# ~/.xsession
+#
+# Executed by xdm/gdm/kdm at login
+#
+
+/bin/sh -l ~/.xinitrc
+