pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

py-img2pdf: Add support for ALTERNATIVES



Module Name:	pkgsrc-wip
Committed By:	Leonardo Taccari <leot%NetBSD.org@localhost>
Pushed By:	leot
Date:		Sat Sep 5 17:49:00 2026 +0200
Changeset:	b974e86bad7ae682886bf6b045ccc63e27621341

Modified Files:
	py-img2pdf/Makefile
	py-img2pdf/PLIST
Added Files:
	py-img2pdf/ALTERNATIVES

Log Message:
py-img2pdf: Add support for ALTERNATIVES

Permit to coexists with different Python versions.

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=b974e86bad7ae682886bf6b045ccc63e27621341

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 py-img2pdf/ALTERNATIVES | 2 ++
 py-img2pdf/Makefile     | 4 ++++
 py-img2pdf/PLIST        | 4 ++--
 3 files changed, 8 insertions(+), 2 deletions(-)

diffs:
diff --git a/py-img2pdf/ALTERNATIVES b/py-img2pdf/ALTERNATIVES
new file mode 100644
index 0000000000..03bc539d9b
--- /dev/null
+++ b/py-img2pdf/ALTERNATIVES
@@ -0,0 +1,2 @@
+bin/img2pdf @PREFIX@/bin/img2pdf@PYVERSSUFFIX@
+bin/img2pdf-gui @PREFIX@/bin/img2pdf-gui@PYVERSSUFFIX@
diff --git a/py-img2pdf/Makefile b/py-img2pdf/Makefile
index 0202e6fedc..1d7d2f6663 100644
--- a/py-img2pdf/Makefile
+++ b/py-img2pdf/Makefile
@@ -18,6 +18,10 @@ DEPENDS+=	${PYPKGPREFIX}-pikepdf-[0-9]*:../../print/py-pikepdf
 
 REPLACE_PYTHON+=	src/img2pdf.py
 
+post-install:
+	${MV} ${DESTDIR}${PREFIX}/bin/img2pdf ${DESTDIR}${PREFIX}/bin/img2pdf${PYVERSSUFFIX}
+	${MV} ${DESTDIR}${PREFIX}/bin/img2pdf-gui ${DESTDIR}${PREFIX}/bin/img2pdf-gui${PYVERSSUFFIX}
+
 .include "../../lang/python/application.mk"
 .include "../../lang/python/wheel.mk"
 .include "../../mk/bsd.pkg.mk"
diff --git a/py-img2pdf/PLIST b/py-img2pdf/PLIST
index 3dd3f5c5b7..9e6abea3ab 100644
--- a/py-img2pdf/PLIST
+++ b/py-img2pdf/PLIST
@@ -1,6 +1,6 @@
 @comment $NetBSD$
-bin/img2pdf
-bin/img2pdf-gui
+bin/img2pdf${PYVERSSUFFIX}
+bin/img2pdf-gui${PYVERSSUFFIX}
 ${PYSITELIB}/${WHEEL_INFODIR}/METADATA
 ${PYSITELIB}/${WHEEL_INFODIR}/RECORD
 ${PYSITELIB}/${WHEEL_INFODIR}/WHEEL


Home | Main Index | Thread Index | Old Index