wok-next view slim/receipt @ rev 20289

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