You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/app-crypt/osslsigncode/osslsigncode-2.5.ebuild

59 lines
1.3 KiB

# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
PYTHON_COMPAT=( python3_{9..11} )
OSSLSIGNCODE_TEST_FILES=( unsigned.{cat,ex_,exe,msi} )
inherit cmake python-any-r1
DESCRIPTION="Platform-independent tool for Authenticode signing of EXE/CAB files"
HOMEPAGE="https://github.com/mtrojnar/osslsigncode"
SRC_URI="https://github.com/mtrojnar/osslsigncode/releases/download/${PV}/${P}.tar.gz"
for test_file in "${OSSLSIGNCODE_TEST_FILES[@]}" ; do
SRC_URI+=" test? ( https://github.com/mtrojnar/osslsigncode/raw/${PV}/tests/files/${test_file} -> ${PN}-test-${test_file} )"
done
unset test_file
LICENSE="GPL-3"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="curl test"
RESTRICT="!test? ( test )"
RDEPEND="
dev-libs/openssl:=
curl? ( net-misc/curl )
"
DEPEND="${RDEPEND}"
BDEPEND="test? ( ${PYTHON_DEPS} )"
pkg_setup() {
use test && python-any-r1_pkg_setup
}
src_prepare() {
if use test ; then
local test_file
for test_file in "${OSSLSIGNCODE_TEST_FILES[@]}" ; do
cp "${DISTDIR}"/${PN}-test-${test_file} tests/files/${test_file} || die
done
unset test_file
fi
cmake_src_prepare
}
src_configure() {
local mycmakeargs=(
$(cmake_use_find_package curl CURL)
)
cmake_src_configure
}
src_test() {
cmake_src_test -j1
}