wok-current view slim/receipt @ rev 25685
Add checkspace / fetchall feature for tazpkg
author | Stanislas Leduc <shann@slitaz.org> |
---|---|
date | Thu Mar 14 20:28:39 2024 +0000 (8 months ago) |
parents | ca6fa52862c9 |
children |
line source
1 # SliTaz package receipt.
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://www.berlios.de/software/slim/"
10 REPOLOGY="slim-login-manager"
12 TARBALL="$PACKAGE-$VERSION.tar.gz"
13 WGET_URL="https://github.com/iwamatsu/$PACKAGE/archive/refs/tags/v$VERSION.tar.gz"
15 RELATED="slim-pam slim-theme-default"
16 SUGGESTED="slim-theme-default slitaz-configs"
17 DEPENDS="gcc-lib-base libjpeg libpng xorg-libXft xorg-libXmu"
18 BUILD_DEPENDS="freetype-dev jpeg-dev libpng-dev xorg-libXft-dev xorg-libXmu-dev"
20 CONFIG_FILES="/etc/slim.conf"
22 COOKOPTS="!pngquant op8"
24 HOST_ARCH="i486 arm"
26 # @maintainer: Please update also slim-pam and slim-theme-default
28 # Handle cross compilation
29 case "$ARCH" in
30 (i?86)
31 BUILD_DEPENDS="$BUILD_DEPENDS cmake"
32 INCL=/usr/include
33 LIBS=/usr/lib
34 ;;
35 (arm*)
36 INCL=/cross/$ARCH/sysroot/usr/include
37 LIBS=/cross/$ARCH/sysroot/usr/lib
38 ;;
39 esac
41 current_version()
42 {
43 wget -O - https://github.com/iwamatsu/slim/tags 2>/dev/null | \
44 sed '/archive.*tar/!d;s|.*/v*\(.*\).tar.*|\1|;q'
45 }
47 # Rules to configure and make the package.
48 compile_rules()
49 {
50 patch --input=$stuff/patches/app.cpp-$VERSION || return 1
51 patch --input=$stuff/patches/cfg.cpp-$VERSION || return 1
52 patch --input=$stuff/patches/slim.conf-$VERSION || return 1
54 # do NOT build slimlock
55 sed -i -e '/install(TARGETS slimlock/d' CMakeLists.txt
57 mkdir _build &&
58 cd _build &&
59 cmake .. \
60 -D CMAKE_INSTALL_PREFIX=/usr \
61 -D X11_Xmu_LIB="$LIBS/libXmu.so" \
62 -D X11_Xft_INCLUDE_PATH=${INCL} \
63 -D X11_Xmu_INCLUDE_PATH=${INCL} \
64 -Wno-dev &&
65 make &&
66 make install DESTDIR=$DESTDIR
67 }
69 # Rules to gen a SliTaz package suitable for Tazpkg.
70 genpkg_rules()
71 {
72 mkdir -p $fs/usr/share/slim
74 cp -a $install/etc $fs
75 cp -a $install/usr/bin $fs/usr
76 cp -a $install/usr/lib $fs/usr
77 cp -a $stuff/themes $fs/usr/share/slim
79 # rc script.
80 cp -a $stuff/etc $fs
81 chown -R root.root $fs
83 # slim-theme manager and default strings
84 install -m755 $stuff/slim-theme $fs/usr/bin/slim-theme
85 install -m644 $stuff/strings $fs/usr/share/slim/strings
86 }
88 post_install()
89 {
90 # replace default user tux by user with userid 1000 in slim.conf
91 local USER
92 USER=$(awk -F: '/:1000:1000:/ { print $1 }' < "$1/etc/passwd")
93 [ -n "$USER" ] &&
94 sed -i s/"default_user .*"/"default_user $USER"/ "$1/etc/slim.conf"
95 sed -i 's|>/tmp/X-output||' "$1/etc/slim.conf"
96 }
98 testsuite()
99 {
100 readelf -h $install/usr/bin/slim
101 }