Files
alpha-quadrant/app-editors/zed/zed-1.1.8.ebuild
T

62 lines
1.1 KiB
Bash

# Copyright 1999-2019 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit desktop pax-utils xdg-utils
MY_PN="${PN/-bin}"
MY_P=${MY_PN}-${PV}
DESCRIPTION="A high-performance, multiplayer code editor"
HOMEPAGE="https://zed.dev"
SRC_URI="
amd64? ( https://github.com/zed-industries/zed/releases/download/v${PV}/zed-linux-x86_64.tar.gz -> ${MY_P}-amd64.tar.gz )
"
RESTRICT="mirror strip bindist"
LICENSE="GPL-3"
SLOT="0"
KEYWORDS="~amd64"
DEPEND="
>=media-libs/libpng-1.2.46
>=x11-libs/gtk+-2.24.8-r1:2
x11-libs/cairo
"
RDEPEND="
${DEPEND}
"
DOCS=( )
QA_PRESTRIPPED="opt/${MY_PN}/bin"
QA_SONAME="opt/${MY_PN}/lib"
src_prepare() {
default
sed -i 's!Exec=zed!Exec=zedit!g' share/applications/*
}
pkg_setup(){
use amd64 && S="${WORKDIR}/zed.app"
}
src_install(){
pax-mark m code
mkdir -p "${D}/opt/${MY_PN}" "${D}/usr/share"
cp -r bin lib libexec licenses.md "${D}/opt/${MY_PN}/"
cp -r share "${D}/usr/"
dosym "/opt/${MY_PN}/bin/zed" "/usr/bin/zedit"
newicon "${S}/share/icons/hicolor/512x512/apps/zed.png" zed.png
einstalldocs
}
pkg_postinst() {
xdg_icon_cache_update
xdg_desktop_database_update
}