annotate net-fs/samba/samba-3.2.7.ebuild @ 100:385a4d49f504

bump to 1.5.1
author holger@hoho.dyndns.org
date Wed, 21 Jan 2009 20:37:33 +0100
parents 1a5038d883b1
children 8b40b47c23e5
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
88
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
1 # Copyright 1999-2008 Gentoo Foundation
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
2 # Distributed under the terms of the GNU General Public License v2
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
3 # $Header: /var/cvsroot/gentoo-x86/net-fs/samba/samba-3.2.0_rc2.ebuild,v 1.1 2008/06/12 12:10:25 dev-zero Exp $
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
4
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
5 inherit eutils pam multilib versionator confutils
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
6
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
7 MY_P=${PN}-${PV/_/}
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
8
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
9 DESCRIPTION="A suite of SMB and CIFS client/server programs for UNIX"
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
10 HOMEPAGE="http://www.samba.org/"
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
11 SRC_URI="mirror://samba/${MY_P}.tar.gz"
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
12 LICENSE="GPL-3"
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
13 SLOT="0"
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
14 KEYWORDS="~amd64 ~x86"
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
15 IUSE_LINGUAS="linguas_ja linguas_pl"
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
16 IUSE="${IUSE_LINGUAS} acl ads async automount caps cups doc examples ipv6 kernel_linux ldap fam
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
17 pam quotas readline selinux swat syslog winbind"
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
18
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
19 RDEPEND="dev-libs/popt
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
20 dev-libs/iniparser
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
21 virtual/libiconv
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
22 acl? ( kernel_linux? ( sys-apps/acl ) )
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
23 cups? ( net-print/cups )
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
24 ipv6? ( sys-apps/xinetd )
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
25 ads? ( virtual/krb5 sys-fs/e2fsprogs )
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
26 ldap? ( net-nds/openldap )
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
27 pam? ( virtual/pam )
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
28 readline? ( sys-libs/readline )
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
29 selinux? ( sec-policy/selinux-samba )
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
30 swat? ( sys-apps/xinetd )
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
31 syslog? ( virtual/logger )
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
32 fam? ( virtual/fam )
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
33 caps? ( sys-libs/libcap )"
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
34 DEPEND="${RDEPEND}"
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
35
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
36 S="${WORKDIR}/${MY_P}"
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
37 CONFDIR="${FILESDIR}/config-3.2"
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
38 PRIVATE_DST=/var/lib/samba/private
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
39
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
40 # Tests are currently broken due to hardcoded paths (due to --with-fhs)
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
41 # The problem is that --without-fhs lets samba use lockdir (which can be changed in smb.conf)
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
42 # which is wrong as well.
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
43 RESTRICT="test"
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
44
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
45 pkg_setup() {
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
46 confutils_use_depend_all ads ldap
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
47 }
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
48
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
49 src_unpack() {
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
50 unpack ${A}
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
51 cd "${S}/source"
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
52
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
53 # Ok, agreed, this is ugly. But it avoids a patch we
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
54 # need for every samba version and we don't need autotools
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
55 sed -i \
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
56 -e 's|"lib32" ||' \
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
57 -e 's|if test -d "$i/$l" ;|if test -d "$i/$l" -o -L "$i/$l";|' \
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
58 configure || die "sed failed"
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
59
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
60 rm "${S}/docs/manpages"/{mount,umount}.cifs.8
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
61
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
62 sed -i \
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
63 -e 's|tdbsam|tdbsam:${PRIVATEDIR}/passdb.tdb|' \
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
64 "${S}/source/script/tests/selftest.sh" || die "sed failed"
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
65 }
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
66
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
67 src_compile() {
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
68 cd "${S}/source"
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
69
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
70 local myconf
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
71 local mylangs
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
72 local mymod_shared
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
73
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
74 mylangs="--with-manpages-langs=en"
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
75 use linguas_ja && mylangs="${mylangs},ja"
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
76 use linguas_pl && mylangs="${mylangs},pl"
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
77
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
78 use winbind && mymod_shared="--with-shared-modules=idmap_rid"
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
79 if use ldap ; then
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
80 myconf="${myconf} $(use_with ads)"
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
81 use winbind && mymod_shared="${mymod_shared},idmap_ad"
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
82 fi
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
83
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
84 [[ ${CHOST} == *-*bsd* ]] && myconf="${myconf} --disable-pie"
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
85 use hppa && myconf="${myconf} --disable-pie"
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
86
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
87 use caps && export ac_cv_header_sys_capability_h=yes || export ac_cv_header_sys_capability_h=no
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
88
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
89 # Otherwise we get the whole swat stuff installed
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
90 if ! use swat ; then
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
91 sed -i \
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
92 -e 's/^\(install:.*\)installswat \(.*\)/\1\2/' \
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
93 Makefile.in || die "sed failed"
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
94 fi
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
95
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
96 econf \
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
97 --with-fhs \
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
98 --sysconfdir=/etc/samba \
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
99 --localstatedir=/var \
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
100 --with-configdir=/etc/samba \
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
101 --with-libdir=/usr/$(get_libdir)/samba \
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
102 --with-pammodulesdir=$(getpam_mod_dir) \
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
103 --with-swatdir=/usr/share/doc/${PF}/swat \
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
104 --with-piddir=/var/run/samba \
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
105 --with-lockdir=/var/cache/samba \
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
106 --with-logfilebase=/var/log/samba \
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
107 --with-privatedir=${PRIVATE_DST} \
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
108 --with-libsmbclient \
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
109 --without-spinlocks \
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
110 --enable-socket-wrapper \
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
111 --enable-nss-wrapper \
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
112 --with-cifsmount=no \
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
113 $(use_with acl acl-support) \
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
114 $(use_with async aio-support) \
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
115 $(use_with automount) \
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
116 $(use_enable cups) \
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
117 $(use_enable fam) \
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
118 $(use_with ads krb5) \
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
119 $(use_with ads dnsupdate) \
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
120 $(use_with ldap) \
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
121 $(use_with pam) $(use_with pam pam_smbpass) \
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
122 $(use_with quotas) $(use_with quotas sys-quotas) \
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
123 $(use_with readline) \
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
124 $(use_with syslog) \
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
125 $(use_with winbind) \
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
126 ${myconf} ${mylangs} ${mymod_shared} || die "econf failed"
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
127
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
128 emake proto || die "emake proto failed"
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
129 emake everything || die "emake everything failed"
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
130
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
131 }
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
132
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
133 src_test() {
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
134 cd "${S}/source"
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
135 emake test || die "tests failed"
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
136 }
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
137
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
138 src_install() {
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
139 cd "${S}/source"
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
140
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
141 emake DESTDIR="${D}" install-everything || die "emake install-everything failed"
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
142
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
143 # Extra rpctorture progs
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
144 local extra_bins="rpctorture"
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
145 for i in ${extra_bins} ; do
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
146 [[ -x "${S}/bin/${i}" ]] && dobin "${S}/bin/${i}"
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
147 done
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
148
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
149 # remove .old stuff from /usr/bin:
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
150 rm -f "${D}"/usr/bin/*.old
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
151
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
152 # Removing executable bits from header-files
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
153 fperms 644 /usr/include/libsmbclient.h
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
154
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
155 # Nsswitch extensions. Make link for wins and winbind resolvers
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
156 if use winbind ; then
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
157 dolib.so nsswitch/libnss_wins.so
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
158 dosym libnss_wins.so /usr/$(get_libdir)/libnss_wins.so.2
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
159 dolib.so nsswitch/libnss_winbind.so
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
160 dosym libnss_winbind.so /usr/$(get_libdir)/libnss_winbind.so.2
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
161 fi
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
162
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
163 # bug #46389: samba doesn't create symlink anymore
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
164 # beaviour seems to be changed in 3.0.6, see bug #61046
92
7f53c44576cc fix samba shlib symlinks
holger@hoho.dyndns.org
parents: 88
diff changeset
165 dosym samba/libsmbclient.so /usr/$(get_libdir)/libsmbclient.so
7f53c44576cc fix samba shlib symlinks
holger@hoho.dyndns.org
parents: 88
diff changeset
166 dosym samba/libsmbclient.so.0 /usr/$(get_libdir)/libsmbclient.so.0
94
f1ad2db6c510 fix symlink typo
holger@hho.wizards.de
parents: 92
diff changeset
167 dosym samba/libtalloc.so /usr/$(get_libdir)/libtalloc.so
f1ad2db6c510 fix symlink typo
holger@hho.wizards.de
parents: 92
diff changeset
168 dosym samba/libtalloc.so.1 /usr/$(get_libdir)/libtalloc.so.1
92
7f53c44576cc fix samba shlib symlinks
holger@hoho.dyndns.org
parents: 88
diff changeset
169 dosym samba/libtdb.so /usr/$(get_libdir)/libtdb.so
7f53c44576cc fix samba shlib symlinks
holger@hoho.dyndns.org
parents: 88
diff changeset
170 dosym samba/libtdb.so.1 /usr/$(get_libdir)/libtdb.so.1
88
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
171
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
172 # make the smb backend symlink for cups printing support (bug #133133)
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
173 if use cups ; then
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
174 dodir $(cups-config --serverbin)/backend
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
175 dosym /usr/bin/smbspool $(cups-config --serverbin)/backend/smb
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
176 fi
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
177
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
178 cd "${S}/source"
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
179
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
180 # General config files
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
181 insinto /etc/samba
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
182 doins "${CONFDIR}"/{smbusers,lmhosts}
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
183 newins "${CONFDIR}/smb.conf.example-samba3" smb.conf.example
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
184
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
185 newpamd "${CONFDIR}/samba.pam" samba
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
186 use winbind && dopamd "${CONFDIR}/system-auth-winbind"
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
187 if use swat ; then
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
188 insinto /etc/xinetd.d
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
189 newins "${CONFDIR}/swat.xinetd" swat
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
190 else
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
191 rm -f "${D}/usr/sbin/swat"
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
192 rm -f "${D}/usr/share/man/man8/swat.8"
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
193 fi
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
194
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
195 newinitd "${FILESDIR}/samba-init" samba
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
196 newconfd "${FILESDIR}/samba-conf" samba
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
197
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
198 if use ldap ; then
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
199 insinto /etc/openldap/schema
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
200 doins "${S}/examples/LDAP/samba.schema"
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
201 fi
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
202
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
203 if use ipv6 ; then
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
204 insinto /etc/xinetd.d
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
205 newins "${FILESDIR}/samba-xinetd" smb
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
206 fi
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
207
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
208 # dirs
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
209 diropts -m0700 ; keepdir "${PRIVATE_DST}"
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
210 diropts -m1777 ; keepdir /var/spool/samba
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
211
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
212 diropts -m0755
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
213 keepdir /var/{log,run,cache}/samba
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
214 keepdir /var/lib/samba/{netlogon,profiles}
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
215 keepdir /var/lib/samba/printers/{W32X86,WIN40,W32ALPHA,W32MIPS,W32PPC,X64,IA64,COLOR}
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
216 keepdir /usr/$(get_libdir)/samba/{rpc,idmap,auth}
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
217
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
218 # docs
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
219 dodoc "${FILESDIR}/README.gentoo"
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
220 dodoc "${S}"/{MAINTAINERS,README,Roadmap,WHATSNEW.txt}
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
221 dodoc "${CONFDIR}/nsswitch.conf-wins"
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
222 use winbind && dodoc "${CONFDIR}/nsswitch.conf-winbind"
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
223
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
224 if use examples ; then
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
225 insinto /usr/share/doc/${PF}
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
226 doins -r "${S}/examples/"
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
227 find "${D}/usr/share/doc/${PF}" -type d -print0 | xargs -0 chmod 755
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
228 find "${D}/usr/share/doc/${PF}/examples" ! -type d -print0 | xargs -0 chmod 644
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
229 fi
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
230
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
231 if ! use doc ; then
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
232 if ! use swat ; then
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
233 rm -rf "${D}/usr/share/doc/${PF}/swat"
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
234 else
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
235 rm -rf "${D}/usr/share/doc/${PF}/swat/help"/{guide,howto,devel}
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
236 rm -rf "${D}/usr/share/doc/${PF}/swat/using_samba"
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
237 fi
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
238 fi
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
239
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
240 }
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
241
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
242 pkg_preinst() {
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
243 local PRIVATE_SRC=/etc/samba/private
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
244 if [[ ! -r "${ROOT}/${PRIVATE_DST}/secrets.tdb" \
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
245 && -r "${ROOT}/${PRIVATE_SRC}/secrets.tdb" ]] ; then
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
246 ebegin "Copying ${ROOT}/${PRIVATE_SRC}/* to ${ROOT}/${PRIVATE_DST}/"
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
247 mkdir -p "${D}/${PRIVATE_DST}"
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
248 cp -pPRf "${ROOT}/${PRIVATE_SRC}"/* "${D}/${PRIVATE_DST}/"
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
249 eend $?
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
250 fi
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
251
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
252 if [[ ! -f "${ROOT}/etc/samba/smb.conf" ]] ; then
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
253 touch "${D}/etc/samba/smb.conf"
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
254 fi
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
255 }
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
256
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
257 pkg_postinst() {
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
258 if use swat ; then
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
259 einfo "swat must be enabled by xinetd:"
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
260 einfo " change the /etc/xinetd.d/swat configuration"
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
261 fi
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
262
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
263 if use ipv6 ; then
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
264 einfo "ipv6 support must be enabled by xinetd:"
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
265 einfo " change the /etc/xinetd.d/smb configuration"
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
266 fi
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
267
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
268 elog "It is possible to start/stop daemons separately:"
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
269 elog " Create a symlink from /etc/init.d/samba.{smbd,nmbd,winbind} to"
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
270 elog " /etc/init.d/samba. Calling /etc/init.d/samba directly will start"
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
271 elog " the daemons configured in /etc/conf.d/samba"
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
272
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
273 elog "The mount/umount.cifs helper applications are not included anymore."
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
274 elog "Please install net-fs/mount-cifs instead."
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
275
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
276 ewarn "If you're upgrading from 3.0.24 or earlier, please make sure to"
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
277 ewarn "restart your clients to clear any cached information about the server."
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
278 ewarn "Otherwise they might not be able to connect to the volumes."
7c953ae90177 samba 3.2.6 stable
holger@hoho.dyndns.org
parents:
diff changeset
279 }