inherit meson

NAME="cygport"
VERSION=0.37.8
RELEASE=1
CATEGORY="Devel"
SUMMARY="Cygwin source packaging tool"
DESCRIPTION="cygport is the standard method for building and maintaining
packages for the Cygwin distribution."
HOMEPAGE="https://sourceware.org/cygwin-apps/cygport.html"
LICENSE="GPL-3.0-only"
SRC_URI="https://github.com/cygwin/cygport/${VERSION}/cygport-${VERSION}.tar.gz"

# this package contains no compiled Cygwin binaries
# REMOVE THE FOLLOWING LINE for packages which are to be compiled for each arch
ARCH=noarch

# Build dependencies only
BUILD_REQUIRES="git-archive-all groff help2man robodoc"
# runtime deps to go in setup.hint, and note the escaped newline
REQUIRES="autoconf automake binutils bzip2 coreutils diffstat diffutils \
dos2unix findutils file gawk gcc-core gcc-g++ grep gzip lftp libtool lndir \
lzip make openssh patch perl-common-sense perl-Authen-SASL perl-MIME-tools \
perl-Net-SMTP-SSL pkg-config rsync sed tar texinfo unzip util-linux wget which xz"

# We use the src_compile and src_test provided by meson.cygclass

src_install() {
	# meson is unique in being run from $S; otherwise this should be $B
	cd ${S}
	meson_install

	insinto /etc
	doins ${S}/data/cygport.conf
	make_etc_defaults /etc/cygport.conf /etc/X11/cygport-xvfb.conf
}
