Git Repositories

Skype 4.3.0.37 with pulseaudio
authorCyrille Pontvieux <jrd@enialis.net>
Wed, 9 Mar 2016 21:45:38 +0000 (22:45 +0100)
committerCyrille Pontvieux <jrd@enialis.net>
Wed, 9 Mar 2016 21:45:38 +0000 (22:45 +0100)
.gitignore [new file with mode: 0644]
Dockerfile [new file with mode: 0644]
Makefile [new file with mode: 0644]
skype [new file with mode: 0755]
skype-wrapper [new file with mode: 0644]

diff --git a/.gitignore b/.gitignore
new file mode 100644 (file)
index 0000000..afa8686
--- /dev/null
@@ -0,0 +1 @@
+skype-*.tar.bz2
diff --git a/Dockerfile b/Dockerfile
new file mode 100644 (file)
index 0000000..32b4cf8
--- /dev/null
@@ -0,0 +1,154 @@
+# vim: set ft=Dockerfile et sw=2 ts=2 sts=2 tw=0:
+FROM jrdasm/salix32-minimal:14.1
+MAINTAINER JRD <jrd@salixos.org>
+RUN sed -i 's/salix\.hostingxtreme\.com/salix.enialis.net/' /etc/slapt-get/slapt-getrc && \
+    slapt-get --update && \
+    slapt-get -i spi && \
+    sed -i 's/salix\.hostingxtreme\.com/salix.enialis.net/' /etc/slapt-get/slapt-srcrc && \
+    spi -u && yes | spi -U
+RUN spi -i \
+      glibc kernel-headers gcc gcc-g++ pkgtools fakeroot make automake autoconf m4 cmake pkg-config intltool \
+      udev \
+      alsa-lib \
+      cdparanoia \
+      fontconfig \
+      freeglut \
+      freetype \
+      gamin \
+      gd \
+      gettext-tools \
+      glew \
+      glib2 \
+      glu \
+      gst-plugins-base \
+      gstreamer \
+      harfbuzz \
+      kmod \
+      lcms2 \
+      libICE \
+      libSM \
+      libX11 \
+      libXau \
+      libXdamage \
+      libXdmcp \
+      libXext \
+      libXfixes \
+      libXi \
+      libXmu \
+      libXpm \
+      libXrandr \
+      libXrender \
+      libXt \
+      libXxf86vm \
+      libcroco \
+      libdrm \
+      libexif \
+      libffi \
+      libgphoto2 \
+      libjpeg \
+      libogg \
+      libpciaccess \
+      libpng \
+      libtheora \
+      libtiff \
+      libtool \
+      libvisual \
+      libvorbis \
+      libxcb \
+      libxml2 \
+      mesa \
+      mpg123 \
+      openal-soft
+RUN spi -i \
+      hicolor-icon-theme \
+      compositeproto \
+      damageproto \
+      dmxproto \
+      dri2proto \
+      fixesproto \
+      fontcacheproto \
+      fontsproto \
+      glproto \
+      inputproto \
+      kbproto \
+      printproto \
+      randrproto \
+      recordproto \
+      renderproto \
+      resourceproto \
+      scrnsaverproto \
+      videoproto \
+      xcb-proto \
+      xcmiscproto \
+      xextproto \
+      xf86bigfontproto \
+      xf86dgaproto \
+      xf86driproto \
+      xf86miscproto \
+      xf86vidmodeproto \
+      xineramaproto \
+      xproto \
+      libpthread-stubs \
+      libXcomposite \
+      libXcursor \
+      libXinerama \
+      libXft \
+      atk \
+      lzo \
+      pixman \
+      cairo \
+      gdk-pixbuf2 \
+      icu4c \
+      harfbuzz \
+      pango \
+      gtk+2 \
+      font-alias \
+      dejavu-fonts-ttf \
+      font-util \
+      liberation-fonts-ttf \
+      terminus-font \
+      sudo \
+      xdg-user-dirs \
+      xdg-utils \
+      gettext \
+      nc \
+      wget \
+      xterm \
+      links \
+      flac \
+      xdpyinfo \
+      json-c \
+      dbus \
+      libsndfile \
+      pciutils \
+      qt \
+      libXv \
+      libXScrnSaver \
+      perl \
+      pulseaudio \
+      && \
+    slapt-get --clean && slapt-src --clean
+RUN groupadd -g 216 pulse && \
+    useradd -u 216 -g pulse -G audio -m -r -d /var/lib/pulse pulse && \
+    printf "pcm.!default {\n  type plug\n  slave {\n    pcm hw:PCH\n  }\n}\nctl.!defaulut{\n  type hw\n  card PCH\n}\n" > /etc/asound.conf && \
+    sed -ri '/^load-.*-detect$/{s/^/#/}; s/^load-module module-console-kit$/#\0/; s/^load-module module-systemd-login$/#\0/; /^#load-module module-pipe-sink$/a load-module module-alsa-sink device=default\nload-module module-alsa-source device=default' /etc/pulse/default.pa && \
+    dbus-uuidgen > /etc/machine-id
+COPY skype-4.3.0.37.tar.bz2 /tmp/
+COPY skype-wrapper /usr/bin/skype
+RUN cd /opt && tar xf /tmp/skype-4.3.0.37.tar.bz2 && mv skype-4.3.0.37 skype && rm /tmp/skype-4.3.0.37.tar.bz2 && \
+    mv /usr/bin/links /usr/bin/links.bin && \
+    echo '#!/bin/sh' > /usr/bin/links && \
+    echo 'exec xterm -e /usr/bin/links.bin "$@"' >> /usr/bin/links && \
+    chmod +x /usr/bin/links && \
+    (cd /usr/lib && ln -sf libvga.so libvga.so.1) && \
+    echo 'skype ALL=(root) NOPASSWD: ALL' > /etc/sudoers.d/10-skype && \
+    useradd -m -N -g users -G video,audio,pulse,cdrom skype && \
+    passwd -d skype && \
+    chmod +x /usr/bin/skype
+WORKDIR /home/skype
+USER skype
+ENV USER skype
+ENV LANG en_US.utf8
+ENV TERM xterm
+ENV QT_X11_NO_MITSHM 1
+CMD ["skype"]
diff --git a/Makefile b/Makefile
new file mode 100644 (file)
index 0000000..d34e8f6
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,4 @@
+RELEASE=4.3.0.37
+
+image: Dockerfile
+       docker build -t jrdasm/salix-skype:${RELEASE} .
diff --git a/skype b/skype
new file mode 100755 (executable)
index 0000000..a414173
--- /dev/null
+++ b/skype
@@ -0,0 +1,34 @@
+#!/bin/sh
+[ -n "$DISPLAY" ] && [ -n "$XAUTHORITY" ] || exit 1
+docker_xauth=$(mktemp)
+cp $XAUTHORITY $docker_xauth 
+xauth nlist $DISPLAY | sed -e 's/^..../ffff/' | xauth -f $docker_xauth nmerge -
+inter=
+exe="skype"
+if [ "$1" = "--bash" ]; then
+  exe=/bin/bash
+  inter='-ti'
+  shift
+fi
+if [ "$1" = "--inter" ]; then
+  inter='-ti'
+  shift
+fi
+[ -n "$XDG_CONFIG" ] && config_dir="$XDG_CONFIG" || config_dir=$HOME/.config
+[ -r "$config_dir/docker-skype.rc" ] && . "$config_dir/docker-skype.rc"
+[ -n "$VOLUME_HOME_DIR" ] && home_binding="-v $VOLUME_HOME_DIR:/home/skype" || home_binding=
+docker run \
+  $inter \
+  --rm \
+  --privileged \
+  -e LANG \
+  -e DISPLAY \
+  -e ALSA_CARD \
+  -v /tmp/.X11-unix:/tmp/.X11-unix \
+  -e XAUTHORITY=/tmp/.docker.xauth \
+  -v $docker_xauth:/tmp/.docker.xauth:ro \
+  $home_binding \
+  --name skype \
+  jrdasm/salix-skype:4.3.0.37 \
+  $exe "$@"
+rm $docker_xauth
diff --git a/skype-wrapper b/skype-wrapper
new file mode 100644 (file)
index 0000000..aa1c01c
--- /dev/null
@@ -0,0 +1,7 @@
+#!/bin/sh
+if [ -n "$ALSA_CARD" ]; then
+  sed -i "s/PCH/$ALSA_CARD/" /etc/asound.conf
+fi
+trap 'pulseaudio --check && pulseaudio --kill' EXIT TERM INT
+cd /opt/skype
+./skype "$@"