summaryrefslogtreecommitdiffstats
path: root/packages/games-misc/hydra-launcher/hydra-launcher-4.1.6.exheres-0
blob: f12714b107a399d260cbce431bfe0faabecc2293 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
# Copyright 2026 Gurov <thuggerthugger1@duck.com>
# Distributed under the terms of the GNU General Public License v2

require freedesktop-desktop freedesktop-mime gtk-icon-cache

SUMMARY="Open-source gaming platform and launcher"
HOMEPAGE="https://github.com/hydralauncher/hydra"
DOWNLOADS="${HOMEPAGE}/releases/download/v${PV}/hydralauncher_${PV}_amd64.deb -> ${PNV}.deb"

LICENCES="MIT"
SLOT="0"
PLATFORMS="~amd64"
RESTRICT="mirror strip test"

DEPENDENCIES="
    build:
        app-arch/libarchive

    run:
        dev-libs/at-spi2-core
        dev-libs/expat
        dev-libs/glib:2
        dev-libs/libsecret
        dev-libs/nspr
        dev-libs/nss
        media-libs/fontconfig
        net-misc/aria2
        net-print/cups
        sys-apps/dbus
        sys-apps/util-linux
        sys-libs/zlib
        sys-sound/alsa-lib
        x11-apps/xdg-utils
        x11-dri/libdrm
        x11-dri/mesa
        x11-libs/cairo
        x11-libs/gdk-pixbuf:2.0
        x11-libs/gtk+:3
        x11-libs/libX11
        x11-libs/libXcomposite
        x11-libs/libXdamage
        x11-libs/libXext
        x11-libs/libXfixes
        x11-libs/libXrandr
        x11-libs/libXScrnSaver
        x11-libs/libXtst
        x11-libs/libxcb
        x11-libs/libnotify
        x11-libs/pango
"

WORK="${WORKBASE}/${PNV}"

pkg_setup() {
    exdirectory --allow /opt
}

src_unpack() {
    edo mkdir -p "${WORK}"
    edo bsdtar -xOf "${FETCHEDDIR}/${PNV}.deb" data.tar.xz > "${WORKBASE}/data.tar.xz"
    edo tar -xf "${WORKBASE}/data.tar.xz" -C "${WORK}"
}

src_install() {
    edo mkdir -p "${IMAGE}/opt/Hydra"
    edo cp -a "${WORK}/opt/Hydra/." "${IMAGE}/opt/Hydra/"

    insinto /usr/share/applications
    doins "${WORK}/usr/share/applications/hydralauncher.desktop"
    insinto /usr/share/icons/hicolor/512x512/apps
    doins "${WORK}/usr/share/icons/hicolor/512x512/apps/hydralauncher.png"

    dodir /usr/$(exhost --target)/bin
    dosym /opt/Hydra/hydralauncher /usr/$(exhost --target)/bin/hydralauncher
}

pkg_postinst() {
    freedesktop-mime_pkg_postinst
    freedesktop-desktop_pkg_postinst
    gtk-icon-cache_pkg_postinst
}

pkg_postrm() {
    freedesktop-mime_pkg_postrm
    freedesktop-desktop_pkg_postrm
    gtk-icon-cache_pkg_postrm
}