sup rev 12

Back to 'receip' so sup and tazpkg package are same but different (sup is much more simple) and yes, this time we use: receip
author Christophe Lincoln <pankso@slitaz.org>
date Sun Feb 26 13:37:42 2017 +0100 (2017-02-26)
parents 2f6240aa30fd
children 215207fd9eeb
files libsup.sh server/sup/sup.cgi server/sup/sup.conf sup
line diff
     1.1 --- a/libsup.sh	Sun Feb 26 10:04:31 2017 +0000
     1.2 +++ b/libsup.sh	Sun Feb 26 13:37:42 2017 +0100
     1.3 @@ -56,9 +56,9 @@
     1.4  	rm -rf ${cache} && mkdir ${cache} 
     1.5  	cp ${supfile} ${cache} && cd ${cache}
     1.6  	
     1.7 -	# Get receipt for deps
     1.8 -	cpio -i receipt --quiet < ${supfile}
     1.9 -	. receipt
    1.10 +	# Get receip for deps
    1.11 +	cpio -i receip --quiet < ${supfile}
    1.12 +	. receip
    1.13  	
    1.14  	# Install sup deps || exit on missing system deps ?
    1.15  	newline
    1.16 @@ -80,13 +80,13 @@
    1.17  	log "$(gettext 'Installing package:') $pkg"
    1.18  	separator
    1.19  	
    1.20 -	# Extract and source receipt first to check deps
    1.21 +	# Extract and source receip first to check deps
    1.22  	extract_sup "$supfile"
    1.23  	
    1.24  	# Execute sup_install() in files/ tree so packages maintainers just
    1.25  	# have to dl and move files where they were in $HOME
    1.26  	cd files
    1.27 -	if grep -q "^sup_install" ../receipt; then
    1.28 +	if grep -q "^sup_install" ../receip; then
    1.29  		gettext "Executing install function:"; colorize 33 " sup_install"
    1.30  		sup_install
    1.31  	fi
    1.32 @@ -102,13 +102,13 @@
    1.33  	
    1.34  	# Back to pkg tree
    1.35  	cd ${cache}/${PACKAGE}-${VERSION}
    1.36 -	echo "sup_size=\"$(du -sh files | cut -d "	" -f 1)\"" >> receipt
    1.37 +	echo "sup_size=\"$(du -sh files | cut -d "	" -f 1)\"" >> receip
    1.38  	
    1.39  	# Now we need a place to store package data and set $sup_size
    1.40  	gettext "Installing files to $HOME..."
    1.41  	data="${installed}/${PACKAGE}"
    1.42  	mkdir -p ${data}
    1.43 -	for file in receipt README files.list; do
    1.44 +	for file in receip README files.list; do
    1.45  		[ -f "$file" ] && cp -f ${file} ${data}
    1.46  	done
    1.47  	for file in $(ls -A files); do
     2.1 --- a/server/sup/sup.cgi	Sun Feb 26 10:04:31 2017 +0000
     2.2 +++ b/server/sup/sup.cgi	Sun Feb 26 13:37:42 2017 +0100
     2.3 @@ -30,12 +30,12 @@
     2.4  	<a href='?sup=debug'>Sup debug</a>
     2.5  EOT
     2.6  		fi
     2.7 -		#. ${wok}/${pkg}/receipt
     2.8 +		#. ${wok}/${pkg}/receip
     2.9  		cat << EOT
    2.10  </div>
    2.11  
    2.12  <pre>
    2.13 -$(cat ${wok}/${pkg}/receipt )
    2.14 +$(cat ${wok}/${pkg}/receip )
    2.15  </pre>
    2.16  EOT
    2.17  		
     3.1 --- a/server/sup/sup.conf	Sun Feb 26 10:04:31 2017 +0000
     3.2 +++ b/server/sup/sup.conf	Sun Feb 26 13:37:42 2017 +0100
     3.3 @@ -5,8 +5,8 @@
     3.4  MAINTAINER="devel@slitaz.org"
     3.5  
     3.6  # Authenticated users
     3.7 -PLUGINS_TOOLS="${PLUGINS_TOOLS} <a href="?sup">Sup hub</a>"
     3.8 -DASHBOARD_TOOLS="${DASHBOARD_TOOLS} <a href="?sup">Sup hub</a>"
     3.9 +PLUGINS_TOOLS="${PLUGINS_TOOLS} <a href='?sup'>Sup hub</a>"
    3.10 +DASHBOARD_TOOLS="${DASHBOARD_TOOLS} <a href='?sup'>Sup hub</a>"
    3.11  PROFILE_TOOLS="${PROFILE_TOOLS}"
    3.12  
    3.13  # Admin only in Dashboard
     4.1 --- a/sup	Sun Feb 26 10:04:31 2017 +0000
     4.2 +++ b/sup	Sun Feb 26 13:37:42 2017 +0100
     4.3 @@ -56,7 +56,7 @@
     4.4  	-c|cook)
     4.5  		# Cook in $cache/cook amd mv pkg to a visible dir
     4.6  		pkg="$2"
     4.7 -		receipt="$wok/$pkg/receipt"
     4.8 +		receip="$wok/$pkg/receip"
     4.9  		cache="$cache/cook"
    4.10  		
    4.11  		# Handle --init
    4.12 @@ -71,8 +71,8 @@
    4.13  			gettext "You must specify a package to cook:"
    4.14  			boldify " sup cook [package]" && exit 1
    4.15  		fi
    4.16 -		if [ ! -f "$receipt" ]; then
    4.17 -			gettext "Can't find receipt in wok for:"
    4.18 +		if [ ! -f "$receip" ]; then
    4.19 +			gettext "Can't find receip in wok for:"
    4.20  			colorize 31 " $pkg" && exit 1
    4.21  		fi
    4.22  		
    4.23 @@ -81,12 +81,12 @@
    4.24  		separator
    4.25  		rm -rf ${cache} && mkdir -p ${cache} ${cooked}
    4.26  		
    4.27 -		# Check receipt
    4.28 -		[ "$verbose" ] && gettext "Checking receipt variables..."
    4.29 -		. ${receipt}
    4.30 +		# Check receip
    4.31 +		[ "$verbose" ] && gettext "Checking receip variables..."
    4.32 +		. ${receip}
    4.33  		for var in PACKAGE VERSION SHORT_DESC MAINTAINER LICENSE WEB_SITE
    4.34  		do
    4.35 -			value="$(. $receipt; eval echo \$$var)"
    4.36 +			value="$(. $receip; eval echo \$$var)"
    4.37  			case "$var" in
    4.38  				PACKAGE|VERSION|SHORT_DESC|MAINTAINER|LICENSE)
    4.39  					if [ ! "$value" ]; then
    4.40 @@ -115,7 +115,7 @@
    4.41  		done
    4.42  		
    4.43  		# Add $build_date
    4.44 -		echo "build_date=\"$(date "+%Y-%m-%d %H:%M")\"" >> ${receipt}
    4.45 +		echo "build_date=\"$(date "+%Y-%m-%d %H:%M")\"" >> ${receip}
    4.46  		
    4.47  		gettext "Creating compressed archive..."
    4.48  		find files | cpio -o -H newc --quiet | lzma e files.lzma -si
    4.49 @@ -125,7 +125,7 @@
    4.50  		
    4.51  		size="$(du -sh $cooked/$supfile | cut -d "	" -f 1)"
    4.52  		echo "$(gettext 'Packages:') $(colorize 33 $supfile) ($size)"
    4.53 -		sed -i "/^build_date=/"d ${receipt}
    4.54 +		sed -i "/^build_date=/"d ${receip}
    4.55  		rm -rf ${cache} && newline ;;
    4.56  	
    4.57  	-e|extract)
    4.58 @@ -178,7 +178,7 @@
    4.59  		boldify " $installed_nb"
    4.60  		separator
    4.61  		for pkg in $(ls ${installed}); do
    4.62 -			. ${wok}/${pkg}/receipt
    4.63 +			. ${wok}/${pkg}/receip
    4.64  			echo "$pkg $(indent 26 $VERSION) $(indent 42 $MAINTAINER)"
    4.65  		done
    4.66  		if [ "$installed_nb" == 0 ]; then
    4.67 @@ -190,7 +190,7 @@
    4.68  			boldify " $(ls ${wok} | wc -l)"
    4.69  			separator
    4.70  			for pkg in $(ls ${wok}); do
    4.71 -				. ${wok}/${pkg}/receipt
    4.72 +				. ${wok}/${pkg}/receip
    4.73  				echo "$pkg $(indent 26 $VERSION) $(indent 42 $MAINTAINER)"
    4.74  			done
    4.75  			newline 
    4.76 @@ -201,8 +201,8 @@
    4.77  	*)
    4.78  		# Display pkg info if installed
    4.79  		pkg="$1"
    4.80 -		if [ -f "$installed/$pkg/receipt" ]; then
    4.81 -			. ${installed}/${pkg}/receipt
    4.82 +		if [ -f "$installed/$pkg/receip" ]; then
    4.83 +			. ${installed}/${pkg}/receip
    4.84  			newline
    4.85  			gettext "Installed package:"; colorize 32 " $PACKAGE $VERSION"
    4.86  			separator