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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.6 - (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.5: +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.82.ebuild,v 1.5 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="~ppc ~sparc ~x86 ~amd64"
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 src_unpack() {
28 unpack ${A}
29 # disable this test, as it breaks under Portage
30 # and there is no easy fix
31 sed -i.orig \
32 -e '/qmail-lookup-nodomain/,/^END_OF_TEST_RESULTS/d' \
33 "${S}"/tests.sh || die "sed failed"
34 # Fix the vpopmail build
35 sed -i.orig \
36 -e '/.\/ltload cvm-vchkpw/s,-lmysqlclient,,g' \
37 -e '/.\/ltload cvm-vchkpw/s,-L/usr/local/vpopmail/lib,,g' \
38 -e '/.\/ltload cvm-vchkpw/s,-L/var/vpopmail/lib,,g' \
39 -e '/.\/ltload cvm-vchkpw/s,-L/usr/local/lib/mysql,,g' \
40 -e '/.\/ltload cvm-vchkpw/s,\.la,.la `cat /var/vpopmail/etc/lib_deps`,g' \
41 "${S}"/Makefile \
42 || die "Failed to fix vpopmail linking parts of Makefile"
43 sed -i.orig \
44 -e '/.\/compile cvm-vchkpw/s,$, `cat /var/vpopmail/etc/inc_deps`,g' \
45 "${S}"/Makefile \
46 || die "Failed to fix vpopmail compiling parts of Makefile"
47 }
48
49 src_compile() {
50 echo "/usr/include/bglibs" > conf-bgincs
51 echo "/usr/lib/bglibs" > conf-bglibs
52 echo "/usr/include" > conf-include
53 echo "/usr/lib" > conf-lib
54 echo "/usr/bin" > conf-bin
55 echo "$(tc-getCC) ${CFLAGS}" > conf-cc
56 echo "$(tc-getCC) ${LDFLAGS} -lcrypt" > conf-ld
57 emake || die
58
59 if use mysql; then
60 einfo "Building MySQL support"
61 emake mysql || die "making mysql support failed"
62 fi
63
64 if use postgres; then
65 einfo "Building Postgresql support"
66 emake pgsql || die "making postgres support failed"
67 fi
68
69 if use vpopmail; then
70 einfo "Building vpopmail support"
71 emake cvm-vchkpw || die "making vpopmail support failed"
72 fi
73 }
74
75 src_install() {
76 # Upstreams installer is incredibly broken
77 dolib .libs/*.a .libs/*.so.*
78 for i in a so ; do
79 dosym libcvm-v2client.${i} /usr/$(get_libdir)/libcvm-client.${i}
80 done
81
82 for i in {bench,test}client chain checkpassword pwfile qmail unix \
83 vmailmgr{,-local,-udp} v1{benchclient,checkpassword,testclient} \
84 ; do
85 dobin .libs/cvm-${i}
86 done
87 use mysql && dobin .libs/cvm-mysql{,-local,-udp}
88 use postgres && dobin .libs/cvm-pgsql{,-local,-udp}
89 use vpopmail && dobin .libs/cvm-vchkpw
90
91 insinto /usr/include/cvm
92 doins {credentials,errors,facts,module,protocol,sasl,v1client,v2client}.h
93 dosym v1client.h /usr/include/cvm/client.h
94 dosym cvm/sasl.h /usr/include/cvm-sasl.h
95
96 dodoc ANNOUNCEMENT NEWS{,.sql,.vmailmgr}
97 dodoc README{,.vchkpw,.vmailmgr}
98 dodoc TODO VERSION ChangeLog*
99 dohtml *.html
100 }
101
102 src_test() {
103 sh tests.sh || die "Testing Failed"
104 }

  ViewVC Help
Powered by ViewVC 1.1.20