This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

new cygport features: list-pkg, --fullhelp


Inlined patch adds two new features to cygport (sorry, flash10 vwith
gmail is broken with proxies)

list-pkg or list-readme lists all per package to be included into the README
--fullhelp lists all available commands and options

difforig bin/cygport

diff -u bin/cygport.orig bin/cygport
--- bin/cygport.orig	2009-07-23 01:34:59.001000000 +0200
+++ bin/cygport	2009-07-23 09:57:10.187500000 +0200
@@ -126,6 +126,7 @@
 #
 # private:
 #	__show_help
+#	__show_full_help
 #	__show_version
 #
 ################################################################################
@@ -147,12 +148,46 @@
 		  almostall    run all of the above, excluding finish
 		  all          run all of the above, including finish

-		See ${_privdocdir}/README for further instructions.
+		Use --fullhelp for all commands and see ${_privdocdir}/README for
further instructions.

 		Report bugs to <cygwin-ports-general@lists.sourceforge.net>.
 		_EOF
 }

+__show_full_help() {
+	cat <<-_EOF
+Usage: cygport [/path/to/]PKGNAME-VER-REL[.cygport] COMMAND [COMMAND2 ...]
+
+OPTIONS:
+
+  --help -h -?               show short help
+  --fullhelp                 show this help
+  --version -v               show the cygport version
+
+COMMANDS:
+
+  download fetch wget get     download upstream sources from Internet
+  prep unpack                create working directory, unpack sources
and apply patches
+  compile build make         run all compilation steps
+  check test                 run make check resp. make test
+  inst install               install into a DESTDIR, and run
post-installation steps
+  postinstall                run post-installation steps
+  list                       list all to be installed files
+  list-pkg list-readme       list files per package
+  dep depends                list package dependencies for the
setup.hint requires: line
+  info                       show Cygport package information
+  package pkg                create binary and source packages
+  diff mkdiff mkpatch        create src and cygwin patches in patches
+  finish                     delete the working directory
+  almostall                  run all of the above, excluding finish
+  all                        run all of the above, including finish
+
+See ${_privdocdir}/README for further instructions.
+
+Report bugs to <cygwin-ports-general@lists.sourceforge.net>.
+_EOF
+}
+
 __show_version() {
 	cat <<-_EOF
 		cygport ${_version}
@@ -178,6 +213,10 @@
 		__show_help;
 		exit 0;
 		;;
+	--fullhelp)
+		__show_full_help;
+		exit 0;
+		;;
 	--version|-v)
 		__show_version;
 		exit 0;
@@ -251,7 +290,7 @@
 }

 # protect functions
-readonly -f __show_help __show_version error warning inform verbose
__stage __step
+readonly -f __show_help __show_full_help __show_version error warning
inform verbose __stage __step
 export -f error warning inform verbose


@@ -1609,6 +1648,7 @@
 #	__pkg_dist
 #	__pkg_pkgcheck
 #	__pkg_srcpkg
+#	__list_readme_files
 #
 ################################################################################

@@ -1724,6 +1764,20 @@
 	rm -f ${tmp1} ${tmp2};
 }

+__list_readme_files() {
+	local -i n=0;
+	pushd ${D}
+	while defined pkg_name[${n}]
+	do
+                echo ""
+                echo "Files included in the =${pkg_name[${n}]}= package:"
+                echo ""
+                tar tjf ${top}/${pkg_name[${n}]}-${PVR}.tar.bz2 |
grep -Ev "/$" | sed -e's,^,  /,'
+                n+=1
+	done
+	popd
+}
+
 __pkg_diff() {
 	local default_excludes;
 	local diff_excludes_x;
@@ -1999,7 +2053,7 @@
 }

 # protect functions
-readonly -f __pkg_binpkg __pkg_diff __gpg_sign __pkg_srcpkg __pkg_dist __finish
+readonly -f __pkg_binpkg __pkg_pkgcheck __list_readme_files
__pkg_diff __gpg_sign __pkg_srcpkg __pkg_dist __finish


 ################################################################################
@@ -2261,6 +2315,10 @@
 			__list_files;
 			_status=$?;
 			;;
+		list-pkg|list-readme)
+			__list_readme_files;
+			_status=$?;
+			;;
 		dep*)
 			__list_deps;
 			_status=$?;
@@ -2297,6 +2355,10 @@
 			__finish;
 			_status=$?;
 			;;
+		fullhelp)
+			__show_full_help;
+			exit 0;
+			;;
 		help)
 			__show_help;
 			exit 0;

-- 
Reini Urban
http://phpwiki.org/           http://murbreak.at/

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]