sup rev 11

Tiny edits (receip -> receipt)
author Paul Issott <paul@slitaz.org>
date Sun Feb 26 10:04:31 2017 +0000 (2017-02-26)
parents f10893862ba5
children 90e556840716
files libsup.sh server/sup/sup.cgi sup wok/sup-demo/receip wok/sup-demo/receipt wok/sup-skel/receip wok/sup-skel/receipt
line diff
     1.1 --- a/libsup.sh	Fri Feb 24 20:19:15 2017 +0000
     1.2 +++ b/libsup.sh	Sun Feb 26 10:04:31 2017 +0000
     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 receip for deps
     1.8 -	cpio -i receip --quiet < ${supfile}
     1.9 -	. receip
    1.10 +	# Get receipt for deps
    1.11 +	cpio -i receipt --quiet < ${supfile}
    1.12 +	. receipt
    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 receip first to check deps
    1.21 +	# Extract and source receipt 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" ../receip; then
    1.28 +	if grep -q "^sup_install" ../receipt; 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)\"" >> receip
    1.37 +	echo "sup_size=\"$(du -sh files | cut -d "	" -f 1)\"" >> receipt
    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 receip README files.list; do
    1.44 +	for file in receipt 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	Fri Feb 24 20:19:15 2017 +0000
     2.2 +++ b/server/sup/sup.cgi	Sun Feb 26 10:04:31 2017 +0000
     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}/receip
     2.8 +		#. ${wok}/${pkg}/receipt
     2.9  		cat << EOT
    2.10  </div>
    2.11  
    2.12  <pre>
    2.13 -$(cat ${wok}/${pkg}/receip )
    2.14 +$(cat ${wok}/${pkg}/receipt )
    2.15  </pre>
    2.16  EOT
    2.17  		
     3.1 --- a/sup	Fri Feb 24 20:19:15 2017 +0000
     3.2 +++ b/sup	Sun Feb 26 10:04:31 2017 +0000
     3.3 @@ -56,7 +56,7 @@
     3.4  	-c|cook)
     3.5  		# Cook in $cache/cook amd mv pkg to a visible dir
     3.6  		pkg="$2"
     3.7 -		receip="$wok/$pkg/receip"
     3.8 +		receipt="$wok/$pkg/receipt"
     3.9  		cache="$cache/cook"
    3.10  		
    3.11  		# Handle --init
    3.12 @@ -71,8 +71,8 @@
    3.13  			gettext "You must specify a package to cook:"
    3.14  			boldify " sup cook [package]" && exit 1
    3.15  		fi
    3.16 -		if [ ! -f "$receip" ]; then
    3.17 -			gettext "Can't find receip in wok for:"
    3.18 +		if [ ! -f "$receipt" ]; then
    3.19 +			gettext "Can't find receipt in wok for:"
    3.20  			colorize 31 " $pkg" && exit 1
    3.21  		fi
    3.22  		
    3.23 @@ -81,12 +81,12 @@
    3.24  		separator
    3.25  		rm -rf ${cache} && mkdir -p ${cache} ${cooked}
    3.26  		
    3.27 -		# Check receip
    3.28 -		[ "$verbose" ] && gettext "Checking receip variables..."
    3.29 -		. ${receip}
    3.30 +		# Check receipt
    3.31 +		[ "$verbose" ] && gettext "Checking receipt variables..."
    3.32 +		. ${receipt}
    3.33  		for var in PACKAGE VERSION SHORT_DESC MAINTAINER LICENSE WEB_SITE
    3.34  		do
    3.35 -			value="$(. $receip; eval echo \$$var)"
    3.36 +			value="$(. $receipt; eval echo \$$var)"
    3.37  			case "$var" in
    3.38  				PACKAGE|VERSION|SHORT_DESC|MAINTAINER|LICENSE)
    3.39  					if [ ! "$value" ]; then
    3.40 @@ -115,7 +115,7 @@
    3.41  		done
    3.42  		
    3.43  		# Add $build_date
    3.44 -		echo "build_date=\"$(date "+%Y-%m-%d %H:%M")\"" >> ${receip}
    3.45 +		echo "build_date=\"$(date "+%Y-%m-%d %H:%M")\"" >> ${receipt}
    3.46  		
    3.47  		gettext "Creating compressed archive..."
    3.48  		find files | cpio -o -H newc --quiet | lzma e files.lzma -si
    3.49 @@ -125,7 +125,7 @@
    3.50  		
    3.51  		size="$(du -sh $cooked/$supfile | cut -d "	" -f 1)"
    3.52  		echo "$(gettext 'Packages:') $(colorize 33 $supfile) ($size)"
    3.53 -		sed -i "/^build_date=/"d ${receip}
    3.54 +		sed -i "/^build_date=/"d ${receipt}
    3.55  		rm -rf ${cache} && newline ;;
    3.56  	
    3.57  	-e|extract)
    3.58 @@ -178,7 +178,7 @@
    3.59  		boldify " $installed_nb"
    3.60  		separator
    3.61  		for pkg in $(ls ${installed}); do
    3.62 -			. ${wok}/${pkg}/receip
    3.63 +			. ${wok}/${pkg}/receipt
    3.64  			echo "$pkg $(indent 26 $VERSION) $(indent 42 $MAINTAINER)"
    3.65  		done
    3.66  		if [ "$installed_nb" == 0 ]; then
    3.67 @@ -190,7 +190,7 @@
    3.68  			boldify " $(ls ${wok} | wc -l)"
    3.69  			separator
    3.70  			for pkg in $(ls ${wok}); do
    3.71 -				. ${wok}/${pkg}/receip
    3.72 +				. ${wok}/${pkg}/receipt
    3.73  				echo "$pkg $(indent 26 $VERSION) $(indent 42 $MAINTAINER)"
    3.74  			done
    3.75  			newline 
    3.76 @@ -201,8 +201,8 @@
    3.77  	*)
    3.78  		# Display pkg info if installed
    3.79  		pkg="$1"
    3.80 -		if [ -f "$installed/$pkg/receip" ]; then
    3.81 -			. ${installed}/${pkg}/receip
    3.82 +		if [ -f "$installed/$pkg/receipt" ]; then
    3.83 +			. ${installed}/${pkg}/receipt
    3.84  			newline
    3.85  			gettext "Installed package:"; colorize 32 " $PACKAGE $VERSION"
    3.86  			separator
     4.1 --- a/wok/sup-demo/receip	Fri Feb 24 20:19:15 2017 +0000
     4.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.3 @@ -1,18 +0,0 @@
     4.4 -# SliTaz User Package receip
     4.5 -
     4.6 -PACKAGE="sup-demo"
     4.7 -VERSION="0.1"
     4.8 -SHORT_DESC="Short package description and information"
     4.9 -MAINTAINER="devel@slitaz.org"
    4.10 -LICENSE="BSD"
    4.11 -WEB_SITE="http://www.slitaz.org/"
    4.12 -
    4.13 -# Sup dependencies will be automaticaly downloaded but system wide 
    4.14 -# deps must be manually installed by root.
    4.15 -SUP_DEPS=""
    4.16 -DEPENDS=""
    4.17 -
    4.18 -# Here are the optional install rules (download, configure, etc)
    4.19 -sup_install() {
    4.20 -	echo "Running sup_install() sequence"
    4.21 -} 
     5.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     5.2 +++ b/wok/sup-demo/receipt	Sun Feb 26 10:04:31 2017 +0000
     5.3 @@ -0,0 +1,18 @@
     5.4 +# SliTaz User Package receipt
     5.5 +
     5.6 +PACKAGE="sup-demo"
     5.7 +VERSION="0.1"
     5.8 +SHORT_DESC="Short package description and information"
     5.9 +MAINTAINER="devel@slitaz.org"
    5.10 +LICENSE="BSD"
    5.11 +WEB_SITE="http://www.slitaz.org/"
    5.12 +
    5.13 +# Sup dependencies will be automatically downloaded but system wide 
    5.14 +# deps must be manually installed by root.
    5.15 +SUP_DEPS=""
    5.16 +DEPENDS=""
    5.17 +
    5.18 +# Here are the optional install rules (download, configure, etc)
    5.19 +sup_install() {
    5.20 +	echo "Running sup_install() sequence"
    5.21 +} 
     6.1 --- a/wok/sup-skel/receip	Fri Feb 24 20:19:15 2017 +0000
     6.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     6.3 @@ -1,18 +0,0 @@
     6.4 -# SliTaz User Package receip
     6.5 -
     6.6 -PACKAGE=""
     6.7 -VERSION=""
     6.8 -SHORT_DESC=""
     6.9 -MAINTAINER=""
    6.10 -LICENSE=""
    6.11 -WEB_SITE=""
    6.12 -
    6.13 -# Sup dependencies will be automaticaly downloaded but system wide 
    6.14 -# deps must be manually installed by root.
    6.15 -SUP_DEPS=""
    6.16 -DEPENDS=""
    6.17 -
    6.18 -# Here are the optional install rules (download, configure, etc)
    6.19 -sup_install() {
    6.20 -	echo ""
    6.21 -} 
     7.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     7.2 +++ b/wok/sup-skel/receipt	Sun Feb 26 10:04:31 2017 +0000
     7.3 @@ -0,0 +1,18 @@
     7.4 +# SliTaz User Package receipt
     7.5 +
     7.6 +PACKAGE=""
     7.7 +VERSION=""
     7.8 +SHORT_DESC=""
     7.9 +MAINTAINER=""
    7.10 +LICENSE=""
    7.11 +WEB_SITE=""
    7.12 +
    7.13 +# Sup dependencies will be automatically downloaded but system wide 
    7.14 +# deps must be manually installed by root.
    7.15 +SUP_DEPS=""
    7.16 +DEPENDS=""
    7.17 +
    7.18 +# Here are the optional install rules (download, configure, etc)
    7.19 +sup_install() {
    7.20 +	echo ""
    7.21 +}