Skip to content

Commit 77ee490

Browse files
committed
Add chocolatey package spec
1 parent 416ae72 commit 77ee490

File tree

3 files changed

+147
-1
lines changed

3 files changed

+147
-1
lines changed

Makefile

+28-1
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ PKG_NAME = boxes-$(BVERSION)
2929

3030
.PHONY: clean build win32 debug win32.debug infomsg replaceinfos test package win32.package package_common
3131

32+
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
3233

3334
build debug: infomsg replaceinfos
3435
$(MAKE) -C src BOXES_PLATFORM=unix $@
@@ -39,6 +40,7 @@ win32: infomsg replaceinfos
3940
win32.debug: infomsg replaceinfos
4041
$(MAKE) -C src BOXES_PLATFORM=win32 debug
4142

43+
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
4244

4345
infomsg:
4446
@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
5254
doc/boxes.1: doc/boxes.1.in Makefile
5355
sed -e 's/--BVERSION--/$(BVERSION)/; s/--GLOBALCONF--/$(subst /,\/,$(GLOBALCONF))/' doc/boxes.1.in > doc/boxes.1
5456

57+
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
5558

5659
$(PKG_NAME).tar.gz:
5760
mkdir -p $(PKG_NAME)/doc
@@ -68,11 +71,35 @@ package: build
6871
win32.package: win32
6972
$(MAKE) BOXES_PLATFORM=win32 $(PKG_NAME).tar.gz
7073

74+
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
75+
76+
choco: tools/LICENSE.txt tools/boxes.cfg tools/boxes.exe tools/README.md tools/README.Win32.md
77+
choco pack --version=$(BVERSION)
78+
79+
tools/LICENSE.txt: LICENSE
80+
cp LICENSE tools/LICENSE.txt
81+
82+
tools/boxes.cfg: boxes-config
83+
cp boxes-config tools/boxes.cfg
84+
85+
tools/boxes.exe: src/boxes.exe
86+
cp src/boxes.exe tools/
87+
88+
tools/README.md: README.md
89+
cp README.md tools/
90+
91+
tools/README.Win32.md: README.Win32.md
92+
cp README.Win32.md tools/
93+
94+
src/boxes.exe: win32
95+
96+
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
7197

7298
clean:
73-
rm -f doc/boxes.1 src/boxes.h
99+
rm -f doc/boxes.1 src/boxes.h tools/boxes.cfg tools/LICENSE.txt tools/boxes.exe tools/README*.md boxes.portable.*.nupkg
74100
$(MAKE) -C src clean
75101

102+
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
76103

77104
test:
78105
cd test; ./testrunner.sh -suite

boxes.portable.nuspec

