wok-current rev 24727

cookutils: add repo-cooking (used by tank)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Tue Mar 15 10:59:31 2022 +0000 (2022-03-15)
parents 798acb92d4d5
children 59547e97954f
files blender/receipt cookutils/stuff/repo-cooking coreutils-file-special/receipt dsh/receipt emacs-pkg-po-mode/receipt freeradius-dialupadmin/receipt fritzing/receipt fzy/receipt gst-omx/receipt kivy/receipt kompozer/receipt lyx-locales/receipt
line diff
     1.1 --- a/blender/receipt	Tue Mar 15 11:15:30 2022 +0100
     1.2 +++ b/blender/receipt	Tue Mar 15 10:59:31 2022 +0000
     1.3 @@ -6,7 +6,7 @@
     1.4  TAGS="3D creator editor"
     1.5  SHORT_DESC="3D content creation suite."
     1.6  MAINTAINER="pankso@slitaz.org"
     1.7 -LICENSE="GPL"
     1.8 +LICENSE="GPL2 GPL3"
     1.9  WEB_SITE="https://www.blender.org/"
    1.10  
    1.11  TARBALL="$PACKAGE-$VERSION.tar.xz"
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/cookutils/stuff/repo-cooking	Tue Mar 15 10:59:31 2022 +0000
     2.3 @@ -0,0 +1,216 @@
     2.4 +#!/bin/sh
     2.5 +
     2.6 +# Make repo.json for Repology using SliTaz Cooking packages
     2.7 +# Aleksey Bobylev <al.bobylev@gmail.com>
     2.8 +#
     2.9 +# 2018-08-11: initial, working on my localhost
    2.10 +# 2018-09-04: fix paths for use at Tank
    2.11 +# 2018-09-08: fix space in src, fix md5sum when EXTRAVERSION used, skip empty src, skip broken, store log
    2.12 +# 2019-01-15: block parallel execution
    2.13 +# 2019-01-23: drop duplicate lines in DB (if any), discard empty repo.json, use absolute paths
    2.14 +
    2.15 +mirror='/home/slitaz/packages'
    2.16 +local_repo='/home/slitaz/wok-hg'
    2.17 +
    2.18 +my_log="/home/slitaz/log/repo-cooking.$(date '+%Y%m%d_%H%M%S')"
    2.19 +block='/home/slitaz/log/repo-cooking.block'
    2.20 +
    2.21 +local_bin=/root/bin
    2.22 +
    2.23 +# packages.info
    2.24 +#  1: name
    2.25 +#  2: version
    2.26 +#  3: category
    2.27 +#  4: short description
    2.28 +#  5: home
    2.29 +#  6: tags
    2.30 +#  7: size_packed size_unpacked
    2.31 +#  8: dependencies
    2.32 +#  9: checksum
    2.33 +# 10: maintainer
    2.34 +# 11: license
    2.35 +# 12: src URL
    2.36 +# 13: wanted
    2.37 +# 14: build dependencies
    2.38 +# 15: package md5sum
    2.39 +# 16: version without extraversion
    2.40 +
    2.41 +timestamp1=$(date '+%s')
    2.42 +date_for_json=$(date '+%F %T')
    2.43 +
    2.44 +if [ -e "$block" ]; then
    2.45 +	echo "$0 already executed. Exit" | tee "$my_log"
    2.46 +	exit 1
    2.47 +fi
    2.48 +touch "$block"
    2.49 +
    2.50 +ls ${my_log%.*}* | sed '1,10d;s|.*|rm -f &|' | sh    # keep only 10 log files
    2.51 +
    2.52 +
    2.53 +tempd=$(mktemp -d)
    2.54 +
    2.55 +sort -u $mirror/packages.info > $tempd/packages.info # drop duplicate lines
    2.56 +sort -u $mirror/packages.md5  > $tempd/packages.md5  #
    2.57 +
    2.58 +# get base settings
    2.59 +c_version=$(awk -F$'\t' -vp='cookutils' '{if ($1 == p) {print $2; exit}}' $tempd/packages.info) #'
    2.60 +cp $mirror/cookutils-$c_version.tazpkg $tempd/
    2.61 +
    2.62 +cd $tempd
    2.63 +tazpkg extract $tempd/cookutils-$c_version.tazpkg 2>/dev/null >&2
    2.64 +cp $tempd/cookutils-$c_version/fs/etc/slitaz/cook.conf $tempd/
    2.65 +rm $tempd/cookutils-$c_version.tazpkg
    2.66 +rm -r $tempd/cookutils-$c_version/
    2.67 +
    2.68 +# define some useful variables
    2.69 +. $tempd/cook.conf
    2.70 +
    2.71 +
    2.72 +ls $local_repo \
    2.73 +| while read pkg_i; do
    2.74 +	i=$(( i + 1 ))
    2.75 +	[ -f "$local_repo/$pkg_i/receipt" ] || continue
    2.76 +
    2.77 +	unset MAINTAINER LICENSE WGET_URL WANTED BUILD_DEPENDS VERSION EXTRAVERSION
    2.78 +
    2.79 +	case $i in
    2.80 +		*00) echo $i;;
    2.81 +		*0)  echo -n $i;;
    2.82 +	esac
    2.83 +	echo -n '.'
    2.84 +
    2.85 +	. "$local_repo/$pkg_i/receipt"
    2.86 +
    2.87 +	MAINTAINER=$(echo $MAINTAINER | sed 's|.*<||; s|>||')
    2.88 +
    2.89 +	LICENSE=$(echo $LICENSE)
    2.90 +
    2.91 +	WGET_URL=$(echo $WGET_URL | sed 's#^git|git#git#; s#^git|https*#git#; s#^svn|https*#svn#; s#^subversion|svn#svn#; s#^subversion|https*#svn#; s#^svn|svn#svn#; s#^hg|#hg://#; s#^mercurial|#hg://#; s#^bzr|#bzr://#; s#^cvs|#cvs://#')
    2.92 +
    2.93 +	WANTED=$(echo $WANTED)
    2.94 +	case $pkg_i in
    2.95 +		locale-*-extra) WANTED='slitaz-i18n-extra';;
    2.96 +		locale-*)       WANTED='slitaz-i18n';;
    2.97 +	esac
    2.98 +
    2.99 +	BUILD_DEPENDS=$(echo $BUILD_DEPENDS)
   2.100 +
   2.101 +	MD5SUM="$(fgrep "  $pkg_i-$VERSION" $tempd/packages.md5 | cut -d' ' -f1)"
   2.102 +	if [ $(echo "$MD5SUM" | wc -l) -ne 1 ]; then
   2.103 +		echo "$pkg_i: error: multiple md5sum" >>$my_log
   2.104 +	fi
   2.105 +
   2.106 +	sed -i "/^$pkg_i	/ s|$|	$MAINTAINER	$LICENSE	$WGET_URL	$WANTED	$BUILD_DEPENDS	$MD5SUM	$VERSION|" $tempd/packages.info
   2.107 +done
   2.108 +echo
   2.109 +echo
   2.110 +
   2.111 +timestamp2=$(date '+%s')
   2.112 +echo "Stage 1:  $(( timestamp2 - timestamp1 )) s" >>$my_log
   2.113 +echo "Packages: $(wc -l ./packages.info)" >>$my_log
   2.114 +echo >>$my_log
   2.115 +
   2.116 +
   2.117 +
   2.118 +{
   2.119 +	echo '{"repo":"SliTaz Cooking","date":"'$date_for_json'","items":['
   2.120 +
   2.121 +	comma_up=''
   2.122 +
   2.123 +	{ ls $local_repo; echo '@the_end@'; } \
   2.124 +	| while read pkg_i; do
   2.125 +		echo "$pkg_i" >&2
   2.126 +
   2.127 +		case $pkg_i in
   2.128 +			@the_end@) echo ']}'; break;;
   2.129 +			get-*)     continue;;
   2.130 +		esac
   2.131 +
   2.132 +		pkg_line=$(sed -n "/^$pkg_i	/p" $tempd/packages.info)
   2.133 +
   2.134 +		wanted=$(echo "$pkg_line" | cut -d$'\t' -f 13)
   2.135 +		[ -z "$wanted" ] || continue
   2.136 +
   2.137 +		echo "$pkg_i" >> $tempd/packages.txt
   2.138 +
   2.139 +		ver=$(       echo "$pkg_line" | cut -d$'\t' -f 16)
   2.140 +		home=$(      echo "$pkg_line" | cut -d$'\t' -f 5)
   2.141 +		maintainer=$(echo "$pkg_line" | cut -d$'\t' -f 10)
   2.142 +		license=$(   echo "$pkg_line" | cut -d$'\t' -f 11 | sed 's| |","|g')
   2.143 +		if [ -z "$license" ]; then
   2.144 +			echo "$pkg_i: license is empty" >>$my_log
   2.145 +			license='unknown'
   2.146 +		fi
   2.147 +		src=$(       echo "$pkg_line" | cut -d$'\t' -f 12 | sed 's| .*||')
   2.148 +		bdeps=$(     echo "$pkg_line" | cut -d$'\t' -f 14 | sed 's| |","|g')
   2.149 +
   2.150 +		# skip
   2.151 +		if [ -z "$ver" ]; then
   2.152 +			echo "$pkg_i: ver empty, skip" >>$my_log
   2.153 +			continue
   2.154 +		fi
   2.155 +
   2.156 +		echo "$comma_up{\"meta\":\"$pkg_i\", \"ver\":\"$ver\", \"maintainer\":\"$maintainer\", \"home\":\"$home\", \"license\":[\"$license\"]"
   2.157 +
   2.158 +		[ -z "$src"   ] || echo ", \"src\":\"$src\""
   2.159 +		[ -z "$bdeps" ] || echo ", \"bdeps\":[\"$bdeps\"]"
   2.160 +
   2.161 +		echo ", \"pkgs\":["
   2.162 +
   2.163 +		comma_up=','
   2.164 +		comma=''
   2.165 +
   2.166 +		want=$(awk -F$'\t' -vp="$pkg_i" '{if ($13 == p) {print $1}}' $tempd/packages.info) #'
   2.167 +		for pkg_j in $pkg_i $want; do
   2.168 +			echo "  - $pkg_j" >> $tempd/packages.txt
   2.169 +
   2.170 +			pkg_line=$(sed -n "/^$pkg_j	/p" $tempd/packages.info)
   2.171 +
   2.172 +			echo $comma; comma=','
   2.173 +
   2.174 +			ver_sub=$(echo "$pkg_line" | cut -d$'\t' -f 16)
   2.175 +			if [ "$ver" != "$ver_sub" ]; then
   2.176 +				echo "$pkg_i > $pkg_j: version mismatch '$ver' -> '$ver_sub'" >>$my_log
   2.177 +			fi
   2.178 +
   2.179 +			ver_ext=$(       echo "$pkg_line" | cut -d$'\t' -f 2)
   2.180 +			cat=$(           echo "$pkg_line" | cut -d$'\t' -f 3)
   2.181 +			desc=$(          echo "$pkg_line" | cut -d$'\t' -f 4 | sed 's|"|\\"|g')
   2.182 +			tags=$(          echo "$pkg_line" | cut -d$'\t' -f 6 | sed 's| |","|g')
   2.183 +			pkg_size=$(      echo "$pkg_line" | cut -d$'\t' -f 7 | cut -d' ' -f1)
   2.184 +			installed_size=$(echo "$pkg_line" | cut -d$'\t' -f 7 | cut -d' ' -f2)
   2.185 +			deps=$(          echo "$pkg_line" | cut -d$'\t' -f 8 | sed 's| |","|g')
   2.186 +			pkg_md5sum=$(    echo "$pkg_line" | cut -d$'\t' -f 15)
   2.187 +
   2.188 +			echo "{\"name\":\"$pkg_j\", \"cat\":\"$cat\", \"desc\":\"$desc\""
   2.189 +
   2.190 +			[ -z "$tags" ] || echo ",\"tags\":[\"$tags\"]"
   2.191 +
   2.192 +			[ -z "$deps" ] || echo ",\"deps\":[\"$deps\"]"
   2.193 +
   2.194 +			echo ",\"pkg_size\":\"$pkg_size\", \"installed_size\":\"$installed_size\", \"pkg_md5sum\":\"$pkg_md5sum\", \"get\":\"http://mirror.slitaz.org/packages/cooking/$pkg_j-$ver_ext.tazpkg\""
   2.195 +
   2.196 +			echo '}'
   2.197 +		done
   2.198 +
   2.199 +		echo ']}'
   2.200 +	done
   2.201 +} > $tempd/repo-dirt.json
   2.202 +
   2.203 +cat $tempd/repo-dirt.json | $local_bin/jq '.' > $tempd/repo.json
   2.204 +
   2.205 +if [ -s $tempd/repo.json ]; then
   2.206 +	gzip $tempd/repo.json
   2.207 +	$local_bin/advdef -z4 $tempd/repo.json.gz
   2.208 +	mv $tempd/repo.json.gz $mirror
   2.209 +else
   2.210 +	echo "ERROR! New repo.json was discarded" >>$my_log
   2.211 +fi
   2.212 +
   2.213 +rm -rf $tempd
   2.214 +
   2.215 +timestamp3=$(date '+%s')
   2.216 +
   2.217 +echo -e "\nStage 2: $(( timestamp3 - timestamp2 )) s" >>$my_log
   2.218 +echo "Finished: $(date '+%F %T')" >>$my_log
   2.219 +rm "$block"
     3.1 --- a/coreutils-file-special/receipt	Tue Mar 15 11:15:30 2022 +0100
     3.2 +++ b/coreutils-file-special/receipt	Tue Mar 15 10:59:31 2022 +0000
     3.3 @@ -1,7 +1,7 @@
     3.4  # SliTaz package receipt.
     3.5  
     3.6  PACKAGE="coreutils-file-special"
     3.7 -VERSION="8.31"
     3.8 +VERSION="9.0"
     3.9  CATEGORY="system-tools"
    3.10  SHORT_DESC="GNU utilities that work with special file types."
    3.11  MAINTAINER="rcx@zoominternet.net"
     4.1 --- a/dsh/receipt	Tue Mar 15 11:15:30 2022 +0100
     4.2 +++ b/dsh/receipt	Tue Mar 15 10:59:31 2022 +0000
     4.3 @@ -5,7 +5,7 @@
     4.4  CATEGORY="network"
     4.5  SHORT_DESC="Wrapper for executing multiple remote shell (rsh/remsh/ssh) commands"
     4.6  MAINTAINER="pascal.bellard@slitaz.org"
     4.7 -LICENSE=""
     4.8 +LICENSE="GPL2"
     4.9  TARBALL="$PACKAGE-$VERSION.tar.gz"
    4.10  WEB_SITE="http://www.netfort.gr.jp/~dancer/software/dsh.html.en"
    4.11  WGET_URL="https://www.netfort.gr.jp/~dancer/software/downloads/$TARBALL"
     5.1 --- a/emacs-pkg-po-mode/receipt	Tue Mar 15 11:15:30 2022 +0100
     5.2 +++ b/emacs-pkg-po-mode/receipt	Tue Mar 15 10:59:31 2022 +0000
     5.3 @@ -1,7 +1,7 @@
     5.4  # SliTaz package receipt.
     5.5  
     5.6  PACKAGE="emacs-pkg-po-mode"
     5.7 -VERSION="0.19.8.1"
     5.8 +VERSION="0.21"
     5.9  CATEGORY="development"
    5.10  SHORT_DESC="An Emacs major mode for editing or modifying PO files."
    5.11  MAINTAINER="domcox@slitaz.org"
     6.1 --- a/freeradius-dialupadmin/receipt	Tue Mar 15 11:15:30 2022 +0100
     6.2 +++ b/freeradius-dialupadmin/receipt	Tue Mar 15 10:59:31 2022 +0000
     6.3 @@ -1,7 +1,7 @@
     6.4  # SliTaz package receipt.
     6.5  
     6.6  PACKAGE="freeradius-dialupadmin"
     6.7 -VERSION="3.0.20"
     6.8 +VERSION="3.0.25"
     6.9  CATEGORY="network"
    6.10  SHORT_DESC="radius server web interface"
    6.11  MAINTAINER="sdaigl@lacitec.on.ca"
     7.1 --- a/fritzing/receipt	Tue Mar 15 11:15:30 2022 +0100
     7.2 +++ b/fritzing/receipt	Tue Mar 15 10:59:31 2022 +0000
     7.3 @@ -5,7 +5,7 @@
     7.4  CATEGORY="development"
     7.5  SHORT_DESC="Electronic Design Automation software; from prototype to product."
     7.6  MAINTAINER="pankso@slitaz.org"
     7.7 -LICENSE="GPL"
     7.8 +LICENSE="GPL2 GPL3 CC-BY-SA"
     7.9  WEB_SITE="http://fritzing.org"
    7.10  
    7.11  TARBALL="$PACKAGE-$VERSION.tar.gz"
     8.1 --- a/fzy/receipt	Tue Mar 15 11:15:30 2022 +0100
     8.2 +++ b/fzy/receipt	Tue Mar 15 10:59:31 2022 +0000
     8.3 @@ -4,6 +4,7 @@
     8.4  VERSION="1.0"
     8.5  CATEGORY="utilities"
     8.6  SHORT_DESC="A fast, simple fuzzy finder."
     8.7 +LICENSE="MIT"
     8.8  MAINTAINER="paul@slitaz.org"
     8.9  WEB_SITE="https://github.com/jhawthorn/fzy"
    8.10  
     9.1 --- a/gst-omx/receipt	Tue Mar 15 11:15:30 2022 +0100
     9.2 +++ b/gst-omx/receipt	Tue Mar 15 10:59:31 2022 +0000
     9.3 @@ -5,7 +5,7 @@
     9.4  CATEGORY="system-tools"
     9.5  SHORT_DESC="GSt OpenMAX IL plugin with hw-accelerated video decoding on the R-Pi."
     9.6  MAINTAINER="pankso@slitaz.org"
     9.7 -LICENSE="GPL"
     9.8 +LICENSE="LGPL2.1"
     9.9  TARBALL="$PACKAGE-$VERSION.tar.xz"
    9.10  WEB_SITE="https://gstreamer.freedesktop.org/releases/gst-omx/1.0.0.html"
    9.11  WGET_URL="https://gstreamer.freedesktop.org/src/gst-omx/$TARBALL"
    10.1 --- a/kivy/receipt	Tue Mar 15 11:15:30 2022 +0100
    10.2 +++ b/kivy/receipt	Tue Mar 15 10:59:31 2022 +0000
    10.3 @@ -6,7 +6,7 @@
    10.4  CATEGORY="development"
    10.5  SHORT_DESC="Cross platform library for rapid development of applications."
    10.6  MAINTAINER="pascal.bellard@slitaz.org"
    10.7 -LICENSE="LGPL3"
    10.8 +LICENSE="MIT"
    10.9  WEB_SITE="https://kivy.org/"
   10.10  
   10.11  TARBALL="$SOURCE-$VERSION.tar.gz"
    11.1 --- a/kompozer/receipt	Tue Mar 15 11:15:30 2022 +0100
    11.2 +++ b/kompozer/receipt	Tue Mar 15 10:59:31 2022 +0000
    11.3 @@ -5,7 +5,7 @@
    11.4  CATEGORY="network"
    11.5  SHORT_DESC="KompoZer is a complete web authoring system."
    11.6  MAINTAINER="maintainer@slitaz.org"
    11.7 -LICENSE="MPL"
    11.8 +LICENSE="MPL1.1"
    11.9  WEB_SITE="http://kompozer.net"
   11.10  
   11.11  TARBALL="$PACKAGE-$VERSION-src.tar.bz2"
    12.1 --- a/lyx-locales/receipt	Tue Mar 15 11:15:30 2022 +0100
    12.2 +++ b/lyx-locales/receipt	Tue Mar 15 10:59:31 2022 +0000
    12.3 @@ -1,7 +1,7 @@
    12.4  # SliTaz package receipt.
    12.5  
    12.6  PACKAGE="lyx-locales"
    12.7 -VERSION="2.3.4.4"
    12.8 +VERSION="2.3.6.1"
    12.9  CATEGORY="localization"
   12.10  SHORT_DESC="Locale files for LyX."
   12.11  MAINTAINER="al.bobylev@gmail.com"