/[gentoo-x86]/net-libs/cvm/cvm-0.96.ebuild
Gentoo

Contents of /net-libs/cvm/cvm-0.96.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.5 - (show annotations) (download)
Sun Dec 28 16:29:23 2014 UTC (5 years, 11 months ago) by titanofold
Branch: MAIN
CVS Tags: HEAD
Changes since 1.4: +2 -2 lines
Rename virtual/postgresql to dev-db/postgresql

(Portage version: 2.2.14/cvs/Linux x86_64, signed Manifest commit with key D1BBFDA0)

1 # Copyright 1999-2014 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/net-libs/cvm/cvm-0.96.ebuild,v 1.4 2014/11/03 13:40:09 titanofold Exp $
4
5 EAPI=2
6
7 inherit toolchain-funcs eutils
8
9 DESCRIPTION="Credential Validation Modules by Bruce Guenter"
10 HOMEPAGE="http://untroubled.org/cvm/"
11 SRC_URI="${HOMEPAGE}archive/${P}.tar.gz"
12
13 LICENSE="GPL-2"
14 SLOT="0"
15 KEYWORDS="~amd64 ~ppc ~sparc ~x86"
16 IUSE="mysql postgres test vpopmail"
17
18 RDEPEND="dev-db/cdb"
19 DEPEND="${RDEPEND}
20 >=dev-libs/bglibs-1.041
21 mysql? ( virtual/mysql )
22 postgres? ( dev-db/postgresql[server] )
23 vpopmail? ( net-mail/vpopmail )
24 test? ( app-editors/vim )"
25 # some of the testcases use ex/vi/xxd
26
27 MAKEOPTS="${MAKEOPTS} -j1" #310843
28
29 src_unpack() {
30 unpack ${A}
31 # disable this test, as it breaks under Portage
32 # and there is no easy fix
33 sed -i.orig \
34 -e '/qmail-lookup-nodomain/,/^END_OF_TEST_RESULTS/d' \
35 "${S}"/tests.sh || die "sed failed"
36 # Fix the vpopmail build
37 sed -i.orig \
38 -e '/.\/ltload cvm-vchkpw/s,-lmysqlclient,,g' \
39 -e '/.\/ltload cvm-vchkpw/s,-L/usr/local/vpopmail/lib,,g' \
40 -e '/.\/ltload cvm-vchkpw/s,-L/var/vpopmail/lib,,g' \
41 -e '/.\/ltload cvm-vchkpw/s,-L/usr/local/lib/mysql,,g' \
42 -e '/.\/ltload cvm-vchkpw/s,\.la,.la `cat /var/vpopmail/etc/lib_deps`,g' \
43 "${S}"/Makefile \
44 || die "Failed to fix vpopmail linking parts of Makefile"
45 sed -i.orig \
46 -e '/.\/compile cvm-vchkpw/s,$, `cat /var/vpopmail/etc/inc_deps`,g' \
47 "${S}"/Makefile \
48 || die "Failed to fix vpopmail compiling parts of Makefile"
49 }
50
51 src_compile() {
52 echo "/usr/include/bglibs" > conf-bgincs
53 echo "/usr/lib/bglibs" > conf-bglibs
54 echo "/usr/include" > conf-include
55 echo "/usr/lib" > conf-lib
56 echo "/usr/bin" > conf-bin
57 echo "$(tc-getCC) ${CFLAGS}" > conf-cc
58 echo "$(tc-getCC) ${LDFLAGS} -lcrypt" > conf-ld
59 emake || die
60
61 if use mysql; then
62 einfo "Building MySQL support"
63 emake mysql || die "making mysql support failed"
64 fi
65
66 if use postgres; then
67 einfo "Building Postgresql support"
68 emake pgsql || die "making postgres support failed"
69 fi
70
71 if use vpopmail; then
72 einfo "Building vpopmail support"
73 emake cvm-vchkpw || die "making vpopmail support failed"
74 fi
75 }
76
77 src_install() {
78 # Upstreams installer is incredibly broken
79 dolib .libs/*.a .libs/*.so.*
80 for i in a so ; do
81 dosym libcvm-v2client.${i} /usr/$(get_libdir)/libcvm-client.${i}
82 done
83
84 for i in {bench,test}client chain checkpassword pwfile qmail unix \
85 vmailmgr{,-local,-udp} v1{benchclient,checkpassword,testclient} \
86 ; do
87 dobin .libs/cvm-${i}
88 done
89 use mysql && dobin .libs/cvm-mysql{,-local,-udp}
90 use postgres && dobin .libs/cvm-pgsql{,-local,-udp}
91 use vpopmail && dobin .libs/cvm-vchkpw
92
93 insinto /usr/include/cvm
94 doins {credentials,errors,facts,module,protocol,sasl,v1client,v2client}.h
95 dosym v1client.h /usr/include/cvm/client.h
96 dosym cvm/sasl.h /usr/include/cvm-sasl.h
97
98 dodoc ANNOUNCEMENT NEWS{,.sql,.vmailmgr}
99 dodoc README{,.vchkpw,.vmailmgr}
100 dodoc TODO VERSION ChangeLog*
101 dohtml *.html
102 }
103
104 src_test() {
105 sh tests.sh || die "Testing Failed"
106 }

  ViewVC Help
Powered by ViewVC 1.1.20