+97
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<package xmlns="http://schemas.microsoft.com/packaging/2015/06/nuspec.xsd">
3+
<metadata>
4+
<id>boxes.portable</id>
5+
<title>boxes (Portable)</title>
6+
<version>0.0.0</version>
7+
<authors>The Boxes Contributors</authors>
8+
<owners>Thomas Jensen</owners>
9+
<summary>Command Line ASCII Boxes Unlimited!</summary>
10+
<description><![CDATA[*Boxes* is a command line program that draws a box around its input text. It can remove
11+
and repair those boxes, too. You can easily make your own box designs if you wish, but many designs are
12+
already provided.
13+
14+
*Boxes* is a portable application (hence the `.portable` suffix in the choco package ID). It is installed into
15+
the package directory `%ChocolateyInstall%\lib\boxes`. Chocolatey makes *boxes* available to you on the `PATH`
16+
via its `%ChocolateyInstall%\bin` directory. This is the only official *boxes* choco package.
17+
18+
### Examples
19+
20+
After *boxes* is installed, try calling it like this:
21+
22+
`C:\>echo Hello World | boxes`
23+
```
24+
/***************/
25+
/* Hello World */
26+
/***************/
27+
```
28+
29+
or like this:
30+
31+
`C:\>echo Hello World! | boxes -d unicornsay`
32+
```
33+
_______________
34+
/ \
35+
| Hello World! |
36+
\_________ __'\
37+
|/ \\
38+
\ \\ .
39+
|\\/|
40+
/ " '\
41+
. . .
42+
/ ) |
43+
' _.' |
44+
'-'/ \
45+
```
46+
47+
A more complex call might look like this:
48+
49+
`C:\>echo Spring is in the Air! | boxes -d spring -p h4 -ac`
50+
```
51+
,
52+
/\^/`\
53+
| \/ |
54+
| | | jgs
55+
\ \ / _ _
56+
'\\//' _{ ' }_
57+
|| Spring is in the Air! { `.!.` }
58+
|| ',_/Y\_,'
59+
|| , {_,_}
60+
|\ || |\ |
61+
| | || | | (\| /)
62+
| | || / / \| //
63+
\ \||/ / |//
64+
`\\//` \ \./ \\ \./ \\ \./ \ \\ |/ /
65+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
66+
```
67+
68+
### Modifying boxes.cfg
69+
70+
At some point, you may wish to modify existing box designs or even add your own.
71+
When that happens, you may find that you don't have the necessary access permissions to modify boxes.cfg in
72+
`%ChocolateyInstall%\lib\boxes` directly. In that case, make a copy of boxes.cfg and place it in one of the
73+
precedent locations, where *boxes* finds it before the original. When reading the config file, *boxes* will try
74+
these locations (in order):
75+
76+
1. The file specified by the environment variable `BOXES`.
77+
2. A file called boxes.cfg in the directory specified by the environment variable `HOME`.
78+
3. The boxes.cfg installed by choco.
79+
80+
&nbsp;
81+
]]></description>
82+
<projectUrl>https://boxes.thomasjensen.com/</projectUrl>
83+
<tags>ascii ascii-art filter command-line cli</tags>
84+
<iconUrl>https://boxes.thomasjensen.com/images/boxes-sq-256.png</iconUrl>
85+
<!-- <license type="expression">GPL-2.0-only</license> -->
86+
<licenseUrl>https://www.gnu.org/licenses/old-licenses/gpl-2.0.html</licenseUrl>
87+
<language>en</language>
88+
<requireLicenseAcceptance>false</requireLicenseAcceptance>
89+
<releaseNotes>https://boxes.thomasjensen.com/2019/02/boxes-v1.3-released.html</releaseNotes>
90+
<projectSourceUrl>https://github.com/ascii-boxes/boxes</projectSourceUrl>
91+
<docsUrl>https://boxes.thomasjensen.com/docs/</docsUrl>
92+
<bugTrackerUrl>https://github.com/ascii-boxes/boxes/issues</bugTrackerUrl>
93+
</metadata>
94+
<files>
95+
<file src="tools\**" target="tools" />
96+
</files>
97+
</package>

tools/VERIFICATION.txt

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
VERIFICATION
2+
Verification is intended to assist the Chocolatey moderators and community
3+
in verifying that this package's contents are trustworthy.
4+
5+
6+
.+"+.+"+.+"+.+"+.+"+.
7+
( )
8+
) b o x e s (
9+
( )
10+
"+.+"+.+"+.+"+.+"+.+"
11+
12+
This package is maintained by the original author of the contained software.
13+
The nuspec of this package is located at https://github.com/ascii-boxes/boxes/blob/master/boxes.portable.nuspec .
14+
15+
Verification instructions:
16+
17+
1. Download Windows binary from project GitHub site:
18+
https://github.com/ascii-boxes/boxes/releases
19+
2. Compare with contents of this package.
20+
The files "boxes.exe" and "boxes.cfg" should be binary identical.
21+
22+
That's all, really. Boxes is a simple, portable command-line application which consists only of these two files.

0 commit comments

Comments
 (0)