wok annotate eggwm/receipt @ rev 24497
Add some current_version
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sat Feb 19 14:19:02 2022 +0000 (2022-02-19) |
parents | 20661c276bcf |
children | e1e1678c5265 |
rev | line source |
---|---|
pankso@16372 | 1 # SliTaz package receipt. |
pankso@16372 | 2 |
pankso@16372 | 3 PACKAGE="eggwm" |
pankso@16372 | 4 VERSION="0.2" |
pankso@16372 | 5 CATEGORY="x-window" |
pankso@16372 | 6 SHORT_DESC="EggWM is a light QT Window Manager." |
pankso@16372 | 7 MAINTAINER="pankso@slitaz.org" |
pankso@16372 | 8 LICENSE="GPL3" |
pankso@16372 | 9 TARBALL="$PACKAGE-$VERSION.tar.gz" |
pascal@20682 | 10 WEB_SITE="https://github.com/JoseExposito/eggwm" |
pankso@16372 | 11 WGET_URL="http://eggwm.googlecode.com/files/$TARBALL" |
pankso@16372 | 12 |
pankso@16372 | 13 DEPENDS="xorg-libX11 libQtCore libQtGui" |
pankso@16372 | 14 BUILD_DEPENDS="qmake Qt4-dev" |
pankso@16372 | 15 |
pascal@24497 | 16 # What is the latest version available today? |
pascal@24497 | 17 current_version() |
pascal@24497 | 18 { |
pascal@24497 | 19 wget -O - $WEB_SITE/commits/master 2>/dev/null | \ |
pascal@24497 | 20 sed '/commits_list_item/!d;s|.*commits/\(.......\).*|\1|;q' |
pascal@24497 | 21 } |
pascal@24497 | 22 |
pankso@16372 | 23 # Rules to configure and make the package. |
pankso@16372 | 24 compile_rules() |
pankso@16372 | 25 { |
pankso@16372 | 26 qmake EggWM.pro && |
pankso@16372 | 27 make && |
pankso@16372 | 28 make install INSTALL_ROOT=$DESTDIR |
pankso@16372 | 29 } |
pankso@16372 | 30 |
pankso@16372 | 31 # Rules to gen a SliTaz package suitable for Tazpkg. |
pankso@16372 | 32 genpkg_rules() |
pankso@16372 | 33 { |
pankso@16372 | 34 mkdir -p $fs/usr/bin $fs/usr/share |
pankso@16372 | 35 install -m 755 $src/eggwm $fs/usr/bin/eggwm |
pankso@16372 | 36 cp -a $src/installation $fs/usr/share/eggwm |
pankso@16372 | 37 rm -rf $fs/usr/share/eggwm/themes/testtheme |
pankso@16372 | 38 find $fs/usr/share/eggwm -type f -exec chmod 0644 {} \; |
pankso@16372 | 39 cp -r $stuff/xsessions $fs/usr/share |
pankso@16372 | 40 } |
pankso@16372 | 41 |
pankso@16372 | 42 post_install() |
pankso@16372 | 43 { |
pankso@16372 | 44 res=$(cat $root/etc/slim.conf | grep ^session | sed s/"sessions. *"//) |
pankso@16372 | 45 # Adding WM to SLIM available sessions. |
pankso@16372 | 46 if ! echo "$res" | grep -q $PACKAGE; then |
pascal@20319 | 47 echo |
pankso@16372 | 48 echo -n "Adding $PACKAGE to /etc/slim.conf..." |
pankso@16372 | 49 sed -i "s/^sessions.*/sessions ${res},$PACKAGE/" $root/etc/slim.conf |
pankso@16372 | 50 status |
pankso@16372 | 51 fi |
pankso@16372 | 52 } |
pankso@16372 | 53 |
pankso@16372 | 54 post_remove() |
pankso@16372 | 55 { |
pankso@16372 | 56 # Remove WM from SLIM available sessions. |
pascal@18730 | 57 if grep -q $PACKAGE "$1/etc/slim.conf"; then |
pascal@18730 | 58 sed -i s/,$PACKAGE// "$1/etc/slim.conf" |
pankso@16372 | 59 fi |
pankso@16372 | 60 } |