wok view lightdm-gtk2-greeter/receipt @ rev 24434

Add some current_version
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sat Feb 12 19:02:42 2022 +0000 (2022-02-12)
parents 9e01bc6321ea
children
line source
1 # SliTaz package receipt.
3 PACKAGE="lightdm-gtk2-greeter"
4 VERSION="1.5.1"
5 CATEGORY="x-window"
6 SHORT_DESC="Reference GTK+ greeter for LightDM"
7 MAINTAINER="al.bobylev@gmail.com"
8 LICENSE="GPL3"
9 WEB_SITE="https://launchpad.net/lightdm-gtk-greeter"
10 SOURCE="lightdm-gtk-greeter"
11 TARBALL="$SOURCE-$VERSION.tar.gz"
12 WGET_URL="https://launchpad.net/$SOURCE/1.6/$VERSION/+download/$TARBALL"
14 DEPENDS="gtk+ lightdm"
15 BUILD_DEPENDS="gobject-introspection-dev gtk+-dev lightdm-dev libxklavier-dev \
16 wget"
18 # What is the latest version available today?
19 current_version()
20 {
21 wget -O - $WEB_SITE 2>/dev/null | \
22 sed '/Latest version is/!d;s|.*is ||'
23 }
25 # Rules to configure and make the package.
26 compile_rules()
27 {
28 ./configure \
29 --sysconfdir=/etc \
30 --disable-static \
31 --enable-introspection \
32 --with-gtk2 \
33 $CONFIGURE_ARGS &&
34 make &&
35 make install
36 }
38 # Rules to gen a SliTaz package suitable for Tazpkg.
39 genpkg_rules()
40 {
41 mkdir -p $fs/usr/share/locale
42 cp -a $install/etc $fs
43 cp -a $install/usr/sbin $fs/usr
44 cp -a $install/usr/share/xgreeters $fs/usr/share
46 # localization
47 . $WOK/slitaz-i18n/stuff/locale-pack.conf
48 for lang in $LOCALE_PACK; do
49 langf=$install/usr/share/locale/$lang
50 [ -d $langf ] && cp -a $langf $fs/usr/share/locale
51 done
52 }
54 post_install()
55 {
56 echo 'make lightdm-gtk2-greeter default greeter'
57 sed -i 's|^# \(greeter-session =\)|\1 lightdm-gtk2-greeter #|' \
58 "$1/etc/lightdm/lightdm.conf"
59 }
61 post_remove()
62 {
63 echo 'back to default greeter'
64 sed -i 's|^\(greeter-session =\).*#\(.*\)|#\1\2|' \
65 "$1/etc/lightdm/lightdm.conf"
66 }