# HG changeset patch # User Aleksej Bobylev # Date 1510043892 -7200 # Node ID 75b330dd273463fe347dc9e0899e57850c2cbec1 # Parent 8190be7ad294e27980f87328374fad5b03af7657 Properly handle EXTRAVERSION diff -r 8190be7ad294 -r 75b330dd2734 cook --- a/cook Mon Nov 06 02:53:05 2017 +0200 +++ b/cook Tue Nov 07 10:38:12 2017 +0200 @@ -131,6 +131,20 @@ # Paths used in receipt and by cook itself. set_paths() { + # Kernel version is set from wok/linux or installed/linux-api-headers(wok-undigest) + if [ -f "$WOK/linux/receipt" ]; then + kvers=$(. $WOK/linux/receipt; echo $VERSION) + kbasevers=$(echo $kvers | cut -d. -f1,2) + elif [ -f "$INSTALLED/linux-api-headers/receipt" ]; then + kvers=$(. $INSTALLED/linux-api-headers/receipt; echo $VERSION) + kbasevers=$(echo $kvers | cut -d. -f1,2) + fi + + # Python version + [ -f "$WOK/python/receipt" ] && pyvers=$(. $WOK/python/receipt; echo $VERSION) + # Perl version for some packages needed it + [ -f "$WOK/perl/receipt" ] && perlvers=$(. $WOK/perl/receipt; echo $VERSION) + pkgdir="$WOK/$pkg" . "$pkgdir/receipt" basesrc="$pkgdir/source" @@ -156,20 +170,6 @@ [ -n "$SOURCE" ] && source_stuff="$WOK/$SOURCE/stuff" - # Kernel version is set from wok/linux or installed/linux-api-headers(wok-undigest) - if [ -f "$WOK/linux/receipt" ]; then - kvers=$(. $WOK/linux/receipt; echo $VERSION) - kbasevers=$(echo $kvers | cut -d. -f1,2) - elif [ -f "$INSTALLED/linux-api-headers/receipt" ]; then - kvers=$(. $INSTALLED/linux-api-headers/receipt; echo $VERSION) - kbasevers=$(echo $kvers | cut -d. -f1,2) - fi - - # Python version - [ -f "$WOK/python/receipt" ] && pyvers=$(. $WOK/python/receipt; echo $VERSION) - # Perl version for some packages needed it - [ -f "$WOK/perl/receipt" ] && perlvers=$(. $WOK/perl/receipt; echo $VERSION) - # Old way compatibility. _pkg="$install" } @@ -341,7 +341,7 @@ [ -d $WOK/$pkg/source ] && srcdir=$(du -sh $WOK/$pkg/source | awk '{print $1}' 2>/dev/null) [ -n "$TARBALL" ] && srcsize=$(du -sh $SRC/$TARBALL | awk '{print $1}') - _ 'Summary for: %s' "$PACKAGE $VERSION" + _ 'Summary for: %s' "$PACKAGE $VERSION$EXTRAVERSION" separator # L10n: keep the same width of translations to get a consistent view @@ -358,10 +358,10 @@ separator - pkgi=1 for i in $(all_names); do - fs=$(du -sh $WOK/$pkg/taz/$i-$VERSION | awk '{print $1}') - pkgname="$i-$VERSION.tazpkg" + fs=$(du -sh $WOK/$pkg/taz/$i-$VERSION$EXTRAVERSION | awk '{print $1}') + pkgname="$i-$VERSION$EXTRAVERSION.tazpkg" size=$(ls -lh $PKGS/$pkgname | awk '{print $5}') - files=$(wc -l < $WOK/$pkg/taz/$i-$VERSION/files.list) + files=$(wc -l < $WOK/$pkg/taz/$i-$VERSION$EXTRAVERSION/files.list) printf "%2d : %7s : %10s : %5s : %s\n" "$pkgi" "$fs" "$size" "$files" "$pkgname" pkgi=$((pkgi + 1)) done @@ -1356,7 +1356,7 @@ /\/share\/bash-completion\//d; /\/lib\/systemd\//d; /\/fonts\.scale$/d; /\/fonts\.dir$/d; /\/share\/appdata\//d; /\/share\/help\//d; - /\/share\/icons\/hicolor\/[1236][245][68]*x[1236][245][68]*\//d; # 22, 24, 32, 64, 128, 256 + /\/share\/icons\/hicolor\/[12356][1245][268]*x[12356][1245][268]*\//d; # 22, 24, 32, 64, 128, 256, 512 ' $filelist ;; @dev) @@ -1392,9 +1392,9 @@ @std) while read j; do case $j in - # always skip empty man folders, because this will end up - # copying all the man pages to the package - */man/*) continue;; + # always skip empty man & doc folders, because this will end up + # copying all the man pages and docs to the package + */man/*|*/doc/*) continue;; esac [ -z "$(ls -A "$install$j")" ] || continue # directory $j is empty diff -r 8190be7ad294 -r 75b330dd2734 lighttpd/index.cgi --- a/lighttpd/index.cgi Mon Nov 06 02:53:05 2017 +0200 +++ b/lighttpd/index.cgi Tue Nov 07 10:38:12 2017 +0200 @@ -684,13 +684,22 @@ echo '
' echo "receipt & stuff" + # In the receipts $EXTRAVERSION is defined using $kvers, get it here [copy from 'cook' set_paths()] + if [ -f "$wok/linux/receipt" ]; then + kvers=$(. $wok/linux/receipt; echo $VERSION) + kbasevers=$(echo $kvers | cut -d. -f1,2) + elif [ -f "$INSTALLED/linux-api-headers/receipt" ]; then + kvers=$(. $INSTALLED/linux-api-headers/receipt; echo $VERSION) + kbasevers=$(echo $kvers | cut -d. -f1,2) + fi + unset WEB_SITE WANTED . $wok/$pkg/receipt [ -n "$WEB_SITE" ] && echo "web site" - [ -f "$wok/$pkg/taz/$PACKAGE-$VERSION/receipt" ] && + [ -f "$wok/$pkg/taz/$PACKAGE-$VERSION$EXTRAVERSION/receipt" ] && echo "files" [ -n "$(ls $wok/$pkg/description*.txt)" ] && diff -r 8190be7ad294 -r 75b330dd2734 modules/deps --- a/modules/deps Mon Nov 06 02:53:05 2017 +0200 +++ b/modules/deps Tue Nov 07 10:38:12 2017 +0200 @@ -173,6 +173,7 @@ s("xfconf", "libxfconf"); s("xfconf-dev", "libxfconf-dev"); s("exo", "libexo"); s("exo-dev", "libexo-dev"); s("gconf", "GConf"); s("gconf-dev", "GConf-dev"); + s("pulseaudio", "apulse"); # if called with "--incl": show all deps including glibc-base, # gcc-lib-base, glibc-dev and gcc; otherwise hide them diff -r 8190be7ad294 -r 75b330dd2734 modules/mk_pkg_receipt --- a/modules/mk_pkg_receipt Mon Nov 06 02:53:05 2017 +0200 +++ b/modules/mk_pkg_receipt Tue Nov 07 10:38:12 2017 +0200 @@ -17,10 +17,11 @@ [ "${signature:0:1}" == '#' ] || signature='# SliTaz package receipt.' save="$(mktemp)" +# `$(echo ...)`: normalize whitespace (space, tab, newline and they combinations and repeats) cat > $save <