wok-next annotate slim/receipt @ rev 20357

id3lib: v2 & patch; libtool: empty $DEPENDS don't work for the moment; lxqt-panel: add pulseaudio support, separate lxqt-panel-sensors (it needs lm-sensors, bash and many more); add serf for recognizing http protocol in SVN; subversion: up with serf; slim: remake using sets.
author Aleksej Bobylev <al.bobylev@gmail.com>
date Tue Nov 21 12:56:18 2017 +0200 (2017-11-21)
parents d3adbeea3a9f
children 0e7893ac206d
rev   line source
al@19845 1 # SliTaz package receipt v2.
pankso@263 2
pankso@263 3 PACKAGE="slim"
al@14601 4 VERSION="1.3.5"
pankso@263 5 CATEGORY="x-window"
al@17992 6 SHORT_DESC="Desktop-independent graphical login manager for X11"
pankso@263 7 MAINTAINER="pankso@slitaz.org"
al@14601 8 LICENSE="GPL2"
al@19845 9 WEB_SITE="https://sourceforge.net/projects/slim.berlios/"
al@19845 10 HOST_ARCH="i486 arm"
al@19845 11 COOKOPTS="!pngquant op8"
al@19845 12
pankso@263 13 TARBALL="$PACKAGE-$VERSION.tar.gz"
al@19845 14 WGET_URL="$SF_MIRROR/slim.berlios/$TARBALL"
pankso@263 15
al@19845 16 BUILD_DEPENDS_arm="freetype-dev jpeg-dev libpng-dev xorg-libXft-dev \
pascal@20289 17 xorg-libXmu-dev pam-dev"
al@19845 18 BUILD_DEPENDS="cmake xorg-libX11-dev freetype-dev libjpeg-turbo-dev zlib-dev \
pascal@20289 19 libpng16-dev fontconfig-dev xorg-libXft-dev xorg-libXrender-dev xorg-libXmu-dev \
pascal@20289 20 pam-dev"
al@20357 21 SPLIT="slim-theme-default slim slim-pam:pam"
pankso@9737 22
al@20357 23 compile_rules() {
al@19845 24 # Handle cross compilation
al@19845 25 case "$ARCH" in
al@19845 26 i?86)
al@19845 27 INCL=/usr/include
al@19845 28 LIBS=/usr/lib ;;
al@19845 29 arm*)
al@19845 30 INCL=/cross/$ARCH/sysroot/usr/include
al@19845 31 LIBS=/cross/$ARCH/sysroot/usr/lib ;;
al@19845 32 esac
al@19845 33
al@20357 34 case "$SET" in
al@20357 35 '') SET_ARGS='-DUSE_PAM=no';;
al@20357 36 pam) SET_ARGS='-DUSE_PAM=yes';;
al@20357 37 esac
al@20357 38
al@14601 39 mkdir build; cd build
al@14601 40 cmake \
al@14601 41 -DCMAKE_INSTALL_PREFIX=/usr \
pankso@16114 42 -DX11_Xmu_LIB="$LIBS/libXmu.so" \
al@19845 43 -DX11_Xft_INCLUDE_PATH=$INCL \
al@19845 44 -DX11_Xmu_INCLUDE_PATH=$INCL \
al@20357 45 $SET_ARGS \
al@14601 46 .. &&
al@14601 47 make &&
al@20357 48 make install || return 1
al@19845 49
al@20357 50 cp -r $stuff/themes $install/usr/share/slim
al@19845 51
al@20357 52 # Config file and rc script.
al@20357 53 cp -a $stuff/etc $install
al@19845 54
al@20357 55 # slim-theme manager & default strings
al@20357 56 install -m755 $stuff/slim-theme $install/usr/bin/slim-theme
al@20357 57 install -m644 $stuff/strings $install/usr/share/slim/strings
al@19845 58
al@20357 59 chown -R root:root $install
pankso@263 60 }
pankso@263 61
pankso@263 62 # Rules to gen a SliTaz package suitable for Tazpkg.
al@19845 63 genpkg_rules() {
al@19845 64 case $PACKAGE in
al@19845 65 slim-theme-default)
al@20357 66 copy default/
al@19845 67 CAT="customization|default theme bundled with SLiM"
al@19845 68 DEPENDS="slim slitaz-configs-base"
al@19845 69 ;;
al@19845 70 slim)
al@20357 71 copy @std @rm
al@19845 72 DEPENDS="fontconfig freetype libjpeg-turbo libpng16 xorg-libX11 \
al@19845 73 xorg-libXft xorg-libXmu xorg-libXrender zlib"
al@19845 74 CONFIG_FILES="/etc/slim.conf"
al@19845 75 SUGGESTED="slim-theme-default slitaz-configs"
al@19845 76 ;;
pascal@20288 77 slim-pam)
al@20357 78 copy @std
pascal@20288 79 rm -rf $fs/usr/share/slim/themes/default
pascal@20288 80 DEPENDS="fontconfig freetype libjpeg-turbo libpng16 xorg-libX11 \
pascal@20288 81 xorg-libXft xorg-libXmu xorg-libXrender zlib pam"
pascal@20288 82 CONFIG_FILES="/etc/slim.conf"
pascal@20288 83 SUGGESTED="slim-theme-default slitaz-configs"
pascal@20288 84 PROVIDE="slim:pam"
al@20292 85 CAT="x-window|PAM enabled"
pascal@20288 86 ;;
al@19845 87 esac
pankso@2053 88 }
pankso@2053 89
al@19845 90 post_install_slim() {
al@19845 91 local USER=$(awk -F: '/:1000:1000:/ { print $1 }' "$1/etc/passwd")
pascal@1784 92 [ -n "$USER" ] &&
pascal@18730 93 sed -i s/"default_user .*"/"default_user $USER"/ "$1/etc/slim.conf"
pascal@18730 94 sed -i 's|>/tmp/X-output||' "$1/etc/slim.conf"
pascal@1062 95 }
al@19845 96
pascal@20288 97 post_install_slim_pam() {
pascal@20288 98 local USER=$(awk -F: '/:1000:1000:/ { print $1 }' "$1/etc/passwd")
pascal@20288 99 [ -n "$USER" ] &&
pascal@20288 100 sed -i s/"default_user .*"/"default_user $USER"/ "$1/etc/slim.conf"
pascal@20288 101 sed -i 's|>/tmp/X-output||' "$1/etc/slim.conf"
pascal@20288 102 }
pascal@20288 103
al@19845 104 post_install_slim_theme_default() {
al@19845 105 chroot "$1/" slim-theme -sdefault
al@19845 106 }
al@19845 107
al@19845 108 pre_remove_slim_theme_default() {
al@19845 109 chroot "$1/" slim-theme -fdefault
al@19845 110 }