1
0
flewkey-overlay/dev-libs/mustach/mustach-0.99.ebuild
Ryan Fox 18daf09a34
dev-libs/mustach: New package
Package-Manager: Portage-3.0.12, Repoman-3.0.2
Signed-off-by: Ryan Fox <flewkey@2a03.party>
2021-01-30 01:22:30 +00:00

38 lines
811 B
Bash

# Copyright 2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
if [[ ${PV} != *9999* ]]; then
SRC_URI="https://gitlab.com/jobol/mustach/-/archive/${PV}/mustach-${PV}.tar.gz -> ${P}.tar.gz"
KEYWORDS="~amd64"
else
inherit git-r3
EGIT_REPO_URI="https://gitlab.com/jobol/mustach.git"
fi
DESCRIPTION="C implementation of mustache templating"
HOMEPAGE="https://gitlab.com/jobol/mustach"
LICENSE="ISC"
SLOT="0"
DEPEND="
dev-libs/json-c
"
RDEPEND="${DEPEND}"
BDEPEND=""
src_prepare() {
default
sed -i "s/\/lib/\/$(get_libdir)/g" "${S}/Makefile"
sed -i 's/-shared/$(lib_LDFLAGS)/' "${S}/Makefile"
}
src_compile() {
emake lib_LDFLAGS="-shared -Wl,-soname=libmustach.so"
}
src_install() {
emake DESTDIR="${D}" PREFIX="/usr" LIBDIR="/usr/$(get_libdir)" install
}