| 1 |
# Copyright 1999-2009 Gentoo Foundation
|
| 2 |
# Distributed under the terms of the GNU General Public License v2
|
| 3 |
# $Header: /var/cvsroot/gentoo-x86/net-libs/osptoolkit/osptoolkit-3.3.6-r1.ebuild,v 1.1 2009/02/17 05:08:42 darkside Exp $
|
| 4 |
|
| 5 |
EAPI="2"
|
| 6 |
|
| 7 |
inherit eutils
|
| 8 |
|
| 9 |
DESCRIPTION="OSP (Open Settlement Protocol) library"
|
| 10 |
HOMEPAGE="http://www.transnexus.com/"
|
| 11 |
SRC_URI="http://www.transnexus.com/OSP%20Toolkit/Toolkits%20for%20Download/OSPToolkit-${PV}.tar.gz"
|
| 12 |
|
| 13 |
LICENSE="BSD"
|
| 14 |
SLOT="0"
|
| 15 |
KEYWORDS="x86"
|
| 16 |
|
| 17 |
IUSE=""
|
| 18 |
|
| 19 |
RDEPEND="dev-libs/openssl"
|
| 20 |
DEPEND="${RDEPEND}"
|
| 21 |
|
| 22 |
S="${WORKDIR}"/TK-${PV//./_}-20060303
|
| 23 |
|
| 24 |
src_prepare() {
|
| 25 |
# change lib dir to $(LIBDIR)
|
| 26 |
# and use users CFLAGS, see bug #241034
|
| 27 |
sed -i -e "s:\$(INSTALL_PATH)/lib:\$(INSTALL_PATH)/\$(LIBDIR):" \
|
| 28 |
-e "s:CFLAGS\t= -O:CFLAGS\t+= :" \
|
| 29 |
src/Makefile || die "patching src/Makefile failed"
|
| 30 |
|
| 31 |
sed -i -e "/CFLAGS /d" enroll/Makefile \
|
| 32 |
|| die "patching enroll/Makefile failed"
|
| 33 |
|
| 34 |
sed -i -e "s/CFLAGS = -g/CFLAGS +=/" test/Makefile \
|
| 35 |
|| die "patching test/Makefile failed"
|
| 36 |
}
|
| 37 |
|
| 38 |
src_compile() {
|
| 39 |
emake -C src build || die "emake libosp failed"
|
| 40 |
emake -C enroll linux || die "emake enroll failed"
|
| 41 |
emake -C test linux || die "emake test failed"
|
| 42 |
}
|
| 43 |
|
| 44 |
src_install() {
|
| 45 |
dodir /usr/include /usr/$(get_libdir)
|
| 46 |
|
| 47 |
emake -C src INSTALL_PATH="${D}"/usr LIBDIR=$(get_libdir) \
|
| 48 |
install || die "make install failed"
|
| 49 |
|
| 50 |
sed -i -e "s:^\(OPENSSL_CONF\).*:\1=/etc/ssl/openssl.cnf:" \
|
| 51 |
-e "s:^\(RANDFILE\).*:\1=/etc/ssl/.rnd:" \
|
| 52 |
bin/enroll.sh || die "patching bin/enroll.sh failed"
|
| 53 |
|
| 54 |
dosbin bin/enroll* || die "dosbin failed"
|
| 55 |
newbin bin/test_app osp_test_app || die "newbin failed"
|
| 56 |
|
| 57 |
dodoc *.txt || die "dodoc failed"
|
| 58 |
|
| 59 |
insinto /usr/share/doc/${PF}
|
| 60 |
doins bin/test.cfg || die "doins failed"
|
| 61 |
}
|
| 62 |
|
| 63 |
pkg_postinst() {
|
| 64 |
elog "The OSP test application is located in ${ROOT}usr/bin/osp_test_app"
|
| 65 |
elog "See ${ROOT}usr/share/doc/${PF}/test.cfg for a sample test.cfg for osp_test_app"
|
| 66 |
}
|