wok-current rev 22986
cookutils: add check-wok
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sun Mar 01 12:47:04 2020 +0100 (2020-03-01) |
parents | bdf17c87ad31 |
children | 5e709d3fb59d |
files | cookutils/receipt cookutils/stuff/check-wok |
line diff
1.1 --- a/cookutils/receipt Sun Mar 01 10:23:30 2020 +0100 1.2 +++ b/cookutils/receipt Sun Mar 01 12:47:04 2020 +0100 1.3 @@ -34,6 +34,8 @@ 1.4 { 1.5 mkdir -p $fs 1.6 cp -a $install/* $fs 1.7 + cp $stuff/check-wok $fs/usr/bin 1.8 + chmod 755 $fs/usr/bin/check-wok 1.9 #Symlink cooker to busybox httpd server root 1.10 cd $fs/var/www 1.11 ln -s cgi-bin/cooker
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 2.2 +++ b/cookutils/stuff/check-wok Sun Mar 01 12:47:04 2020 +0100 2.3 @@ -0,0 +1,71 @@ 2.4 +#!/bin/sh 2.5 + 2.6 +renice -n 1 -p $$ 2.7 +WOK=${1:-/home/slitaz/wok} 2.8 + 2.9 +for i in $WOK/*/receipt ; do 2.10 + pkg=$(basename ${i%/receipt}) 2.11 + echo -en "\r$pkg \r" 1>&2 2.12 + unset PACKAGE WANTED SHORT_DESC DEPENDS BUILD_DEPENDS SUGGESTED 2.13 + unset CATEGORY VERSION WEB_SITE TARBALL WGET_URL 2.14 + . $i 2.15 + [ "$pkg" == "$PACKAGE" ] || echo "$pkg: PACKAGE=$PACKAGE " 2.16 + [ -n "$SHORT_DESC" ] || echo "$pkg: no SHORT_DESC " 2.17 + [ -n "$WEB_SITE" ] || echo "$pkg: no WEB_SITE " 2.18 + [ -n "$CATEGORY" ] || echo "$pkg: no CATEGORY " 2.19 + if grep -qs '^compile_rules()$' "$i" && [ -z "$WANTED" ] && 2.20 + [ "$CATEGORY" != "meta" ] && [ ! -d $(dirname "$i")/stuff ]; then 2.21 + [ -z "$TARBALL" ] && echo "$pkg: no TARBALL " 2.22 + [ -z "$WGET_URL" ] && echo "$pkg: no WGET_URL " 2.23 + fi 2.24 + [ -d $i/stuff ] && ! grep -q stuff $i/receipt && echo "$pkg: ? stuff " 2.25 + . $WOK/../slitaz-base-files/rootfs/etc/slitaz/slitaz.conf 2.26 + case " $(echo $PKGS_CATEGORIES | xargs echo) " in 2.27 + *\ $CATEGORY\ *) ;; 2.28 + *) echo "$pkg: bad CATEGORY $CATEGORY " ;; 2.29 + esac 2.30 +false && 2.31 + case "$PACKAGE" in 2.32 + *-dev) case " $DEPENDS " in 2.33 + *\ ${PACKAGE%-dev}\ *) ;; 2.34 + *) echo "$pkg: no dep ${PACKAGE%-dev}" 2.35 + esac ;; 2.36 + esac 2.37 + [ -n "$VERSION" ] || echo "$pkg: no VERSION " 2.38 + for j in $DEPENDS ; do 2.39 + [ -s $WOK/$j/receipt ] && continue 2.40 + [ -s /hg/wok/$j/receipt ] && continue 2.41 + [ -s $WOK/get-$j/receipt ] && continue 2.42 + grep -s "^PROVIDE=" $WOK/*/receipt | grep -q "[\" ]$j[\" ]" && continue 2.43 + echo "$pkg: no dep $j " 2.44 + done 2.45 + for j in $BUILD_DEPENDS ; do 2.46 + [ -s $WOK/$j/receipt ] && continue 2.47 + [ -s /hg/wok/$j/receipt ] && continue 2.48 + [ -s $WOK/get-$j/receipt ] && continue 2.49 + grep -s "^PROVIDE=" $WOK/*/receipt | grep -q "[\" ]$j[\" ]" && continue 2.50 + [ ! -s $WOK/$j/receipt ] && 2.51 + grep -qs -- '-dev)' $WOK/${j%-dev}/receipt && continue 2.52 + echo "$pkg: no bdep $j " 2.53 + done 2.54 + for j in $SUGGESTED ; do 2.55 + [ -s $WOK/$j/receipt ] && continue 2.56 + [ -s /hg/wok/$j/receipt ] && continue 2.57 + [ -s $WOK/get-$j/receipt ] && continue 2.58 + grep -s "^PROVIDE=" $WOK/*/receipt | grep -q "[\" ]$j[\" ]" && continue 2.59 + echo "$pkg: no sugg $j " 2.60 + done 2.61 + [ $(echo $WANTED | wc -w) -eq 1 ] && 2.62 + for j in $WANTED ; do 2.63 + [ -s $WOK/$j/receipt ] || echo -e "\r$pkg: no wanted $j " 2.64 + WANVER="$(unset VERSION; . $WOK/$j/receipt; echo $VERSION)" 2.65 + [ "$VERSION" == "$WANVER" ] || echo "$pkg: wanted $j version $WANVER, not $VERSION " 2.66 + done 2.67 +done 2.68 +echo " " 1>&2 2.69 +for i in $(grep -l current_version $WOK/*/receipt); do 2.70 + . $i 2.71 + new="$(current_version)" 2.72 + [ "$new" != "$VERSION" -a ${#new} -gt 0 -a ${#new} -lt 20 ] && 2.73 + echo "$PACKAGE: $VERSION -> $new" 2.74 +done