Skip to content

Instantly share code, notes, and snippets.

@infirit
Created October 27, 2018 14:33
Show Gist options
  • Select an option

  • Save infirit/b303988d33415847f4db2ffec14eec77 to your computer and use it in GitHub Desktop.

Select an option

Save infirit/b303988d33415847f4db2ffec14eec77 to your computer and use it in GitHub Desktop.
bluez-alsa ebuild for meson
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit meson multilib-minimal
DESCRIPTION="Bluetooth Audio ALSA Backend"
HOMEPAGE="https://github.com/Arkq/bluez-alsa"
if [[ ${PV} == "9999" ]] ; then
inherit git-r3
EGIT_REPO_URI="https://github.com/infirit/${PN}"
EGIT_BRANCH="meson"
else
SRC_URI="https://github.com/Arkq/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
KEYWORDS="~amd64 ~x86"
fi
LICENSE="MIT"
SLOT="0"
IUSE="aac debug hcitop static-libs"
RDEPEND=">=dev-libs/glib-2.26[dbus,${MULTILIB_USEDEP}]
>=media-libs/alsa-lib-1.0[${MULTILIB_USEDEP}]
>=media-libs/sbc-1.2[${MULTILIB_USEDEP}]
>=net-wireless/bluez-5.0[${MULTILIB_USEDEP}]
aac? ( >=media-libs/fdk-aac-0.1.1[${MULTILIB_USEDEP}] )
hcitop? (
dev-libs/libbsd
sys-libs/ncurses:0=
)"
DEPEND="${RDEPEND}
virtual/pkgconfig"
src_prepare() {
default
}
multilib_src_configure() {
local emesonargs=(
-Drfcomm=true
$(meson_use aac)
$(meson_use debug)
-Ddefault_library=$(usex static-libs static shared)
)
if multilib_is_native_abi; then
emasonargs+=( $(meson_use hcitop))
fi
meson_src_configure
}
multilib_src_compile() {
meson_src_compile
}
multilib_src_install() {
meson_src_install
find "${ED}" -name "*.la" -delete || die
newinitd "${FILESDIR}"/bluealsa-init.d bluealsa
newconfd "${FILESDIR}"/bluealsa-conf.d-2 bluealsa
}
pkg_postinst() {
elog "Users can use this service when they are members of the \"audio\" group."
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment