# Template file for 'geany-editorconfig-plugin'
pkgname=geany-editorconfig-plugin
version=0.2.1
revision=1
make_build_args="EDITORCONFIG_PREFIX=/usr"
hostmakedepends="make pkg-config"
makedepends="geany-devel editorconfig-devel"
short_desc="EditorConfig plugin for Geany"
maintainer="zenobit <zen@osowoso.org>"
license="GPL-2.0-only"
homepage="https://github.com/editorconfig/editorconfig-geany"
distfiles="https://github.com/editorconfig/editorconfig-geany/archive/refs/tags/v${version}.tar.gz"
checksum=7df4990c49753aaece5a0994bd23eb9e55d0fd9c9f2947293cb13abe09341daa

CFLAGS+=" -fPIC"
LDFLAGS+=" -shared -leditorconfig"

do_build() {
	make ${makejobs} CC="${CC}" \
		CFLAGS+="$(pkg-config --cflags geany)" \
		LDFLAGS+="$(pkg-config --libs geany)"
}

do_install() {
	local plugindir=$(pkg-config --variable=libdir geany)/geany
	vinstall editorconfig-geany.so 755 "${plugindir}"
}
