tkurbad-overlay/sci-libs/libsml/libsml-9999.ebuild

72 lines
1.4 KiB
Bash
Raw Normal View History

# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
2021-06-23 14:52:35 +02:00
EAPI=7
2019-07-14 21:24:02 +02:00
MULTILIB_COMPAT=( abi_x86_64 )
inherit multilib-build eutils
if [[ ${PV} == "9999" ]]; then
EGIT_REPO_URI="https://github.com/volkszaehler/${PN}"
inherit git-r3
KEYWORDS=""
else
SRC_URI="https://github.com/volkszaehler/${PN}/archive/${PV} -> ${P}"
2019-07-14 21:24:02 +02:00
KEYWORDS="~amd64"
fi
DESCRIPTION="A library which implements the Smart Message Language (SML)"
HOMEPAGE="https://github.com/volkszaehler/libsml"
LICENSE="GPL-3"
SLOT="0"
IUSE="+examples"
RDEPEND="
sys-apps/util-linux
"
DEPEND="${RDEPEND}
virtual/pkgconfig"
2019-07-14 21:24:02 +02:00
EMULTILIB_PKG="true"
src_prepare() {
2019-07-14 21:24:02 +02:00
local lib64="$(get_libdir)"
sed -e "s:prefix = /usr/local:prefix = /usr:" \
-i ${S}/sml/Makefile \
|| die "sed failed"
sed -e "s:libdir = \${exec_prefix}/lib:libdir = \$\{exec_prefix\}/${lib64}:" \
-i ${S}/sml/Makefile \
|| die "sed failed"
sed -e "s@Version: 0.1@Version: 0.9@" \
-i ${S}/sml.pc \
|| die "sed failed"
if use examples ; then
sed -e "s@prefix = /usr/local@prefix = /usr@" \
-i ${S}/examples/Makefile \
|| die "sed failed"
fi
default
}
src_compile() {
emake -C sml
use examples && emake -C examples
}
src_install() {
DESTDIR="${D}" emake -C sml install
use examples && DESTDIR="${D}" emake -C examples install
2019-07-14 21:24:02 +02:00
insinto /usr/$(get_libdir)/pkgconfig
doins ${S}/sml.pc
}
src_test() {
emake -C test
}