wok-6.x annotate slim-pam/receipt @ rev 25408

updated wget (1.20.3 -> 1.21.3)
author Hans-G?nter Theisgen
date Wed Aug 03 17:48:43 2022 +0100 (2022-08-03)
parents 9c874a5c3b17
children
rev   line source
pascal@2223 1 # SliTaz package receipt.
pascal@2223 2
pascal@2223 3 PACKAGE="slim-pam"
Hans-G?nter@25310 4 VERSION="1.3.6"
pascal@2223 5 CATEGORY="x-window"
al@14601 6 SHORT_DESC="Desktop-independent graphical login manager for X11 (PAM enabled)."
pascal@2223 7 MAINTAINER="pascal.bellard@slitaz.org"
al@14601 8 LICENSE="GPL2"
Hans-G?nter@25366 9 WEB_SITE="https://www.berlios.de/software/slim/"
Hans-G?nter@25310 10 REPOLOGY="slim-login-manager"
Hans-G?nter@25310 11
pascal@2223 12 SOURCE="slim"
pascal@2223 13 TARBALL="$SOURCE-$VERSION.tar.gz"
Hans-G?nter@25366 14 WGET_URL="https://github.com/iwamatsu/$SOURCE/archive/refs/tags/v$VERSION.tar.gz"
al@14601 15
pascal@2223 16 PROVIDE="slim:pam"
Hans-G?nter@25310 17 RELATED="slim slim-theme-default"
Hans-G?nter@25310 18 SUGGESTED="slim-theme-default slitaz-configs"
al@14601 19 DEPENDS="gcc-lib-base libjpeg libpng pam xorg-libXft xorg-libXmu"
Hans-G?nter@25310 20 BUILD_DEPENDS="cmake freetype-dev jpeg-dev libpng-dev pam-dev xorg-libXft-dev
Hans-G?nter@25310 21 xorg-libXmu-dev"
Hans-G?nter@25310 22
Hans-G?nter@25310 23 CONFIG_FILES="/etc/slim.conf"
pascal@10452 24
pascal@24353 25 # What is the latest version available today?
pascal@24353 26 current_version()
pascal@24353 27 {
pascal@24353 28 wget -O - https://sourceforge.net/projects/slim.berlios/files/ 2>/dev/null | \
pascal@24353 29 sed '/scope="row/!d;/slim-/!d;s|.*/slim-||;s|.tar.*||;q'
pascal@24353 30 }
pascal@24353 31
pascal@2223 32 # Rules to configure and make the package.
pascal@2223 33 compile_rules()
pascal@2223 34 {
Hans-G?nter@25310 35 patch --input=$WOK/$SOURCE/stuff/patches/app.cpp-$VERSION || return 1
Hans-G?nter@25310 36 patch --input=$WOK/$SOURCE/stuff/patches/cfg.cpp-$VERSION || return 1
Hans-G?nter@25310 37 patch --input=$WOK/$SOURCE/stuff/patches/slim.conf-$VERSION || return 1
Hans-G?nter@25310 38
Hans-G?nter@25310 39 mkdir _build &&
Hans-G?nter@25310 40 cd _build &&
Hans-G?nter@25310 41 cmake .. \
Hans-G?nter@25310 42 -D CMAKE_INSTALL_PREFIX=/usr \
Hans-G?nter@25310 43 -D X11_Xmu_LIB=-lXmu \
Hans-G?nter@25310 44 -D USE_PAM=yes &&
al@14601 45 make &&
Hans-G?nter@25310 46 make install DESTDIR=$DESTDIR
pascal@2223 47 }
pascal@2223 48
pascal@2223 49 # Rules to gen a SliTaz package suitable for Tazpkg.
pascal@2223 50 genpkg_rules()
pascal@2223 51 {
rcx@6055 52 mkdir -p $fs/usr/share/slim
pankso@13364 53
Hans-G?nter@25310 54 cp -a $install/etc $fs
Hans-G?nter@25310 55 cp -a $install/usr/bin $fs/usr
Hans-G?nter@25310 56 cp -a $install/usr/lib $fs/usr
Hans-G?nter@25310 57 cp -a $WOK/$SOURCE/stuff/themes $fs/usr/share/slim
Hans-G?nter@25310 58
Hans-G?nter@25366 59 # rc script.
Hans-G?nter@25310 60 cp -a $WOK/$SOURCE/stuff/etc $fs
Hans-G?nter@25310 61 chown -R root.root $fs
pascal@2223 62
al@14601 63 # slim-theme manager
al@14601 64 install -m755 $WOK/$SOURCE/stuff/slim-theme $fs/usr/bin/slim-theme
pascal@2223 65 }
pascal@2223 66
pascal@2223 67 post_install()
pascal@2223 68 {
Hans-G?nter@25366 69 # replace default user tux by user with userid 1000 in slim.conf
pascal@2223 70 local USER
pascal@18730 71 USER=$(awk -F: '/:1000:1000:/ { print $1 }' < "$1/etc/passwd")
pascal@2223 72 [ -n "$USER" ] &&
pascal@18730 73 sed -i s/"default_user .*"/"default_user $USER"/ "$1/etc/slim.conf"
al@14601 74
al@14601 75 # In order to update the SLiM, we need to restart it.
al@14601 76 # We can't just "/etc/init.d/slim restart" because it momentarily interrupts
al@14601 77 # X session and the user will get a terrible console with strange letters.
Hans-G?nter@25366 78 printf '\n%40s\n' | tr ' ' '='
al@14601 79 echo "In order to update the SLiM,"
al@14601 80 echo "please, reboot your system!"
pascal@2223 81 }
pascal@7632 82
pascal@7632 83 pre_remove()
pascal@7632 84 {
pascal@7632 85 tazpkg get-install ${PACKAGE%-pam}
pascal@7632 86 }
al@19756 87
Hans-G?nter@25310 88 testsuite()
Hans-G?nter@25310 89 {
Hans-G?nter@25366 90 readelf -h $install/usr/bin/slim
Hans-G?nter@25310 91 }