wok view cookutils/stuff/check-wok @ rev 23006

consonance: inserted LDFLAGS
author Hans-G?nter Theisgen
date Tue Mar 03 06:48:05 2020 +0100 (2020-03-03)
parents
children 2adacc364bfe
line source
1 #!/bin/sh
3 renice -n 1 -p $$
4 WOK=${1:-/home/slitaz/wok}
6 for i in $WOK/*/receipt ; do
7 pkg=$(basename ${i%/receipt})
8 echo -en "\r$pkg \r" 1>&2
9 unset PACKAGE WANTED SHORT_DESC DEPENDS BUILD_DEPENDS SUGGESTED
10 unset CATEGORY VERSION WEB_SITE TARBALL WGET_URL
11 . $i
12 [ "$pkg" == "$PACKAGE" ] || echo "$pkg: PACKAGE=$PACKAGE "
13 [ -n "$SHORT_DESC" ] || echo "$pkg: no SHORT_DESC "
14 [ -n "$WEB_SITE" ] || echo "$pkg: no WEB_SITE "
15 [ -n "$CATEGORY" ] || echo "$pkg: no CATEGORY "
16 if grep -qs '^compile_rules()$' "$i" && [ -z "$WANTED" ] &&
17 [ "$CATEGORY" != "meta" ] && [ ! -d $(dirname "$i")/stuff ]; then
18 [ -z "$TARBALL" ] && echo "$pkg: no TARBALL "
19 [ -z "$WGET_URL" ] && echo "$pkg: no WGET_URL "
20 fi
21 [ -d $i/stuff ] && ! grep -q stuff $i/receipt && echo "$pkg: ? stuff "
22 . $WOK/../slitaz-base-files/rootfs/etc/slitaz/slitaz.conf
23 case " $(echo $PKGS_CATEGORIES | xargs echo) " in
24 *\ $CATEGORY\ *) ;;
25 *) echo "$pkg: bad CATEGORY $CATEGORY " ;;
26 esac
27 false &&
28 case "$PACKAGE" in
29 *-dev) case " $DEPENDS " in
30 *\ ${PACKAGE%-dev}\ *) ;;
31 *) echo "$pkg: no dep ${PACKAGE%-dev}"
32 esac ;;
33 esac
34 [ -n "$VERSION" ] || echo "$pkg: no VERSION "
35 for j in $DEPENDS ; do
36 [ -s $WOK/$j/receipt ] && continue
37 [ -s /hg/wok/$j/receipt ] && continue
38 [ -s $WOK/get-$j/receipt ] && continue
39 grep -s "^PROVIDE=" $WOK/*/receipt | grep -q "[\" ]$j[\" ]" && continue
40 echo "$pkg: no dep $j "
41 done
42 for j in $BUILD_DEPENDS ; do
43 [ -s $WOK/$j/receipt ] && continue
44 [ -s /hg/wok/$j/receipt ] && continue
45 [ -s $WOK/get-$j/receipt ] && continue
46 grep -s "^PROVIDE=" $WOK/*/receipt | grep -q "[\" ]$j[\" ]" && continue
47 [ ! -s $WOK/$j/receipt ] &&
48 grep -qs -- '-dev)' $WOK/${j%-dev}/receipt && continue
49 echo "$pkg: no bdep $j "
50 done
51 for j in $SUGGESTED ; do
52 [ -s $WOK/$j/receipt ] && continue
53 [ -s /hg/wok/$j/receipt ] && continue
54 [ -s $WOK/get-$j/receipt ] && continue
55 grep -s "^PROVIDE=" $WOK/*/receipt | grep -q "[\" ]$j[\" ]" && continue
56 echo "$pkg: no sugg $j "
57 done
58 [ $(echo $WANTED | wc -w) -eq 1 ] &&
59 for j in $WANTED ; do
60 [ -s $WOK/$j/receipt ] || echo -e "\r$pkg: no wanted $j "
61 WANVER="$(unset VERSION; . $WOK/$j/receipt; echo $VERSION)"
62 [ "$VERSION" == "$WANVER" ] || echo "$pkg: wanted $j version $WANVER, not $VERSION "
63 done
64 done
65 echo " " 1>&2
66 for i in $(grep -l current_version $WOK/*/receipt); do
67 . $i
68 new="$(current_version)"
69 [ "$new" != "$VERSION" -a ${#new} -gt 0 -a ${#new} -lt 20 ] &&
70 echo "$PACKAGE: $VERSION -> $new"
71 done