From b942e93b6b8f762310dcf7cee03f015e9eb6afae Mon Sep 17 00:00:00 2001 From: Syndamia Date: Thu, 17 Feb 2022 22:38:09 +0200 Subject: Added (temporarely) discord 0.0.17 --- net-im/discord-bin/autogen.py | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 net-im/discord-bin/autogen.py (limited to 'net-im/discord-bin/autogen.py') diff --git a/net-im/discord-bin/autogen.py b/net-im/discord-bin/autogen.py new file mode 100644 index 0000000..3bb6e11 --- /dev/null +++ b/net-im/discord-bin/autogen.py @@ -0,0 +1,26 @@ +#!/usr/bin/env python3 + +import asyncio + + +async def generate_for(hub, url_path, release_name, binary_name, masked, **pkginfo): + url = await hub.pkgtools.fetch.get_url_from_redirect(f"https://discord.com/api/download{url_path}?platform=linux&format=deb") + + ebuild = hub.pkgtools.ebuild.BreezyBuild( + **pkginfo, + release_name=release_name, + binary_name=binary_name, + keywords="" if masked else "~amd64", + version=url.split("/")[-1].lstrip(f"{release_name}-").rstrip(".deb"), + artifacts=[hub.pkgtools.ebuild.Artifact(url=url)] + ) + + ebuild.push() + + +async def generate(hub, **pkginfo): + await generate_for(hub, "", "discord", "Discord", False, **pkginfo) + await generate_for(hub, "/canary", "discord-canary", "DiscordCanary", True, **pkginfo) + + +# vim: ts=4 sw=4 noet -- cgit v1.2.3