| Add tool manpages and set up the Makefile to install the manuals - farbfeld - s… | |
| git clone git://git.suckless.org/farbfeld | |
| Log | |
| Files | |
| Refs | |
| README | |
| LICENSE | |
| --- | |
| commit 24c4b045fc495becc9ba4239ba3d2963851c7634 | |
| parent ba154494ae239b9a79fc0947cad497e983c80653 | |
| Author: FRIGN <[email protected]> | |
| Date: Tue, 5 Jan 2016 16:38:12 +0100 | |
| Add tool manpages and set up the Makefile to install the manuals | |
| While at it, refactor the makefile a bit. | |
| Diffstat: | |
| A 2ff.1 | 51 +++++++++++++++++++++++++++++… | |
| M Makefile | 25 ++++++++++++++++++++----- | |
| A ff2png.1 | 42 +++++++++++++++++++++++++++++… | |
| A jpg2ff.1 | 41 +++++++++++++++++++++++++++++… | |
| A png2ff.1 | 41 +++++++++++++++++++++++++++++… | |
| 5 files changed, 195 insertions(+), 5 deletions(-) | |
| --- | |
| diff --git a/2ff.1 b/2ff.1 | |
| @@ -0,0 +1,51 @@ | |
| +.Dd 2016-01-05 | |
| +.Dt 2FF 1 | |
| +.Os suckless.org | |
| +.Sh NAME | |
| +.Nm 2ff | |
| +.Nd convert image to farbfeld | |
| +.Sh SYNOPSIS | |
| +.Nm | |
| +.Sh DESCRIPTION | |
| +.Nm | |
| +reads an image from stdin, converts it to | |
| +.Xr farbfeld 5 | |
| +and writes the result to stdout. | |
| +.Pp | |
| +.Nm | |
| +is a wrapper script around the *2ff-tools | |
| +with a soft fallback to obtaining a PNG from imagemagick's | |
| +.Xr convert 1 | |
| +and passing it through | |
| +.Xr png2ff 1 . | |
| +.Pp | |
| +In case of an error | |
| +.Nm | |
| +writes a diagnostic message to stderr. | |
| +.Sh EXIT STATUS | |
| +.Bl -tag -width Ds | |
| +.It 0 | |
| +Image processed successfully. | |
| +.It 1 | |
| +An error occurred or | |
| +.Xr convert 1 | |
| +was not found in the fallback. | |
| +.El | |
| +.Sh EXAMPLES | |
| +$ | |
| +.Nm | |
| +< image.* > image.ff | |
| +.Pp | |
| +$ | |
| +.Nm | |
| +< image.* | bzip2 > image.ff.bz2 | |
| +.Sh SEE ALSO | |
| +.Xr bunzip2 1 , | |
| +.Xr bzip2 1 , | |
| +.Xr convert 1 , | |
| +.Xr ff2png 1 , | |
| +.Xr jpg2ff 1 , | |
| +.Xr png2ff 1 , | |
| +.Xr farbfeld 5 | |
| +.Sh AUTHORS | |
| +.An Laslo Hunhold Aq Mt [email protected] | |
| diff --git a/Makefile b/Makefile | |
| @@ -3,7 +3,10 @@ | |
| include config.mk | |
| -SRC = png2ff.c ff2png.c jpg2ff.c | |
| +BIN = png2ff ff2png jpg2ff | |
| +SRC = $(BIN:=.c) | |
| +MAN1 = 2ff.1 $(BIN:=.1) | |
| +MAN5 = farbfeld.5 | |
| all: png2ff ff2png jpg2ff | |
| @@ -12,16 +15,28 @@ all: png2ff ff2png jpg2ff | |
| @${CC} -o $@ ${CFLAGS} ${LIBS} ${LDFLAGS} $< | |
| clean: | |
| - rm -f png2ff ff2png jpg2ff | |
| + rm -f ${BIN} | |
| install: | |
| @echo installing into ${DESTDIR}${PREFIX}/bin | |
| @mkdir -p ${DESTDIR}${PREFIX}/bin | |
| - @cp -f jpg2ff png2ff ff2png 2ff ${DESTDIR}${PREFIX}/bin | |
| + @cp -f 2ff ${BIN} ${DESTDIR}${PREFIX}/bin | |
| + mkdir -p $(DESTDIR)$(MANPREFIX)/man1 | |
| + @cp -f $(MAN1) $(DESTDIR)$(MANPREFIX)/man1 | |
| + cd $(DESTDIR)$(MANPREFIX)/man1 && chmod 644 $(MAN1) | |
| + mkdir -p $(DESTDIR)$(MANPREFIX)/man5 | |
| + @cp -f $(MAN5) $(DESTDIR)$(MANPREFIX)/man5 | |
| + cd $(DESTDIR)$(MANPREFIX)/man5 && chmod 644 $(MAN5) | |
| uninstall: | |
| @echo removing from ${DESTDIR}${PREFIX}/bin | |
| - @rm -f ${DESTDIR}${PREFIX}/bin/png2ff | |
| - @rm -f ${DESTDIR}${PREFIX}/bin/ff2png | |
| + cd ${DESTDIR}${PREFIX}/bin | |
| + @rm -f 2ff ${BIN} | |
| + @echo removing from ${DESTDIR}${MANPREFIX}/man1 | |
| + cd ${DESTDIR}${MANPREFIX}/man1 | |
| + @rm -f $(MAN1) | |
| + @echo removing from ${DESTDIR}${MANPREFIX}/man5 | |
| + cd ${DESTDIR}${MANPREFIX}/man5 | |
| + @rm -f $(MAN5) | |
| .PHONY: all clean install uninstall | |
| diff --git a/ff2png.1 b/ff2png.1 | |
| @@ -0,0 +1,42 @@ | |
| +.Dd 2016-01-05 | |
| +.Dt FF2PNG 1 | |
| +.Os suckless.org | |
| +.Sh NAME | |
| +.Nm ff2png | |
| +.Nd convert farbfeld to PNG | |
| +.Sh SYNOPSIS | |
| +.Nm | |
| +.Sh DESCRIPTION | |
| +.Nm | |
| +reads a | |
| +.Xr farbfeld 5 | |
| +image from stdin, converts it to a 16-Bit RGBA PNG and writes the result | |
| +to stdout. | |
| +.Pp | |
| +In case of an error | |
| +.Nm | |
| +writes a diagnostic message to stderr. | |
| +.Sh EXIT STATUS | |
| +.Bl -tag -width Ds | |
| +.It 0 | |
| +Image processed successfully. | |
| +.It 1 | |
| +An error occurred. | |
| +.El | |
| +.Sh EXAMPLES | |
| +$ | |
| +.Nm | |
| +< image.ff > image.png | |
| +.Pp | |
| +$ bunzip2 < image.ff.bz2 | | |
| +.Nm | |
| +> image.png | |
| +.Sh SEE ALSO | |
| +.Xr 2ff 1 , | |
| +.Xr bunzip2 1 , | |
| +.Xr bzip2 1 , | |
| +.Xr jpg2ff 1 , | |
| +.Xr png2ff 1 , | |
| +.Xr farbfeld 5 | |
| +.Sh AUTHORS | |
| +.An Laslo Hunhold Aq Mt [email protected] | |
| diff --git a/jpg2ff.1 b/jpg2ff.1 | |
| @@ -0,0 +1,41 @@ | |
| +.Dd 2016-01-05 | |
| +.Dt JPG2FF 1 | |
| +.Os suckless.org | |
| +.Sh NAME | |
| +.Nm jpg2ff | |
| +.Nd convert JPG to farbfeld | |
| +.Sh SYNOPSIS | |
| +.Nm | |
| +.Sh DESCRIPTION | |
| +.Nm | |
| +reads a JPG image from stdin, converts it to | |
| +.Xr farbfeld 5 | |
| +and writes the result to stdout. | |
| +.Pp | |
| +In case of an error | |
| +.Nm | |
| +writes a diagnostic message to stderr. | |
| +.Sh EXIT STATUS | |
| +.Bl -tag -width Ds | |
| +.It 0 | |
| +Image processed successfully. | |
| +.It 1 | |
| +An error occurred. | |
| +.El | |
| +.Sh EXAMPLES | |
| +$ | |
| +.Nm | |
| +< image.jpg > image.ff | |
| +.Pp | |
| +$ | |
| +.Nm | |
| +< image.jpg | bzip2 > image.ff.bz2 | |
| +.Sh SEE ALSO | |
| +.Xr 2ff 1 , | |
| +.Xr bunzip2 1 , | |
| +.Xr bzip2 1 , | |
| +.Xr ff2png 1 , | |
| +.Xr png2ff 1 , | |
| +.Xr farbfeld 5 | |
| +.Sh AUTHORS | |
| +.An Laslo Hunhold Aq Mt [email protected] | |
| diff --git a/png2ff.1 b/png2ff.1 | |
| @@ -0,0 +1,41 @@ | |
| +.Dd 2016-01-05 | |
| +.Dt PNG2FF 1 | |
| +.Os suckless.org | |
| +.Sh NAME | |
| +.Nm png2ff | |
| +.Nd convert PNG to farbfeld | |
| +.Sh SYNOPSIS | |
| +.Nm | |
| +.Sh DESCRIPTION | |
| +.Nm | |
| +reads a PNG image from stdin, converts it to | |
| +.Xr farbfeld 5 | |
| +and writes the result to stdout. | |
| +.Pp | |
| +In case of an error | |
| +.Nm | |
| +writes a diagnostic message to stderr. | |
| +.Sh EXIT STATUS | |
| +.Bl -tag -width Ds | |
| +.It 0 | |
| +Image processed successfully. | |
| +.It 1 | |
| +An error occurred. | |
| +.El | |
| +.Sh EXAMPLES | |
| +$ | |
| +.Nm | |
| +< image.png > image.ff | |
| +.Pp | |
| +$ | |
| +.Nm | |
| +< image.png | bzip2 > image.ff.bz2 | |
| +.Sh SEE ALSO | |
| +.Xr 2ff 1 , | |
| +.Xr bunzip2 1 , | |
| +.Xr bzip2 1 , | |
| +.Xr ff2png 1 , | |
| +.Xr jpg2ff 1 , | |
| +.Xr farbfeld 5 | |
| +.Sh AUTHORS | |
| +.An Laslo Hunhold Aq Mt [email protected] |