# -*- coding: utf-8; mode: tcl; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 4; truncate-lines: t -*- vim:fenc=utf-8:et:sw=4:ts=4:sts=4

PortSystem      1.0
PortGroup	github 1.0
PortGroup	openssl 1.0

github.setup	apankrat sign 632d243fb9ccc1584118a37a5dd9b152d4454c83
# Change github.tarball_from to 'releases' or 'archive' next update
github.tarball_from tarball
version		1.1
revision	3
categories	security
license		BSD zlib ISC
maintainers	nomaintainer
description	sign is a file signing and signature verification utility
long_description	{*}${description}

homepage	http://swapped.cc/sign/
checksums		rmd160 f145829ef6f47ce96b8fe8bafddc7cf9d02c8aa4 \
			sha256 1fe77931d03c0bac6b36a9dc12af42439fef3b0d7a43fe8c3c8d44fdf20ff04d

openssl.branch 1.0
openssl.configure build_flags

use_configure	no
build.env	CC=${configure.cc} \
		"CFLAGS=${configure.cflags} [get_canonical_archflags cc]" \
		"CPPFLAGS=${configure.cppflags}" \
		"LDFLAGS=${configure.ldflags}"

destroot	{
	xinstall ${worksrcpath}/sign ${destroot}${prefix}/bin
	ln -sf sign ${destroot}${prefix}/bin/unsign
	xinstall -m 644 ${worksrcpath}/man/sign.1 \
		${destroot}${prefix}/share/man/man1
	xinstall -d ${destroot}${prefix}/share/doc/${name}
	xinstall -m 644 ${worksrcpath}/README.md \
		${destroot}${prefix}/share/doc/${name}
}