1
0
mirror of https://github.com/Zygo/bees.git synced 2025-05-17 21:35:45 +02:00

Installation: Add Gentoo ebuild

This commit adds an ebuild for Gentoo. Version 9999 is building live
from current git, currently using kakra:integration because it has some
installation and build fixes important for Gentoo.

Signed-off-by: Kai Krakow <kai@kaishome.de>
This commit is contained in:
Kai Krakow 2018-01-11 03:03:17 +01:00
parent 634a1d0bf6
commit 365a913a26
3 changed files with 74 additions and 1 deletions

View File

@ -330,10 +330,21 @@ Bees can be installed by following one these instructions:
Arch package
------------
Bees is availabe Arch Linux AUR. Install with:
Bees is availabe in Arch Linux AUR. Install with:
`$ pacaur -S bees-git`
Gentoo ebuild
-------------
Bees is available as a Gentoo ebuild. Just copy `bees-9999.ebuild` from
`contrib/gentoo` including the `files` subdirectory to your local
overlay category `sys-fs`.
You can copy the ebuild to match a Bees version number, and it will
build that tagged version. It is partly supported since v0.5,
previous versions won't work.
Build from source
-----------------

View File

@ -0,0 +1,42 @@
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=6
inherit git-r3 eutils multilib
DESCRIPTION="Best-Effort Extent-Same, a btrfs dedup agent"
HOMEPAGE="https://github.com/Zygo/bees"
if [[ ${PV} == "9999" ]] ; then
EGIT_REPO_URI="https://github.com/kakra/bees.git"
EGIT_BRANCH="integration"
else
IUSE=""
SRC_URI="https://github.com/Zygo/bees/archive/v${PV}.tar.gz -> bees-${PV}.tar.gz"
fi
PATCHES="
${FILESDIR}/v0.5-gentoo_build.patch
"
LICENSE="GPL-3"
SLOT="0"
KEYWORDS=""
IUSE=""
DEPEND="
>=sys-apps/util-linux-2.30.2
>=sys-devel/gcc-4.9
>=sys-fs/btrfs-progs-4.1
"
RDEPEND="${DEPEND}"
DOCS="README.md COPYING"
HTML_DOCS="README.html"
src_prepare() {
default
echo LIBDIR=$(get_libdir) >>${S}/localconf
}

View File

@ -0,0 +1,20 @@
diff --git a/localconf b/localconf
new file mode 100644
index 0000000..7705cbb
--- /dev/null
+++ b/localconf
@@ -0,0 +1,2 @@
+PREFIX=/
+LIBEXEC_PREFIX=/usr/libexec
diff --git a/makeflags b/makeflags
index f5983cb..0348623 100644
--- a/makeflags
+++ b/makeflags
@@ -1,4 +1,3 @@
-CCFLAGS = -Wall -Wextra -Werror -O3 -march=native -I../include -ggdb -D_FILE_OFFSET_BITS=64
-# CCFLAGS = -Wall -Wextra -Werror -O0 -I../include -ggdb -fpic -D_FILE_OFFSET_BITS=64
-CFLAGS = $(CCFLAGS) -std=c99
-CXXFLAGS = $(CCFLAGS) -std=c++11 -Wold-style-cast
+CCFLAGS = -O3 -I../include -fpic -D_FILE_OFFSET_BITS=64
+CFLAGS += $(CCFLAGS) -std=c99
+CXXFLAGS += $(CCFLAGS) -std=c++11 -Wold-style-cast