################################################################################
#
# help.cygpart - cygport command-line help functions
#
# Copyright (C) 2006-2020 Cygport authors
# Provided by the Cygwin project <https://cygwin.com/>
#
# cygport is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# cygport is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with cygport.  If not, see <https://www.gnu.org/licenses/>.
#
################################################################################

__show_help() {
	cat <<-_EOF
		cygport is a utility for creating and building Cygwin software packages.

		Usage: cygport [OPTIONS] CYGPORT_FILE COMMAND [COMMAND2 ...]

		OPTIONS may include the following:

		  --jobs, -j N 	specify the number of jobs to use
		  --32, -4      build package for i686 Cygwin
		  --64, -8      build package for x86_64 Cygwin
		  --debug       enable debugging messages
		  --version, -v show the version
		  --help, -h    show this help

		The --32 and --64 options are mutually exclusive.

		On Cygwin, if neither the --32 nor --64 options are enabled,
		the package will be built for the architecture on which cygport
		is run.  On other systems, the x86_64 architecture is the default.

		COMMAND may be one or more of the following:

		  download      download upstream sources from Internet
		  prep          create working directory, unpack sources and apply patches
		  compile       run all compilation steps
		  test          run the package's test suite, if one exists
		  install       install into a DESTDIR, and run post-installation steps
		  srcpackage    create source package
		  package       create binary and source packages
		  package-test  create binary and source packages, marked as test
		  upload        upload finished packages to cygwin.com
		  announce      send an announcement email to cygwin.com
		  finish        delete the working directory
		  all           run prep, compile, install and package
		  all-test      run prep, compile, install and package-test
		  repro-build   rebuild from created source package to temp directory
		  repro-diff    check whether packages from original and rebuild differ
		  repro-check   run repro-build and repro-diff
		  repro-finish  delete the temp directory used for rebuild

		See the included README file for further documentation.

		Report bugs to <cygwin-apps@cygwin.com>.
		_EOF
}

__show_version() {
	cat <<-_EOF
		cygport ${_cygport_version}
		Copyright (C) 2020 Cygport authors

		This program comes with NO WARRANTY, to the extent permitted by law.

		You may redistribute copies of this program under the terms of
		the GNU General Public License as published by the Free Software
		Foundation, either version 3 of the License, or (at your option) any
		later version.

		For more information about these matters, see the file named COPYING.

		Written for the Cygwin project <https://cygwin.com/>.
		_EOF
}

readonly -f __show_help __show_version
