wok-next view slim/receipt @ rev 20288

remove slim-pam sudo-pam
author Pascal Bellard <pascal.bellard@slitaz.org>
date Wed Nov 08 17:03:48 2017 +0100 (2017-11-08)
parents 2a1b70deab76
children c2c1188bec51
line source
1 # SliTaz package receipt v2.
3 PACKAGE="slim"
4 VERSION="1.3.5"
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 HOST_ARCH="i486 arm"
11 COOKOPTS="!pngquant op8"
13 TARBALL="$PACKAGE-$VERSION.tar.gz"
14 WGET_URL="$SF_MIRROR/slim.berlios/$TARBALL"
16 BUILD_DEPENDS_arm="freetype-dev jpeg-dev libpng-dev xorg-libXft-dev \
17 xorg-libXmu-dev"
18 BUILD_DEPENDS="cmake xorg-libX11-dev freetype-dev libjpeg-turbo-dev zlib-dev \
19 libpng16-dev fontconfig-dev xorg-libXft-dev xorg-libXrender-dev xorg-libXmu-dev"
20 SPLIT="slim-theme-default slim slim-pam"
22 # Rules to configure and make the package.
23 compile_rules()
24 {
25 # Handle cross compilation
26 case "$ARCH" in
27 i?86)
28 INCL=/usr/include
29 LIBS=/usr/lib ;;
30 arm*)
31 INCL=/cross/$ARCH/sysroot/usr/include
32 LIBS=/cross/$ARCH/sysroot/usr/lib ;;
33 esac
35 mkdir build; cd build
36 cp -a $src $src-pam
37 cmake \
38 -DCMAKE_INSTALL_PREFIX=/usr \
39 -DX11_Xmu_LIB="$LIBS/libXmu.so" \
40 -DX11_Xft_INCLUDE_PATH=$INCL \
41 -DX11_Xmu_INCLUDE_PATH=$INCL \
42 -DUSE_PAM=no \
43 .. &&
44 make &&
45 make DESTDIR=$DESTDIR install || exit 1
47 cd $src-pam/build
48 cmake \
49 -DCMAKE_INSTALL_PREFIX=/usr \
50 -DX11_Xmu_LIB="$LIBS/libXmu.so" \
51 -DX11_Xft_INCLUDE_PATH=$INCL \
52 -DX11_Xmu_INCLUDE_PATH=$INCL \
53 -DUSE_PAM=yes \
54 .. &&
55 make &&
56 make DESTDIR=$DESTDIR-pam install || exit 1
58 for inst in $install $install-pam ; do
59 cp -r $stuff/themes $inst/usr/share/slim
61 # Config file and rc script.
62 cp -a $stuff/etc $inst
64 # slim-theme manager & default strings
65 install -m755 $stuff/slim-theme $inst/usr/bin/slim-theme
66 install -m644 $stuff/strings $inst/usr/share/slim/strings
68 chown -R root:root $inst
69 done
70 }
72 # Rules to gen a SliTaz package suitable for Tazpkg.
73 genpkg_rules() {
74 case $PACKAGE in
75 slim-theme-default)
76 CAT="customization|default theme bundled with SLiM"
77 copy default/
78 DEPENDS="slim slitaz-configs-base"
79 ;;
80 slim)
81 copy @std
82 remove_already_packed
83 DEPENDS="fontconfig freetype libjpeg-turbo libpng16 xorg-libX11 \
84 xorg-libXft xorg-libXmu xorg-libXrender zlib"
85 CONFIG_FILES="/etc/slim.conf"
86 SUGGESTED="slim-theme-default slitaz-configs"
87 ;;
88 slim-pam)
89 install=$install-pam copy @std
90 rm -rf $fs/usr/share/slim/themes/default
91 DEPENDS="fontconfig freetype libjpeg-turbo libpng16 xorg-libX11 \
92 xorg-libXft xorg-libXmu xorg-libXrender zlib pam"
93 CONFIG_FILES="/etc/slim.conf"
94 SUGGESTED="slim-theme-default slitaz-configs"
95 PROVIDE="slim:pam"
96 CAT="x-window|(PAM enabled)"
97 ;;
98 esac
99 }
101 post_install_slim() {
102 local USER=$(awk -F: '/:1000:1000:/ { print $1 }' "$1/etc/passwd")
103 [ -n "$USER" ] &&
104 sed -i s/"default_user .*"/"default_user $USER"/ "$1/etc/slim.conf"
105 sed -i 's|>/tmp/X-output||' "$1/etc/slim.conf"
106 }
108 post_install_slim_pam() {
109 local USER=$(awk -F: '/:1000:1000:/ { print $1 }' "$1/etc/passwd")
110 [ -n "$USER" ] &&
111 sed -i s/"default_user .*"/"default_user $USER"/ "$1/etc/slim.conf"
112 sed -i 's|>/tmp/X-output||' "$1/etc/slim.conf"
113 }
115 post_install_slim_theme_default() {
116 chroot "$1/" slim-theme -sdefault
117 }
119 pre_remove_slim_theme_default() {
120 chroot "$1/" slim-theme -fdefault
121 }