git: 6996cf728d11 - main - print/shrinkpdf: Update to 1.1, bump PORTEPOCH

From: Michael Gmelin <grembo_at_FreeBSD.org>
Date: Wed, 13 Jul 2022 13:00:10 UTC
The branch main has been updated by grembo:

URL: https://cgit.FreeBSD.org/ports/commit/?id=6996cf728d113a8fa8e34dc41b016f0cfbfa2340

commit 6996cf728d113a8fa8e34dc41b016f0cfbfa2340
Author:     Michael Gmelin <grembo@FreeBSD.org>
AuthorDate: 2022-07-13 12:56:59 +0000
Commit:     Michael Gmelin <grembo@FreeBSD.org>
CommitDate: 2022-07-13 12:56:59 +0000

    print/shrinkpdf: Update to 1.1, bump PORTEPOCH
    
    Upstream moved to github and started tagging releases.
---
 print/shrinkpdf/Makefile             | 32 ++++++++++++++++----------------
 print/shrinkpdf/distinfo             |  6 +++---
 print/shrinkpdf/files/shrinkpdf.1.in | 28 +++++++++++++++++-----------
 print/shrinkpdf/pkg-descr            |  2 +-
 4 files changed, 37 insertions(+), 31 deletions(-)

diff --git a/print/shrinkpdf/Makefile b/print/shrinkpdf/Makefile
index 537695447edf..f13f03e61160 100644
--- a/print/shrinkpdf/Makefile
+++ b/print/shrinkpdf/Makefile
@@ -1,26 +1,26 @@
-PORTNAME=	shrinkpdf
-PORTVERSION=	20191221
-CATEGORIES=	print graphics
-MASTER_SITES=	http://www.alfredklomp.com/programming/shrinkpdf/
-DISTNAME=	${PORTNAME}.sh
-EXTRACT_SUFX=	# none
-EXTRACT_ONLY=	# none
+PORTNAME=		shrinkpdf
+PORTVERSION=		1.1
+DISTVERSIONPREFIX=	v
+PORTEPOCH=		1
+CATEGORIES=		print graphics
 
-MAINTAINER=	grembo@FreeBSD.org
-COMMENT=	Simple wrapper around Ghostscript to reduce the file size of PDFs
+MAINTAINER=		grembo@FreeBSD.org
+COMMENT=		Simple wrapper around Ghostscript to reduce the file size of PDFs
 
-LICENSE=	BSD3CLAUSE
+LICENSE=		BSD3CLAUSE
 
-USES=		ghostscript:run
-SUB_FILES=	${PORTNAME}.1
+USES=			ghostscript:run
+USE_GITHUB=		yes
+GH_ACCOUNT=		aklomp
+SUB_FILES=		${PORTNAME}.1
 
-NO_BUILD=	yes
-NO_ARCH=	yes
+NO_BUILD=		yes
+NO_ARCH=		yes
 
-PLIST_FILES=	bin/${PORTNAME} man/man1/${PORTNAME}.1.gz
+PLIST_FILES=		bin/${PORTNAME} man/man1/${PORTNAME}.1.gz
 
 do-install:
-	${INSTALL_SCRIPT} ${DISTDIR}/${PORTNAME}.sh \
+	${INSTALL_SCRIPT} ${WRKSRC}/${PORTNAME}.sh \
 		${STAGEDIR}${PREFIX}/bin/${PORTNAME}
 	${INSTALL_MAN} ${WRKDIR}/shrinkpdf.1 ${STAGEDIR}${MANPREFIX}/man/man1
 
diff --git a/print/shrinkpdf/distinfo b/print/shrinkpdf/distinfo
index 6bd2ff566802..802a1ddab2b8 100644
--- a/print/shrinkpdf/distinfo
+++ b/print/shrinkpdf/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1576932323
-SHA256 (shrinkpdf.sh) = 2aa47759a945165e119b84b99d1042c63fceb1ec2692145e250b4f78ec032662
-SIZE (shrinkpdf.sh) = 3114
+TIMESTAMP = 1657715325
+SHA256 (aklomp-shrinkpdf-v1.1_GH0.tar.gz) = e02cd491c6f7abbc5c129227dbcfe5257fc9a18b40129af29967be1542cddaaa
+SIZE (aklomp-shrinkpdf-v1.1_GH0.tar.gz) = 3754
diff --git a/print/shrinkpdf/files/shrinkpdf.1.in b/print/shrinkpdf/files/shrinkpdf.1.in
index 9383a6f47cac..4a66a843fa6e 100644
--- a/print/shrinkpdf/files/shrinkpdf.1.in
+++ b/print/shrinkpdf/files/shrinkpdf.1.in
@@ -24,7 +24,7 @@
 .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd December 21, 2019
+.Dd July 13, 2022
 .Dt SHRINKPDF 1
 .Os
 .Sh NAME
@@ -32,9 +32,10 @@
 .Nd A simple wrapper around Ghostscript to reduce the file size of PDFs
 .Sh SYNOPSIS
 .Nm
+.Op Fl gh
+.Op Fl o Ar outfile
+.Op Fl r Ar res
 .Ar infile
-.Op outfile
-.Op resolution_in_dpi
 .Sh DESCRIPTION
 Inspired by some code found in an OpenOffice Python script,
 .Nm
@@ -42,12 +43,17 @@ feeds a PDF through Ghostscript, which performs lossy recompression
 by such methods as downsampling the images to a lower resolution.
 The result should be (but not always is) a much smaller file.
 .Pp
-If invoked without
-.Op outfile ,
-the shrunk file is written to standard output.
-If invoked without
-.Op resolution_in_dpi ,
-a default resolution of 72 dpi is used.
+The following options are available:
+.Bl -tag -width Fl
+.It Fl g
+Enable grayscale conversion which can further reduce output size.
+.It Fl h
+Show help screen.
+.It Fl o Ar outfile
+Output file, default is standard output.
+.It Fl r Ar res
+Resolution in DPI, default is 72.
+.El
 .Pp
 If both
 .Op infile
@@ -61,11 +67,11 @@ Reduce PDF resolution to 72 dpi:
 .Dl $ shrinkpdf myfile.pdf >myfile-72dpi.pdf
 .Pp
 Reduce PDF resolution to 300 dpi:
-.Dl $ shrinkpdf myfile.pdf - 300 >myfile-300dpi.pdf
+.Dl $ shrinkpdf -r 300 myfile.pdf >myfile-300dpi.pdf
 .Pp
 Reduce PDF resolution to 150 dpi, specify
 .Op outfile :
-.Dl $ shrinkpdf myfile.pdf myfile-150dpi.pdf 150
+.Dl $ shrinkpdf -o myfile-150dpi.pdf -r 150 myfile.pdf
 .Sh SEE ALSO
 .Xr gs 1
 .Sh AUTHORS
diff --git a/print/shrinkpdf/pkg-descr b/print/shrinkpdf/pkg-descr
index 96fdf21a8589..b9a7bab3aece 100644
--- a/print/shrinkpdf/pkg-descr
+++ b/print/shrinkpdf/pkg-descr
@@ -3,4 +3,4 @@ The script feeds a PDF through Ghostscript, which performs lossy
 recompression by such methods as downsampling the images to 72dpi. The
 result should be (but not always is) a much smaller file.
 
-WWW: http://www.alfredklomp.com/programming/shrinkpdf/
+WWW: https://github.com/aklomp/shrinkpdf