summaryrefslogtreecommitdiff
blob: cca70af64b818f11c43a0aa5d3d55974da48697a (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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
# Copyright 1999-2002 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License, v2 or later
# Maintainer: System Team <system@gentoo.org>
# Author: Achim Gottinger <achim@gentoo.org>, Bruce A. Locke <blocke@shivan.org>
# $Header: /var/cvsroot/gentoo-x86/sys-libs/pam/pam-0.75-r3.ebuild,v 1.1 2002/02/19 08:24:06 blocke Exp $

P=pam-${PV}
A=Linux-PAM-${PV}.tar.gz
S=${WORKDIR}/Linux-PAM-${PV}
DESCRIPTION="Pluggable Authentication Modules"
SRC_URI="http://www.kernel.org/pub/linux/libs/pam/pre/library/${A} http://www.gentoo.org/~blocke/pam-${PV}-${PR}-gentoo.diff.gz" 
HOMEPAGE="http://www.redhat.com/linux-info/pam/"

DEPEND=">=sys-libs/cracklib-2.7-r2 >=sys-libs/pwdb-0.61-r3 berkdb? ( ~sys-libs/db-1.85 ) sys-apps/gzip"

src_unpack() {
	echo "This ebuild is masked out because it breaks your system..."
	echo "If you are seeing this and you are not trying to merge it manually"
	echo "it means someone accidently unmasked it... please report the"
	echo "problem to #gentoo or the mailing list... Thanks"

	die

	tar xvzf ${DISTDIR}/Linux-PAM-${PV}.tar.gz
	zcat ${DISTDIR}/pam-${PV}-${PR}-gentoo.diff.gz | patch -p0
}


src_compile() {
	./configure --prefix= --host=${CHOST} --sbindir=/usr/sbin --mandir=/usr/share/man --enable-fakeroot=${D} --enable-read-both-confs || die
	cp Makefile Makefile.orig
	sed -e "s:libpam_misc doc examples:libpam_misc:" Makefile.orig > Makefile
	cp Make.Rules Make.orig
	sed -e "s:/usr/bin/install:/bin/install:" -e "s:-Wpointer-arith::" -e "s:^CFLAGS=:CFLAGS=${CFLAGS} :" Make.orig > Make.Rules
	if [ -z "`use berkdb`" ]
	then
		cp Make.Rules Make.orig
		sed -e "s:^HAVE_LIBNDBM=yes:HAVE_LIBNDBM=no:" Make.orig > Make.Rules
	fi
	make || die
	cd doc
	tar xvzf Linux-PAM-0.75-docs.tar.gz
}

src_install() {
	make install MANDIR="/usr/share/man" || die
	dodoc CHANGELOG Copyright README
	docinto modules
	dodoc modules/README
	cd modules
	for i in pam_*
	do
		if [ -f $i/README ]
		then
			docinto modules/$i
			dodoc $i/README
		fi
	done

	cd ..
	docinto html
	dodoc doc/html/*.html
	docinto txt
	dodoc doc/txts/*.txt doc/specs/*.txt
	docinto print
	dodoc doc/ps/*.ps


	cd ${D}/lib
	for i in pam pamc pam_misc
	do
		rm lib${i}.so
		ln -s lib${i}.so.${PV} lib${i}.so
		ln -s lib${i}.so.${PV} lib${i}.so.0
	done

	#install /etc/pam.d files
	dodir /etc/pam.d
	cd ${FILESDIR}/${PV}-${PR}/pam.d
	insinto /etc/pam.d
	doins *

	#install /etc/security files
	dodir /etc/security
	cd ${FILESDIR}/${PV}-${PR}/security
	insinto /etc/security
	doins *

}