diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..3606a43 --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +*.tgz filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..1534ba5 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +*.rpm +*.log +*spec-20* diff --git a/Console_GetoptPlus-1.0.0RC1.tgz b/Console_GetoptPlus-1.0.0RC1.tgz new file mode 100644 index 0000000..9e8a5a8 --- /dev/null +++ b/Console_GetoptPlus-1.0.0RC1.tgz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:47f692419ab606a720cacbedc327fd2dcb2bd1136d2c6b48c91b8fdcb428afea +size 22565 diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..0f2e8d5 --- /dev/null +++ b/Makefile @@ -0,0 +1,21 @@ +# Makefile for source rpm: php-pear-Console-GetoptPlus +# $Id: Makefile,v 1.1 2016/06/16 14:21:48 unnilennium Exp $ +NAME := php-pear-Console-GetoptPlus +SPECFILE = $(firstword $(wildcard *.spec)) + +define find-makefile-common +for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done +endef + +MAKEFILE_COMMON := $(shell $(find-makefile-common)) + +ifeq ($(MAKEFILE_COMMON),) +# attept a checkout +define checkout-makefile-common +test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2 +endef + +MAKEFILE_COMMON := $(shell $(checkout-makefile-common)) +endif + +include $(MAKEFILE_COMMON) diff --git a/README.md b/README.md index 77960ed..9f9b925 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,11 @@ # php-pear-Console-GetoptPlus -3rd Party (Maintained by Koozali) git repo for php-pear-Console-GetoptPlus smeserver \ No newline at end of file +3rd Party (Maintained by Koozali) git repo for php-pear-Console-GetoptPlus smeserver + +## Description + +
*This description has been generated by an LLM AI system and cannot be relied on to be fully correct.* +*Once it has been checked, then this comment will be deleted* +
+ +PHP PEAR Console_GetoptPlus is a package for PHP, which provides a command-line option parser. It allows developers to easily define argument rules and parse command-line options and arguments passed to a script. It provides support for long and short options, optional and mandatory arguments, multiple argument values, automatic help messages, automatic command-line argument validation and more. It is a replacement of the Console_Getopt package. diff --git a/contriborbase b/contriborbase new file mode 100644 index 0000000..ef36a67 --- /dev/null +++ b/contriborbase @@ -0,0 +1 @@ +sme10 diff --git a/php-pear-Console_GetoptPlus.spec b/php-pear-Console_GetoptPlus.spec new file mode 100644 index 0000000..9863950 --- /dev/null +++ b/php-pear-Console_GetoptPlus.spec @@ -0,0 +1,115 @@ +%define peardir %(pear config-get php_dir 2> /dev/null || echo %{_datadir}/pear) +%define xmldir /var/lib/pear +%global pear_name Console_GetoptPlus +%define name php-pear-Console-GetoptPlus +%define version 1.0.0RC1 +%define release 3 + +Name: %{name} +Version: %{version} +Release: %{release}%{?dist} +Summary: Command-line option parser - Console Getopt+ (Getopt Plus) +License: The BSD License +Group: Development/Libraries +Source0: http://pear.php.net/get/Console_GetoptPlus-%{version}.tgz +BuildRoot: %{_tmppath}/%{name}-%{version}-root-%(%{__id_u} -n) +URL: http://pear.php.net/package/Console_GetoptPlus + +BuildRequires: php-pear(PEAR) >= 1.4.7 +Provides: php-pear(%{pear_name}) = %{version} + +#BuildRequires: PEAR::PEAR >= 1.4.7 + +BuildArch: noarch + +%description +This package is (1) a PHP5 port/rewrite of Console_Getopt, (2) with added +functionalities, and (3) with a Web interface to run getopt-like shell +commands through a browser (not implemented yet). + +(1) Console_getoptPlus:getopt() is a replacement for +Console_getopt:getopt(). +Same for getopt2() and readPHPArgv(). It returns PEAR_Exception instead of +PEAR_Error. Error messages are the same. + +(2) GetoptPlus:getoptplus uses an array-based description of the command. +It can generates the command usage/help automaticly. It can return the +parsed options and parameters in an associative array. It can be set to +accept option shortcut names. + +Fully tested with phpUnit. Code coverage test close to 100%. + +Usage is fully documented in docs/examples files. + +%prep +%setup -c -T +pear -v -c pearrc \ + -d php_dir=%{peardir} \ + -d doc_dir=/docs \ + -d bin_dir=%{_bindir} \ + -d data_dir=%{peardir}/data \ + -d test_dir=%{peardir}/tests \ + -d ext_dir=%{_libdir} \ + -s + +%build + +%install +rm -rf %{buildroot} +pear -c pearrc install --nodeps --packagingroot %{buildroot} %{SOURCE0} + +# Clean up unnecessary files +rm pearrc +rm -rf %{buildroot}/%{peardir}/.filemap +rm -rf %{buildroot}/%{peardir}/.lock +rm -rf %{buildroot}/%{peardir}/.registry +rm -rf %{buildroot}%{peardir}/.channels +rm -rf %{buildroot}/%{xmldir}/.filemap +rm -rf %{buildroot}/%{xmldir}/.lock +rm -rf %{buildroot}/%{xmldir}/.registry +rm -rf %{buildroot}/%{xmldir}/.channels +if [[ -f %{buildroot}%{xmldir}/.depdb ]] ;then +rm -rf %{buildroot}%{xmldir}/.depdb +fi +if [[ -f %{buildroot}{xmldir}/.depdblock ]] ;then +rm -rf %{buildroot}%{xmldir}/.depdblock +fi +mv %{buildroot}/docs . + + +# Install XML package description +mkdir -p %{buildroot}%{xmldir} +tar -xzf %{SOURCE0} package.xml +cp -p package.xml %{buildroot}%{xmldir}/Console_GetoptPlus.xml + +%clean +rm -rf %{buildroot} + +%post +pear install --nodeps --soft --force --register-only %{xmldir}/Console_GetoptPlus.xml >/dev/null || : + +%postun +if [ "$1" -eq "0" ]; then + pear uninstall --nodeps --ignore-errors --register-only pear.php.net/Console_GetoptPlus >/dev/null || : +fi + +%files +%defattr(-,root,root) +%doc docs/Console_GetoptPlus/* +%{peardir}/* +%{xmldir}/Console_GetoptPlus.xml + +%changelog +* Fri Jul 14 2023 BogusDateBot +- Eliminated rpmbuild "bogus date" warnings due to inconsistent weekday, + by assuming the date is correct and changing the weekday. + +* Thu Jun 16 2016 Jean-Philipe Pialasse 1.0.0RC1-3.sme +- importing to buildsys pear packages for Horde [SME: 9600] + +* Mon May 6 2013 John H. Bennett III - 1.0.0RC1-2 +- updated spec file requires section, and left original info remarked. + +* Sun May 5 2013 John H. Bennett III - 1.0.0RC1-1 +- Original from pear-make-rpm-spec. +