diff options
author | David Seifert <soap@gentoo.org> | 2017-02-12 10:56:29 +0100 |
---|---|---|
committer | David Seifert <soap@gentoo.org> | 2017-02-12 10:57:20 +0100 |
commit | dda894edbd7a7d611fbec0c3c18bce3c5f66ca5d (patch) | |
tree | 43537af80c39cb329f11233bac46a85b6301de13 /net-libs/osptoolkit/osptoolkit-4.13.0.ebuild | |
parent | games-action/openlierox: restrict mirroring (diff) | |
download | gentoo-dda894edbd7a7d611fbec0c3c18bce3c5f66ca5d.tar.gz gentoo-dda894edbd7a7d611fbec0c3c18bce3c5f66ca5d.tar.bz2 gentoo-dda894edbd7a7d611fbec0c3c18bce3c5f66ca5d.zip |
net-libs/osptoolkit: Version bump to 4.13.0
* Also fix GCC 5 bug
Bug: https://bugs.gentoo.org/show_bug.cgi?id=581058
Package-Manager: Portage-2.3.3, Repoman-2.3.1
Diffstat (limited to 'net-libs/osptoolkit/osptoolkit-4.13.0.ebuild')
-rw-r--r-- | net-libs/osptoolkit/osptoolkit-4.13.0.ebuild | 98 |
1 files changed, 98 insertions, 0 deletions
diff --git a/net-libs/osptoolkit/osptoolkit-4.13.0.ebuild b/net-libs/osptoolkit/osptoolkit-4.13.0.ebuild new file mode 100644 index 000000000000..a9afec67b4dd --- /dev/null +++ b/net-libs/osptoolkit/osptoolkit-4.13.0.ebuild @@ -0,0 +1,98 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=6 + +inherit toolchain-funcs + +S_DATE="20161107" + +DESCRIPTION="Open Settlement Protocol development kit" +HOMEPAGE="http://www.transnexus.com/OSP%20Toolkit/OSP%20Toolkit%20Documents/OSP%20Toolkit%20Documents.htm" +SRC_URI="mirror://sourceforge/osp-toolkit/OSPToolkit-${PV}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="" + +RDEPEND="dev-libs/openssl:0=" +DEPEND="${RDEPEND}" + +S=${WORKDIR}/TK-${PV//./_}-${S_DATE} + +# TODO: +# generate a shared lib + +# NOTES: +# osptest isn't a test that can be used for src_test, it's part of the toolkit + +PATCHES=( + "${FILESDIR}"/${PN}-4.13.0-gcc5.patch +) + +src_prepare() { + default + + # remove -O and use users CFLAGS, see bug 241034 + sed -i -e "s/ -O//" -e "s/^CFLAGS =/CFLAGS +=/" src/Makefile test/Makefile \ + enroll/Makefile || die "patching Makefiles failed" + + # use users LDFLAGS + sed -i -e "s:LFLAGS:LDFLAGS:" test/Makefile \ + || die "patching test/Makefile failed" + sed -i -e "s:\(\$(LIBS\):\$(LDFLAGS) \1:" enroll/Makefile \ + || die "patching enroll/Makefile failed" + + # change lib dir to $(get_libdir) + sed -i -e "s:\$(INSTALL_PATH)/lib:\$(INSTALL_PATH)/$(get_libdir):" \ + src/Makefile || die "patching src/Makefile failed" + + # test.cfg is located in /etc/${PN}/test.cfg + sed -i -e \ + "s:\(^#define CONFIG_FILENAME.*\"\).*\(test.cfg\"\):\1/etc/${PN}/\2:" \ + test/test_app.c || die "patching test/test_app.c failed" + + # configure enroll.sh + sed -i -e "s:^\(OPENSSL_CONF\).*:\1=/etc/${PN}/openssl.cnf:" \ + -e "s:^\(RANDFILE\).*:\1=\/etc/${PN}/.rnd:" \ + bin/enroll.sh || die "patching bin/enroll.sh failed" + + # change enroll path + sed -i -e "s:^\(enroll\):/usr/lib/${PN}/\1:" \ + bin/enroll.sh || die "patching bin/enroll.sh failed" +} + +src_compile() { + emake CC="$(tc-getCC)" AR="$(tc-getAR)" -C src build + emake CC="$(tc-getCC)" AR="$(tc-getAR)" -C enroll linux + emake CC="$(tc-getCC)" AR="$(tc-getAR)" -C test linux +} + +src_install() { + emake -C src INSTALL_PATH="${ED%/}"/usr install + + local DOCS=( README.txt RELNOTES.txt ) + einstalldocs + + insinto /etc/${PN} + doins bin/test.cfg bin/.rnd bin/openssl.cnf + + # install enroll and enroll.sh in lib dir to prevent executing them + local ospdir=/usr/$(get_libdir)/${PN} + dodir ${ospdir} + exeinto ${ospdir} + doexe bin/enroll bin/enroll.sh + + # use the symlink to execute enroll.sh + dosym ${ospdir}/enroll.sh /usr/bin/ospenroll + + newbin bin/test_app osptest +} + +pkg_postinst() { + elog "OSP test application is now available with 'osptest' command" + elog "OSP enroll application is now available with 'ospenroll' command" + elog "ospenroll is using /etc/${PN}/openssl.cnf as an openssl configuration" +} |