blob: 8db1eaf82fd56653ef8009a9f025cf79633c526a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
|
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/sys-libs/pwdb/pwdb-0.62.ebuild,v 1.28 2006/09/04 08:46:04 vapier Exp $
inherit eutils flag-o-matic toolchain-funcs
DESCRIPTION="Password database"
HOMEPAGE="http://packages.gentoo.org/ebuilds/?pwdb-${PVR}"
SRC_URI="mirror://gentoo/${P}.tar.gz"
LICENSE="|| ( BSD GPL-2 )"
SLOT="0"
KEYWORDS="alpha amd64 arm hppa ia64 m68k mips ppc ppc64 s390 sh sparc x86"
IUSE="selinux"
RESTRICT="test" #122603
DEPEND="selinux? ( sys-libs/libselinux )"
src_unpack () {
unpack ${A}
cd "${S}"
epatch "${FILESDIR}"/${P}-build.patch
use selinux && epatch "${FILESDIR}"/${P}-selinux.patch
sed -i \
-e "s/^DIRS = .*/DIRS = libpwdb/" \
-e "s:EXTRAS += :EXTRAS += ${CFLAGS} :" \
Makefile || die "sed of Makefile failed"
sed -i -e "s:=gcc:=$(tc-getCC):g" default.defs \
|| die "sed of default.defs failed"
}
src_compile() {
filter-flags -fstack-protector
# author has specified application to be compiled with `-g`
# no problem, but with ccc `-g` disables optimisation to make
# debugging easier, `-g3` enables debugging and optimisation
[ "${ARCH}" = "alpha" -a "${CC}" = "ccc" ] && append-flags -g3
emake || die
}
src_install() {
dodir /$(get_libdir) /usr/$(get_libdir) /usr/include/pwdb
make \
INCLUDED="${D}"/usr/include/pwdb \
LIBDIR="${D}"/$(get_libdir) \
LDCONFIG="echo" \
install || die
mv "${D}"/$(get_libdir)/*.a "${D}"/usr/$(get_libdir)/ || die
gen_usr_ldscript libpwdb.so
insinto /etc
doins conf/pwdb.conf
dodoc CHANGES CREDITS README
dohtml -r doc/html/*
docinto txt
dodoc doc/*.txt
}
|