wok-next view slim/receipt @ rev 21005

Small updates
author Aleksej Bobylev <al.bobylev@gmail.com>
date Mon Oct 08 11:41:17 2018 +0300 (2018-10-08)
parents dd145c435e4b
children d5aab818505e
line source
1 # SliTaz package receipt v2.
3 PACKAGE="slim"
4 VERSION="1.3.6"
5 CATEGORY="x-window"
6 SHORT_DESC="Desktop-independent graphical login manager for X11"
7 MAINTAINER="pankso@slitaz.org"
8 LICENSE="GPL2"
9 WEB_SITE="https://sourceforge.net/projects/slim.berlios/"
10 COOKOPTS="!pngquant op8"
12 TARBALL="$PACKAGE-$VERSION.tar.gz"
13 WGET_URL="$SF_MIRROR/slim.berlios/$TARBALL"
15 BUILD_DEPENDS_arm="freetype-dev jpeg-dev libpng16-dev xorg-libXft-dev \
16 xorg-libXmu-dev pam-dev"
17 BUILD_DEPENDS="cmake xorg-libX11-dev freetype-dev libjpeg-turbo-dev zlib-dev \
18 libpng16-dev fontconfig-dev xorg-libXft-dev xorg-libXrender-dev xorg-libXmu-dev \
19 pam-dev libunistring xorg-libXrandr-dev consolekit2-dev"
20 SPLIT="slim-theme-default slim" # slim-pam:pam"
22 compile_rules() {
23 case "$ARCH" in
24 arm*)
25 INCL=/cross/$ARCH/sysroot/usr/include
26 LIBS=/cross/$ARCH/sysroot/usr/lib ;;
27 i?86|x86_64)
28 INCL=/usr/include
29 LIBS=/usr/lib ;;
30 esac
32 case "$SET" in
33 '') SET_ARGS='-DUSE_PAM=no';;
34 pam) SET_ARGS='-DUSE_PAM=yes';;
35 esac
37 mkdir build; cd build
38 cmake \
39 -DCMAKE_BUILD_TYPE=Release \
40 -DCMAKE_SKIP_RPATH=ON \
41 -DCMAKE_INSTALL_PREFIX=/usr \
42 -DUSE_CONSOLEKIT=yes \
43 -DX11_Xmu_LIB="$LIBS/libXmu.so" \
44 -DX11_Xft_INCLUDE_PATH=$INCL \
45 -DX11_Xmu_INCLUDE_PATH=$INCL \
46 $SET_ARGS \
47 .. &&
48 make &&
49 make install || return 1
51 cp -r $stuff/themes $install/usr/share/slim
53 # Config file and rc script.
54 cp -a $stuff/etc $install
56 # slim-theme manager & default strings
57 install -m755 $stuff/slim-theme $install/usr/bin/slim-theme
58 install -m644 $stuff/strings $install/usr/share/slim/strings
60 chown -R root:root $install
61 }
63 genpkg_rules() {
64 case $PACKAGE in
65 slim-theme-default)
66 copy default/
67 CAT="customization|default theme bundled with SLiM"
68 DEPENDS="slim slitaz-configs-base"
69 ;;
70 slim)
71 copy @std @rm
72 DEPENDS="fontconfig freetype libjpeg-turbo libpng16 xorg-libX11 \
73 xorg-libXft xorg-libXmu xorg-libXrender zlib"
74 CONFIG_FILES="/etc/slim.conf"
75 SUGGESTED="slim-theme-default slitaz-configs"
76 ;;
77 slim-pam)
78 copy @std
79 rm -rf $fs/usr/share/slim/themes/default
80 DEPENDS="fontconfig freetype libjpeg-turbo libpng16 xorg-libX11 \
81 xorg-libXft xorg-libXmu xorg-libXrender zlib pam"
82 CONFIG_FILES="/etc/slim.conf"
83 SUGGESTED="slim-theme-default slitaz-configs"
84 PROVIDE="slim:pam"
85 CAT="x-window|PAM enabled"
86 ;;
87 esac
88 }
90 post_install_slim() {
91 local USER=$(awk -F: '/:1000:1000:/ { print $1 }' "$1/etc/passwd")
92 [ -n "$USER" ] &&
93 sed -i s/"default_user .*"/"default_user $USER"/ "$1/etc/slim.conf"
94 sed -i 's|>/tmp/X-output||' "$1/etc/slim.conf"
95 }
97 post_install_slim_pam() {
98 local USER=$(awk -F: '/:1000:1000:/ { print $1 }' "$1/etc/passwd")
99 [ -n "$USER" ] &&
100 sed -i s/"default_user .*"/"default_user $USER"/ "$1/etc/slim.conf"
101 sed -i 's|>/tmp/X-output||' "$1/etc/slim.conf"
102 }
104 post_install_slim_theme_default() {
105 chroot "$1/" slim-theme -sdefault
106 }
108 pre_remove_slim_theme_default() {
109 chroot "$1/" slim-theme -fdefault
110 }