wok-next annotate slim/receipt @ rev 20734

nut: update (b)deps
author Aleksej Bobylev <al.bobylev@gmail.com>
date Tue May 29 18:57:36 2018 +0300 (2018-05-29)
parents 0e7893ac206d
children e7a485521d6a
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 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 \
pascal@20289 19 pam-dev"
al@20357 20 SPLIT="slim-theme-default slim slim-pam:pam"
pankso@9737 21
al@20357 22 compile_rules() {
al@19845 23 # Handle cross compilation
al@19845 24 case "$ARCH" in
al@19845 25 arm*)
al@19845 26 INCL=/cross/$ARCH/sysroot/usr/include
al@19845 27 LIBS=/cross/$ARCH/sysroot/usr/lib ;;
al@20443 28 i?86|x86_64)
al@20443 29 INCL=/usr/include
al@20443 30 LIBS=/usr/lib ;;
al@19845 31 esac
al@19845 32
al@20357 33 case "$SET" in
al@20357 34 '') SET_ARGS='-DUSE_PAM=no';;
al@20357 35 pam) SET_ARGS='-DUSE_PAM=yes';;
al@20357 36 esac
al@20357 37
al@14601 38 mkdir build; cd build
al@14601 39 cmake \
al@14601 40 -DCMAKE_INSTALL_PREFIX=/usr \
pankso@16114 41 -DX11_Xmu_LIB="$LIBS/libXmu.so" \
al@19845 42 -DX11_Xft_INCLUDE_PATH=$INCL \
al@19845 43 -DX11_Xmu_INCLUDE_PATH=$INCL \
al@20357 44 $SET_ARGS \
al@14601 45 .. &&
al@14601 46 make &&
al@20357 47 make install || return 1
al@19845 48
al@20357 49 cp -r $stuff/themes $install/usr/share/slim
al@19845 50
al@20357 51 # Config file and rc script.
al@20357 52 cp -a $stuff/etc $install
al@19845 53
al@20357 54 # slim-theme manager & default strings
al@20357 55 install -m755 $stuff/slim-theme $install/usr/bin/slim-theme
al@20357 56 install -m644 $stuff/strings $install/usr/share/slim/strings
al@19845 57
al@20357 58 chown -R root:root $install
pankso@263 59 }
pankso@263 60
al@19845 61 genpkg_rules() {
al@19845 62 case $PACKAGE in
al@19845 63 slim-theme-default)
al@20357 64 copy default/
al@19845 65 CAT="customization|default theme bundled with SLiM"
al@19845 66 DEPENDS="slim slitaz-configs-base"
al@19845 67 ;;
al@19845 68 slim)
al@20357 69 copy @std @rm
al@19845 70 DEPENDS="fontconfig freetype libjpeg-turbo libpng16 xorg-libX11 \
al@19845 71 xorg-libXft xorg-libXmu xorg-libXrender zlib"
al@19845 72 CONFIG_FILES="/etc/slim.conf"
al@19845 73 SUGGESTED="slim-theme-default slitaz-configs"
al@19845 74 ;;
pascal@20288 75 slim-pam)
al@20357 76 copy @std
pascal@20288 77 rm -rf $fs/usr/share/slim/themes/default
pascal@20288 78 DEPENDS="fontconfig freetype libjpeg-turbo libpng16 xorg-libX11 \
pascal@20288 79 xorg-libXft xorg-libXmu xorg-libXrender zlib pam"
pascal@20288 80 CONFIG_FILES="/etc/slim.conf"
pascal@20288 81 SUGGESTED="slim-theme-default slitaz-configs"
pascal@20288 82 PROVIDE="slim:pam"
al@20292 83 CAT="x-window|PAM enabled"
pascal@20288 84 ;;
al@19845 85 esac
pankso@2053 86 }
pankso@2053 87
al@19845 88 post_install_slim() {
al@19845 89 local USER=$(awk -F: '/:1000:1000:/ { print $1 }' "$1/etc/passwd")
pascal@1784 90 [ -n "$USER" ] &&
pascal@18730 91 sed -i s/"default_user .*"/"default_user $USER"/ "$1/etc/slim.conf"
pascal@18730 92 sed -i 's|>/tmp/X-output||' "$1/etc/slim.conf"
pascal@1062 93 }
al@19845 94
pascal@20288 95 post_install_slim_pam() {
pascal@20288 96 local USER=$(awk -F: '/:1000:1000:/ { print $1 }' "$1/etc/passwd")
pascal@20288 97 [ -n "$USER" ] &&
pascal@20288 98 sed -i s/"default_user .*"/"default_user $USER"/ "$1/etc/slim.conf"
pascal@20288 99 sed -i 's|>/tmp/X-output||' "$1/etc/slim.conf"
pascal@20288 100 }
pascal@20288 101
al@19845 102 post_install_slim_theme_default() {
al@19845 103 chroot "$1/" slim-theme -sdefault
al@19845 104 }
al@19845 105
al@19845 106 pre_remove_slim_theme_default() {
al@19845 107 chroot "$1/" slim-theme -fdefault
al@19845 108 }