diff options
Diffstat (limited to 'app-crypt/osslsigncode/osslsigncode-2.5.ebuild')
-rw-r--r-- | app-crypt/osslsigncode/osslsigncode-2.5.ebuild | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/app-crypt/osslsigncode/osslsigncode-2.5.ebuild b/app-crypt/osslsigncode/osslsigncode-2.5.ebuild new file mode 100644 index 000000000000..c0d1773bcf38 --- /dev/null +++ b/app-crypt/osslsigncode/osslsigncode-2.5.ebuild @@ -0,0 +1,58 @@ +# 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 +} |