git: 2f8f54d80589 - main - devel/py-magnet2torrent: New port: Turn a bittorrent magnet links into a .torrent file

From: Nuno Teixeira <eduardo_at_FreeBSD.org>
Date: Mon, 30 Sep 2024 19:40:03 UTC
The branch main has been updated by eduardo:

URL: https://cgit.FreeBSD.org/ports/commit/?id=2f8f54d80589f6c2dd5e44512c23564ab23bb6fc

commit 2f8f54d80589f6c2dd5e44512c23564ab23bb6fc
Author:     Nuno Teixeira <eduardo@FreeBSD.org>
AuthorDate: 2024-09-30 19:27:23 +0000
Commit:     Nuno Teixeira <eduardo@FreeBSD.org>
CommitDate: 2024-09-30 19:39:51 +0000

    devel/py-magnet2torrent: New port: Turn a bittorrent magnet links into a .torrent file
    
    Pure python project to turn a magnet link into a .torrent file. The goal
    is to do it as fast as possible.
    
    WWW: https://github.com/JohnDoee/magnet2torrent
---
 devel/Makefile                    |  1 +
 devel/py-magnet2torrent/Makefile  | 31 +++++++++++++++++++++++++++++++
 devel/py-magnet2torrent/distinfo  |  3 +++
 devel/py-magnet2torrent/pkg-descr |  2 ++
 4 files changed, 37 insertions(+)

diff --git a/devel/Makefile b/devel/Makefile
index c9c346ca26e3..68192d2c0cde 100644
--- a/devel/Makefile
+++ b/devel/Makefile
@@ -5152,6 +5152,7 @@
     SUBDIR += py-mac-vendor-lookup
     SUBDIR += py-macholib
     SUBDIR += py-magic
+    SUBDIR += py-magnet2torrent
     SUBDIR += py-mailcap-fix
     SUBDIR += py-makefun
     SUBDIR += py-manuel
diff --git a/devel/py-magnet2torrent/Makefile b/devel/py-magnet2torrent/Makefile
new file mode 100644
index 000000000000..b606d56e89ff
--- /dev/null
+++ b/devel/py-magnet2torrent/Makefile
@@ -0,0 +1,31 @@
+PORTNAME=	magnet2torrent
+DISTVERSION=	1.2.1
+CATEGORIES=	devel python
+MASTER_SITES=	PYPI
+PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
+
+MAINTAINER=	eduardo@FreeBSD.org
+COMMENT=	Turn a bittorrent magnet links into a .torrent file
+WWW=		https://github.com/JohnDoee/magnet2torrent
+
+LICENSE=	MIT
+LICENSE_FILE=	${WRKSRC}/LICENSE.md
+
+BUILD_DEPENDS=	${PY_SETUPTOOLS} \
+		${PYTHON_PKGNAMEPREFIX}wheel>0:devel/py-wheel@${PY_FLAVOR}
+RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}aiohttp>0:www/py-aiohttp@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}expiringdict>0:devel/py-expiringdict@${PY_FLAVOR}
+
+USES=		python
+USE_PYTHON=	autoplist pep517
+
+NO_ARCH=	yes
+
+PORTDOCS=	README.md
+OPTIONS_DEFINE=	DOCS
+
+post-install-DOCS-on:
+	@${MKDIR} ${STAGEDIR}${DOCSDIR}
+	(cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${STAGEDIR}${DOCSDIR})
+
+.include <bsd.port.mk>
diff --git a/devel/py-magnet2torrent/distinfo b/devel/py-magnet2torrent/distinfo
new file mode 100644
index 000000000000..ba025edf0eb9
--- /dev/null
+++ b/devel/py-magnet2torrent/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1727702386
+SHA256 (magnet2torrent-1.2.1.tar.gz) = 4ba53d304f1db33d33fe227aee5b34f6e640fd2d3199ff0ec3d8cc050cded631
+SIZE (magnet2torrent-1.2.1.tar.gz) = 24022
diff --git a/devel/py-magnet2torrent/pkg-descr b/devel/py-magnet2torrent/pkg-descr
new file mode 100644
index 000000000000..c1e39951b4bc
--- /dev/null
+++ b/devel/py-magnet2torrent/pkg-descr
@@ -0,0 +1,2 @@
+Pure python project to turn a magnet link into a .torrent file. The goal
+is to do it as fast as possible.