wok-next annotate slim/receipt @ rev 20905

Update packages from ISO and LFS backages (all but toolchain)
author Aleksej Bobylev <al.bobylev@gmail.com>
date Tue Aug 07 00:30:45 2018 +0300 (2018-08-07)
parents dd145c435e4b
children d5aab818505e
rev   line source
al@19845 1 # SliTaz package receipt v2.
pankso@263 2
pankso@263 3 PACKAGE="slim"
al@20905 4 VERSION="1.3.6"
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 COOKOPTS="!pngquant op8"
al@19845 11
pankso@263 12 TARBALL="$PACKAGE-$VERSION.tar.gz"
al@19845 13 WGET_URL="$SF_MIRROR/slim.berlios/$TARBALL"
pankso@263 14
al@20454 15 BUILD_DEPENDS_arm="freetype-dev jpeg-dev libpng16-dev xorg-libXft-dev \
pascal@20289 16 xorg-libXmu-dev pam-dev"
al@19845 17 BUILD_DEPENDS="cmake xorg-libX11-dev freetype-dev libjpeg-turbo-dev zlib-dev \
pascal@20289 18 libpng16-dev fontconfig-dev xorg-libXft-dev xorg-libXrender-dev xorg-libXmu-dev \
al@20905 19 pam-dev libunistring xorg-libXrandr-dev consolekit2-dev"
al@20905 20 SPLIT="slim-theme-default slim" # slim-pam:pam"
pankso@9737 21
al@20357 22 compile_rules() {
al@19845 23 case "$ARCH" in
al@19845 24 arm*)
al@19845 25 INCL=/cross/$ARCH/sysroot/usr/include
al@19845 26 LIBS=/cross/$ARCH/sysroot/usr/lib ;;
al@20443 27 i?86|x86_64)
al@20443 28 INCL=/usr/include
al@20443 29 LIBS=/usr/lib ;;
al@19845 30 esac
al@19845 31
al@20357 32 case "$SET" in
al@20357 33 '') SET_ARGS='-DUSE_PAM=no';;
al@20357 34 pam) SET_ARGS='-DUSE_PAM=yes';;
al@20357 35 esac
al@20357 36
al@14601 37 mkdir build; cd build
al@14601 38 cmake \
al@20905 39 -DCMAKE_BUILD_TYPE=Release \
al@20905 40 -DCMAKE_SKIP_RPATH=ON \
al@14601 41 -DCMAKE_INSTALL_PREFIX=/usr \
al@20905 42 -DUSE_CONSOLEKIT=yes \
pankso@16114 43 -DX11_Xmu_LIB="$LIBS/libXmu.so" \
al@19845 44 -DX11_Xft_INCLUDE_PATH=$INCL \
al@19845 45 -DX11_Xmu_INCLUDE_PATH=$INCL \
al@20357 46 $SET_ARGS \
al@14601 47 .. &&
al@14601 48 make &&
al@20357 49 make install || return 1
al@19845 50
al@20357 51 cp -r $stuff/themes $install/usr/share/slim
al@19845 52
al@20357 53 # Config file and rc script.
al@20357 54 cp -a $stuff/etc $install
al@19845 55
al@20357 56 # slim-theme manager & default strings
al@20357 57 install -m755 $stuff/slim-theme $install/usr/bin/slim-theme
al@20357 58 install -m644 $stuff/strings $install/usr/share/slim/strings
al@19845 59
al@20357 60 chown -R root:root $install
pankso@263 61 }
pankso@263 62
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 }