Skip to content

Commit

Permalink
[skip ci] add ebuild for Gentoo
Browse files Browse the repository at this point in the history
  • Loading branch information
variar committed Apr 25, 2021
1 parent dbbb4c8 commit 8e6077e
Show file tree
Hide file tree
Showing 3 changed files with 99 additions and 0 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,14 +87,17 @@ Current release is 20.12. Binaries for all platforms can be downloaded from GitH

[ ![Release](https://img.shields.io/github/v/release/variar/klogg?style=flat)](https://github.com/variar/klogg/releases/tag/v20.12)

#### Windows
Windows installer is also available from Chocolatey:

[ ![Chocolatey](https://img.shields.io/chocolatey/v/klogg?style=flat)](https://chocolatey.org/packages/klogg)

#### Mac OS
Package for Mac can be installed from Homebrew

[ ![homebrew cask](https://img.shields.io/homebrew/cask/v/klogg?style=flat)](https://formulae.brew.sh/cask/klogg)

#### Linux
Linux packages are also available from DEB and RPM repositories.

For DEB add klogg artifactory repository, then install from apt:
Expand All @@ -119,6 +122,8 @@ sudo yum update
sudo yum install klogg
```

Gentoo users may grab ebuild from [packaging/linux/gentoo](https://github.com/variar/klogg/tree/master/packaging/linux/gentoo).

### Tesing builds

![CI Build and Release](https://github.com/variar/klogg/workflows/CI%20Build%20and%20Release/badge.svg)
Expand Down
75 changes: 75 additions & 0 deletions packaging/linux/gentoo/app-text/klogg/klogg-20.12.ebuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=7

inherit cmake

DESCRIPTION="A multi-platform GUI application that helps browse and search through long and complex log files. It is designed with programmers and system administrators in mind and can be seen as a graphical, interactive combination of grep, less, and tail"
HOMEPAGE="https://klogg.filimonov.dev"
SRC_URI="https://github.com/variar/klogg/archive/refs/tags/v${PV}.tar.gz"

LICENSE="GPL-3+"
SLOT="0"
KEYWORDS="~amd64 ~x86"

DEPEND="
dev-qt/qtcore:5
dev-qt/qtgui:5
dev-qt/qtwidgets:5
dev-qt/qtnetwork:5
dev-qt/qtxml:5
dev-qt/qtconcurrent:5
"

RDEPEND="${DEPEND}
x11-themes/hicolor-icon-theme
"

BDEPEND="
>=dev-util/cmake-3.12
"

IUSE="+sentry lto"

src_prepare() {
sed -e 's|share/doc/klogg|${CMAKE_INSTALL_DOCDIR}|' -i ${S}/CMakeLists.txt || die "sed CMAKE_INSTALL_DOCDIR"
sed -e 's|TBB_INSTALL_LIBRARY_DIR lib|TBB_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}|' -i ${S}/3rdparty/tbb/CMakeLists.txt || die "sed TBB_INSTALL_LIBRARY_DIR"

eapply_user
cmake_src_prepare
}

src_configure() {
local cmakeopts="-DWARNINGS_AS_ERRORS=OFF -DDISABLE_WERROR=ON"

if use sentry; then
cmakeopts+=" -DKLOGG_USE_SENTRY=ON"
else
cmakeopts+=" -DKLOGG_USE_SENTRY=OFF"
fi

if use lto; then
cmakeopts+=" -DUSE_LTO=ON"
else
cmakeopts+=" -DUSE_LTO=OFF"
fi

local mycmakeargs=(
${cmakeopts}
)
export KLOGG_VERSION=${PV}.0.813
cmake_src_configure
}

src_compile() {
cmake_src_compile ${PN}
}

pkg_postinst() {
xdg_desktop_database_update
}

pkg_postrm() {
xdg_desktop_database_update
}
19 changes: 19 additions & 0 deletions packaging/linux/gentoo/app-text/klogg/metadata.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>anton.filimonov@gmail.com</email>
<name>Anton Filimonov</name>
</maintainer>
<upstream>
<remote-id type="github">variar/klogg</remote-id>
</upstream>
<use>
<flag name="sentry">
Enable crash reporting using sentry.io.
</flag>
<flag name="lto">
Build with link time optimization (LTO).
</flag>
</use>
</pkgmetadata>

0 comments on commit 8e6077e

Please sign in to comment.