Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Thorium browser ebuild
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
blackteahamburger
n00b
n00b


Joined: 17 Feb 2024
Posts: 4

PostPosted: Sat Feb 17, 2024 11:15 am    Post subject: Thorium browser ebuild Reply with quote

I can't find an ebuild for Thorium browser, can someone provide one?
Related: https://github.com/Alex313031/thorium/issues/357.
Back to top
View user's profile Send private message
CarDGee
n00b
n00b


Joined: 14 Mar 2024
Posts: 1

PostPosted: Thu Mar 14, 2024 9:24 pm    Post subject: Reply with quote

This is a absolute mess and its not working but if anyone want to work on it here it is

Code:
EAPI=8
inherit desktop xdg unpacker

DESCRIPTION="Thorium Browser: A fast and secure browser for the modern web."
HOMEPAGE="https://github.com/Alex313031/thorium"
SRC_URI="https://github.com/Alex313031/thorium/releases/download/M${PV}/thorium-browser_${PV}_AVX2.deb"

LICENSE="BSD-3-Clause"
SLOT="0"
KEYWORDS="~amd64"

DEPEND="
    dev-libs/nss
    dev-libs/icu
"
RDEPEND="${DEPEND}"

S="${WORKDIR}"

src_unpack() {
    unpack_deb "${A}" || die "Failed to unpack deb file"
    mv "${WORKDIR}/opt/chromium.org/thorium" "${S}" || die "Failed to move files to ${S}"
}

src_install() {
    local install_dir="/opt/chromium.org/thorium"

    # Ensure that the directory exists
    dodir "${install_dir}"

    # Install Thorium resources
    insinto "${install_dir}"
    doins -r "${S}/opt/chromium.org/thorium/*" || die "Failed to install Thorium resources"

    # Install Thorium binaries
    exeinto "${install_dir}"
    doexe "${install_dir}/thorium" \
          "${install_dir}/thorium-browser" \
          "${install_dir}/thorium_shell" || die "Failed to install Thorium binaries"

    # Create symbolic links to binaries in /usr/bin
    dosym "${install_dir}/thorium-browser" "/usr/bin/thorium-browser" || die "Failed to create symbolic link for thorium-browser"
    dosym "${install_dir}/thorium" "/usr/bin/thorium" || die "Failed to create symbolic link for thorium"

    # Check if the icon file exists before trying to install it
    if [ -e "${install_dir}/thorium-browser.png" ]; then
        newicon "${install_dir}/thorium-browser.png" thorium-browser.png || die "Failed to install icon"
    else
        eerror "Icon file thorium-browser.png not found. Skipping installation."
    fi

    # Create desktop entry
    make_desktop_entry thorium-browser "Thorium Browser" thorium-browser.png "Network;WebBrowser;" || die "Failed to create desktop entry"
}


# Add multilib-strict-skip flag before any phases
export PORTAGE_EBUILD_PHASES="multilib-strict-skip ${PORTAGE_EBUILD_PHASES}"


[Moderator edit: added [code] tags to preserve output layout. -Hu]
Back to top
View user's profile Send private message
blackteahamburger
n00b
n00b


Joined: 17 Feb 2024
Posts: 4

PostPosted: Wed Jan 01, 2025 2:58 pm    Post subject: Reply with quote

Made one in gentoo-zh: https://github.com/microcai/gentoo-zh/tree/master/www-client/thorium-browser-bin

I dislike the complicated process to submit ebuilds to GURU, so I submitted it to a repository that I'm familiar with.
Back to top
View user's profile Send private message
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 20552

PostPosted: Thu Jan 02, 2025 4:10 am    Post subject: Reply with quote

Moved from Portage & Programming to Unsupported Software.
_________________
Quis separabit? Quo animo?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Unsupported Software All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum