Gentoo Archives: gentoo-commits

From: "Tiziano Mueller (dev-zero)" <dev-zero@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in net-fs/samba: ChangeLog samba-3.0.26a.ebuild
Date: Sat, 15 Sep 2007 05:34:53
Message-Id: E1IWQBg-0001OE-7h@stork.gentoo.org
1 dev-zero 07/09/15 05:27:24
2
3 Modified: ChangeLog
4 Added: samba-3.0.26a.ebuild
5 Log:
6 Version bump. Removed unneeded patch.
7 (Portage version: 2.1.3.8)
8
9 Revision Changes Path
10 1.304 net-fs/samba/ChangeLog
11
12 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-fs/samba/ChangeLog?rev=1.304&view=markup
13 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-fs/samba/ChangeLog?rev=1.304&content-type=text/plain
14 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-fs/samba/ChangeLog?r1=1.303&r2=1.304
15
16 Index: ChangeLog
17 ===================================================================
18 RCS file: /var/cvsroot/gentoo-x86/net-fs/samba/ChangeLog,v
19 retrieving revision 1.303
20 retrieving revision 1.304
21 diff -u -r1.303 -r1.304
22 --- ChangeLog 11 Sep 2007 22:55:07 -0000 1.303
23 +++ ChangeLog 15 Sep 2007 05:27:23 -0000 1.304
24 @@ -1,6 +1,13 @@
25 # ChangeLog for net-fs/samba
26 # Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
27 -# $Header: /var/cvsroot/gentoo-x86/net-fs/samba/ChangeLog,v 1.303 2007/09/11 22:55:07 uberlord Exp $
28 +# $Header: /var/cvsroot/gentoo-x86/net-fs/samba/ChangeLog,v 1.304 2007/09/15 05:27:23 dev-zero Exp $
29 +
30 +*samba-3.0.26a (15 Sep 2007)
31 +
32 + 15 Sep 2007; Tiziano Müller <dev-zero@g.o>
33 + +files/3.0.26a-lazyldflags.patch, -files/3.0.x-libdirsymlink.patch,
34 + +samba-3.0.26a.ebuild:
35 + Version bump. Removed unneeded patch.
36
37 11 Sep 2007; Roy Marples <uberlord@g.o> files/samba-init:
38 de-bashify the init script
39
40
41
42 1.1 net-fs/samba/samba-3.0.26a.ebuild
43
44 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-fs/samba/samba-3.0.26a.ebuild?rev=1.1&view=markup
45 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-fs/samba/samba-3.0.26a.ebuild?rev=1.1&content-type=text/plain
46
47 Index: samba-3.0.26a.ebuild
48 ===================================================================
49 # Copyright 1999-2007 Gentoo Foundation
50 # Distributed under the terms of the GNU General Public License v2
51 # $Header: /var/cvsroot/gentoo-x86/net-fs/samba/samba-3.0.26a.ebuild,v 1.1 2007/09/15 05:27:23 dev-zero Exp $
52
53 inherit eutils pam python multilib versionator confutils
54
55 MY_P=${PN}-${PV/_/}
56
57 DESCRIPTION="A suite of SMB and CIFS client/server programs for UNIX"
58 HOMEPAGE="http://www.samba.org/"
59 SRC_URI="mirror://samba/${MY_P}.tar.gz
60 mirror://samba/old-versions/${MY_P}.tar.gz"
61 LICENSE="GPL-2"
62 SLOT="0"
63 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~sparc-fbsd ~x86 ~x86-fbsd"
64 IUSE_LINGUAS="linguas_ja linguas_pl"
65 IUSE="${IUSE_LINGUAS} acl ads async automount caps cups doc examples ipv6 kernel_linux ldap fam
66 pam python quotas readline selinux swat syslog winbind"
67
68 RDEPEND="dev-libs/popt
69 virtual/libiconv
70 acl? ( kernel_linux? ( sys-apps/acl ) )
71 cups? ( net-print/cups )
72 ipv6? ( sys-apps/xinetd )
73 ads? ( virtual/krb5 )
74 ldap? ( net-nds/openldap )
75 pam? ( virtual/pam )
76 python? ( dev-lang/python )
77 readline? ( sys-libs/readline )
78 selinux? ( sec-policy/selinux-samba )
79 swat? ( sys-apps/xinetd )
80 syslog? ( virtual/logger )
81 fam? ( virtual/fam )
82 caps? ( sys-libs/libcap )"
83 DEPEND="${RDEPEND}"
84
85 S=${WORKDIR}/${MY_P}
86 CONFDIR=${FILESDIR}/config
87 PRIVATE_DST=/var/lib/samba/private
88
89 pkg_setup() {
90 confutils_use_depend_all ads ldap
91 }
92
93 src_unpack() {
94 unpack ${A}
95 cd "${S}/source"
96
97 # This patch adds "-Wl,-z,now" to smb{mnt,umount}
98 # Please read ... for further informations
99 epatch "${FILESDIR}/${PV}-lazyldflags.patch"
100
101 # Ok, agreed, this is ugly. But it avoids a patch we
102 # need for every samba version and we don't need autotools
103 sed -i \
104 -e 's|"lib32" ||' \
105 -e 's|if test -d "$i/$l" ;|if test -d "$i/$l" -o -L "$i/$l";|' \
106 configure || die "sed failed"
107
108 rm "${S}/docs/manpages"/{mount,umount}.cifs.8
109 }
110
111 src_compile() {
112 cd "${S}/source"
113
114 local myconf
115 local mylangs
116 local mymod_shared
117
118 python_version
119 myconf="--with-python=no"
120 use python && myconf="--with-python=${python}"
121
122 mylangs="--with-manpages-langs=en"
123 use linguas_ja && mylangs="${mylangs},ja"
124 use linguas_pl && mylangs="${mylangs},pl"
125
126 use winbind && mymod_shared="--with-shared-modules=idmap_rid"
127 if use ldap ; then
128 myconf="${myconf} $(use_with ads)"
129 use winbind && mymod_shared="${mymod_shared},idmap_ad"
130 fi
131
132 [[ ${CHOST} == *-*bsd* ]] && myconf="${myconf} --disable-pie"
133 use hppa && myconf="${myconf} --disable-pie"
134
135 use caps && export ac_cv_header_sys_capability_h=yes || export ac_cv_header_sys_capability_h=no
136
137 # Otherwise we get the whole swat stuff installed
138 if ! use swat ; then
139 sed -i \
140 -e 's/^\(install:.*\)installswat \(.*\)/\1\2/' \
141 Makefile.in || die "sed failed"
142 fi
143
144 econf \
145 --with-fhs \
146 --sysconfdir=/etc/samba \
147 --localstatedir=/var \
148 --with-configdir=/etc/samba \
149 --with-libdir=/usr/$(get_libdir)/samba \
150 --with-swatdir=/usr/share/doc/${PF}/swat \
151 --with-piddir=/var/run/samba \
152 --with-lockdir=/var/cache/samba \
153 --with-logfilebase=/var/log/samba \
154 --with-privatedir=${PRIVATE_DST} \
155 --with-libsmbclient \
156 --without-spinlocks \
157 --enable-socket-wrapper \
158 --with-cifsmount=no \
159 $(use_with acl acl-support) \
160 $(use_with async aio-support) \
161 $(use_with automount) \
162 $(use_enable cups) \
163 $(use_enable fam) \
164 $(use_with ads krb5) \
165 $(use_with ldap) \
166 $(use_with pam) $(use_with pam pam_smbpass) \
167 $(use_with quotas) $(use_with quotas sys-quotas) \
168 $(use_with readline) \
169 $(use_with kernel_linux smbmount) \
170 $(use_with syslog) \
171 $(use_with winbind) \
172 ${myconf} ${mylangs} ${mymod_shared} || die "econf failed"
173
174 emake proto || die "emake proto failed"
175 emake everything || die "emake everything failed"
176
177 if use python ; then
178 emake python_ext || die "emake python_ext failed"
179 fi
180 }
181
182 src_test() {
183 cd "${S}/source"
184 emake test || die "tests failed"
185 }
186
187 src_install() {
188 cd "${S}/source"
189
190 emake DESTDIR="${D}" install-everything || die "emake install-everything failed"
191
192 # Extra rpctorture progs
193 local extra_bins="rpctorture"
194 for i in ${extra_bins} ; do
195 [[ -x "${S}/bin/${i}" ]] && dobin "${S}/bin/${i}"
196 done
197
198 # remove .old stuff from /usr/bin:
199 rm -f "${D}"/usr/bin/*.old
200
201 # Nsswitch extensions. Make link for wins and winbind resolvers
202 if use winbind ; then
203 dolib.so nsswitch/libnss_wins.so
204 dosym libnss_wins.so /usr/$(get_libdir)/libnss_wins.so.2
205 dolib.so nsswitch/libnss_winbind.so
206 dosym libnss_winbind.so /usr/$(get_libdir)/libnss_winbind.so.2
207 fi
208
209 if use pam ; then
210 dopammod bin/pam_smbpass.so
211 use winbind && dopammod bin/pam_winbind.so
212 fi
213
214 if use kernel_linux ; then
215 # Warning: this can byte you if /usr is
216 # on a separate volume and you have to mount
217 # a smb volume before the local mount
218 dosym ../usr/bin/smbmount /sbin/mount.smbfs
219 fperms 4755 /usr/bin/smbmnt
220 fperms 4755 /usr/bin/smbumount
221 fi
222
223 # bug #46389: samba doesn't create symlink anymore
224 # beaviour seems to be changed in 3.0.6, see bug #61046
225 dosym samba/libsmbclient.so /usr/$(get_libdir)/libsmbclient.so.0
226 dosym samba/libsmbclient.so /usr/$(get_libdir)/libsmbclient.so
227
228 # make the smb backend symlink for cups printing support (bug #133133)
229 if use cups ; then
230 dodir $(cups-config --serverbin)/backend
231 dosym /usr/bin/smbspool $(cups-config --serverbin)/backend/smb
232 fi
233
234 if use python ; then
235 emake DESTDIR="${D}" python_install || die "emake installpython failed"
236 # We're doing that manually
237 find "${D}/usr/$(get_libdir)/python${PYVER}/site-packages" -iname "*.pyc" -delete
238 fi
239
240 cd "${S}/source"
241
242 # General config files
243 insinto /etc/samba
244 doins "${CONFDIR}"/{smbusers,lmhosts}
245 newins "${CONFDIR}/smb.conf.example-samba3" smb.conf.example
246
247 newpamd "${CONFDIR}/samba.pam" samba
248 use winbind && doins ${CONFDIR}/system-auth-winbind
249 if use swat ; then
250 insinto /etc/xinetd.d
251 newins "${CONFDIR}/swat.xinetd" swat
252 else
253 rm -f "${D}/usr/sbin/swat"
254 rm -f "${D}/usr/share/man/man8/swat.8"
255 fi
256
257 newinitd "${FILESDIR}/samba-init" samba
258 newconfd "${FILESDIR}/samba-conf" samba
259
260 if use ldap ; then
261 insinto /etc/openldap/schema
262 doins "${S}/examples/LDAP/samba.schema"
263 fi
264
265 if use ipv6 ; then
266 insinto /etc/xinetd.d
267 newins "${FILESDIR}/samba-xinetd" smb
268 fi
269
270 # dirs
271 diropts -m0700 ; keepdir ${PRIVATE_DST}
272 diropts -m1777 ; keepdir /var/spool/samba
273
274 diropts -m0755
275 keepdir /var/{log,run,cache}/samba
276 keepdir /var/lib/samba/{netlogon,profiles}
277 keepdir /var/lib/samba/printers/{W32X86,WIN40,W32ALPHA,W32MIPS,W32PPC}
278 keepdir /usr/$(get_libdir)/samba/{rpc,idmap,auth}
279
280 # docs
281 dodoc "${FILESDIR}/README.gentoo"
282 dodoc "${S}"/{COPYING,Manifest,README,Roadmap,WHATSNEW.txt}
283 dodoc "${CONFDIR}/nsswitch.conf-wins"
284 use winbind && dodoc "${CONFDIR}/nsswitch.conf-winbind"
285
286 if use examples ; then
287 insinto /usr/share/doc/${PF}
288 doins -r "${S}/examples/"
289 find "${D}/usr/share/doc/${PF}" -type d -print0 | xargs -0 chmod 755
290 find "${D}/usr/share/doc/${PF}/examples" ! -type d -print0 | xargs -0 chmod 644
291 if use python ; then
292 insinto /usr/share/doc/${PF}/python
293 doins -r "${S}/source/python/examples"
294 fi
295 fi
296
297 if ! use doc ; then
298 if ! use swat ; then
299 rm -rf "${D}/usr/share/doc/${PF}/swat"
300 else
301 rm -rf "${D}/usr/share/doc/${PF}/swat/help"/{guide,howto,devel}
302 rm -rf "${D}/usr/share/doc/${PF}/swat/using_samba"
303 fi
304 fi
305
306 }
307
308 pkg_preinst() {
309 local PRIVATE_SRC=/etc/samba/private
310 if [[ ! -r ${ROOT}/${PRIVATE_DST}/secrets.tdb \
311 && -r ${ROOT}/${PRIVATE_SRC}/secrets.tdb ]] ; then
312 ebegin "Copying ${ROOT}/${PRIVATE_SRC}/* to ${ROOT}/${PRIVATE_DST}/"
313 mkdir -p "${D}"/${PRIVATE_DST}
314 cp -pPRf "${ROOT}"/${PRIVATE_SRC}/* "${D}"/${PRIVATE_DST}/
315 eend $?
316 fi
317
318 if [[ ! -f "${ROOT}/etc/samba/smb.conf" ]] ; then
319 touch "${D}/etc/samba/smb.conf"
320 fi
321 }
322
323 pkg_postinst() {
324 if use python ; then
325 python_version
326 python_mod_optimize /usr/$(get_libdir)/python${PYVER}/site-packages/samba
327 fi
328
329 if use swat ; then
330 einfo "swat must be enabled by xinetd:"
331 einfo " change the /etc/xinetd.d/swat configuration"
332 fi
333
334 if use ipv6 ; then
335 einfo "ipv6 support must be enabled by xinetd:"
336 einfo " change the /etc/xinetd.d/smb configuration"
337 fi
338
339 elog "It is possible to start/stop daemons seperately:"
340 elog " Create a symlink from /etc/init.d/samba.{smbd,nmbd,winbind} to"
341 elog " /etc/init.d/samba. Calling /etc/init.d/samba directly will start"
342 elog " the daemons configured in /etc/conf.d/samba"
343
344 elog "The mount/umount.cifs helper applications are not included anymore."
345 elog "Please install net-fs/mount-cifs instead."
346 }
347
348 pkg_postrm() {
349 if use python ; then
350 python_version
351 python_mod_cleanup /usr/$(get_libdir)/python${PYVER}/site-packages/samba
352 fi
353
354 # If stale docs, and one isn't re-emerging the latest version, removes
355 # (this is actually a portage bug, though)
356 [[ -n ${PF} && ! -f ${ROOT}/usr/$(get_libdir)/${PN}/en.msg ]] && \
357 rm -rf "${ROOT}"/usr/share/doc/${PF}
358 }
359
360
361
362 --
363 gentoo-commits@g.o mailing list