From 77ee4908e3a2fe90a0a95b420c526f6a323e5463 Mon Sep 17 00:00:00 2001 From: Thomas Jensen Date: Thu, 28 Mar 2019 21:57:56 +0100 Subject: [PATCH] Add chocolatey package spec --- Makefile | 29 ++++++++++++- boxes.portable.nuspec | 97 ++++++++++++++++++++++++++++++++++++++++++ tools/VERIFICATION.txt | 22 ++++++++++ 3 files changed, 147 insertions(+), 1 deletion(-) create mode 100644 boxes.portable.nuspec create mode 100644 tools/VERIFICATION.txt diff --git a/Makefile b/Makefile index 5de53a5..0eafcc5 100644 --- a/Makefile +++ b/Makefile @@ -29,6 +29,7 @@ PKG_NAME = boxes-$(BVERSION) .PHONY: clean build win32 debug win32.debug infomsg replaceinfos test package win32.package package_common +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - build debug: infomsg replaceinfos $(MAKE) -C src BOXES_PLATFORM=unix $@ @@ -39,6 +40,7 @@ win32: infomsg replaceinfos win32.debug: infomsg replaceinfos $(MAKE) -C src BOXES_PLATFORM=win32 debug +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - infomsg: @echo "| For compilation info please refer to the boxes compilation FAQ" @@ -52,6 +54,7 @@ src/boxes.h: src/boxes.h.in src/regexp/regexp.h Makefile doc/boxes.1: doc/boxes.1.in Makefile sed -e 's/--BVERSION--/$(BVERSION)/; s/--GLOBALCONF--/$(subst /,\/,$(GLOBALCONF))/' doc/boxes.1.in > doc/boxes.1 +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $(PKG_NAME).tar.gz: mkdir -p $(PKG_NAME)/doc @@ -68,11 +71,35 @@ package: build win32.package: win32 $(MAKE) BOXES_PLATFORM=win32 $(PKG_NAME).tar.gz +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +choco: tools/LICENSE.txt tools/boxes.cfg tools/boxes.exe tools/README.md tools/README.Win32.md + choco pack --version=$(BVERSION) + +tools/LICENSE.txt: LICENSE + cp LICENSE tools/LICENSE.txt + +tools/boxes.cfg: boxes-config + cp boxes-config tools/boxes.cfg + +tools/boxes.exe: src/boxes.exe + cp src/boxes.exe tools/ + +tools/README.md: README.md + cp README.md tools/ + +tools/README.Win32.md: README.Win32.md + cp README.Win32.md tools/ + +src/boxes.exe: win32 + +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - clean: - rm -f doc/boxes.1 src/boxes.h + rm -f doc/boxes.1 src/boxes.h tools/boxes.cfg tools/LICENSE.txt tools/boxes.exe tools/README*.md boxes.portable.*.nupkg $(MAKE) -C src clean +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - test: cd test; ./testrunner.sh -suite diff --git a/boxes.portable.nuspec b/boxes.portable.nuspec new file mode 100644 index 0000000..f5efb42 --- /dev/null +++ b/boxes.portable.nuspec @@ -0,0 +1,97 @@ + + + + boxes.portable + boxes (Portable) + 0.0.0 + The Boxes Contributors + Thomas Jensen + Command Line ASCII Boxes Unlimited! + echo Hello World | boxes` +``` +/***************/ +/* Hello World */ +/***************/ +``` + +or like this: + +`C:\>echo Hello World! | boxes -d unicornsay` +``` + _______________ +/ \ +| Hello World! | +\_________ __'\ + |/ \\ + \ \\ . + |\\/| + / " '\ + . . . + / ) | + ' _.' | + '-'/ \ +``` + +A more complex call might look like this: + +`C:\>echo Spring is in the Air! | boxes -d spring -p h4 -ac` +``` + , + /\^/`\ + | \/ | + | | | jgs + \ \ / _ _ + '\\//' _{ ' }_ + || Spring is in the Air! { `.!.` } + || ',_/Y\_,' + || , {_,_} +|\ || |\ | +| | || | | (\| /) +| | || / / \| // + \ \||/ / |// + `\\//` \ \./ \\ \./ \\ \./ \ \\ |/ / + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +``` + +### Modifying boxes.cfg + +At some point, you may wish to modify existing box designs or even add your own. +When that happens, you may find that you don't have the necessary access permissions to modify boxes.cfg in +`%ChocolateyInstall%\lib\boxes` directly. In that case, make a copy of boxes.cfg and place it in one of the +precedent locations, where *boxes* finds it before the original. When reading the config file, *boxes* will try +these locations (in order): + +1. The file specified by the environment variable `BOXES`. +2. A file called boxes.cfg in the directory specified by the environment variable `HOME`. +3. The boxes.cfg installed by choco. + +  +]]> + https://boxes.thomasjensen.com/ + ascii ascii-art filter command-line cli + https://boxes.thomasjensen.com/images/boxes-sq-256.png + + https://www.gnu.org/licenses/old-licenses/gpl-2.0.html + en + false + https://boxes.thomasjensen.com/2019/02/boxes-v1.3-released.html + https://github.com/ascii-boxes/boxes + https://boxes.thomasjensen.com/docs/ + https://github.com/ascii-boxes/boxes/issues + + + + + diff --git a/tools/VERIFICATION.txt b/tools/VERIFICATION.txt new file mode 100644 index 0000000..91c6902 --- /dev/null +++ b/tools/VERIFICATION.txt @@ -0,0 +1,22 @@ +VERIFICATION +Verification is intended to assist the Chocolatey moderators and community +in verifying that this package's contents are trustworthy. + + + .+"+.+"+.+"+.+"+.+"+. + ( ) + ) b o x e s ( + ( ) + "+.+"+.+"+.+"+.+"+.+" + +This package is maintained by the original author of the contained software. +The nuspec of this package is located at https://github.com/ascii-boxes/boxes/blob/master/boxes.portable.nuspec . + +Verification instructions: + +1. Download Windows binary from project GitHub site: + https://github.com/ascii-boxes/boxes/releases +2. Compare with contents of this package. + The files "boxes.exe" and "boxes.cfg" should be binary identical. + +That's all, really. Boxes is a simple, portable command-line application which consists only of these two files.