Magellan Linux

Annotation of /branches/R11-unstable/extras/nss-mdns/nss-mdns-0.10-r1.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 32546 - (hide annotations) (download)
Mon Apr 29 13:07:12 2019 UTC (5 years ago) by niro
File size: 1192 byte(s)
-release branches/R11-unstable
1 niro 15803 # $Id$
2    
3     PNAME="nss-mdns"
4     PVER="0.10"
5     PBUILD="r1"
6    
7     PCAT="net-dns"
8    
9     DESCRIPTION="glibc plugin for mDNS host name resolution."
10     HOMEPAGE="http://0pointer.de/lennart/projects/nss-mdns/"
11    
12     DEPEND=">= virtual/glibc"
13    
14     SRCFILE="${PNAME}-${PVER}.tar.gz"
15     SRCDIR="${BUILDDIR}/${PNAME}-${PVER}"
16    
17     sminclude multilib
18    
19     SRC_URI=(
20     http://0pointer.de/lennart/projects/${PNAME}/${SRCFILE}
21     mirror://${PNAME}/${SRCFILE}
22     )
23    
24     UP2DATE="updatecmd ${HOMEPAGE} | firsttarball gz"
25    
26     src_compile()
27     {
28     mconfigure --enable-avahi=yes --enable-legacy=no || die
29     mmake || die
30     }
31    
32     postinstall()
33     {
34     # add mdns4/6_minimal to the hosts line of /etc/nsswitch.conf
35     if [ -f ${MROOT}/etc/nsswitch.conf ]
36     then
37     sed -i -e '
38     /^hosts:/ !b
39     /\<mdns\(4\|6\)\?\(_minimal\)\?\>/ b
40     s/\([[:blank:]]\+\)dns\>/\1mdns4_minimal [NOTFOUND=return] dns/g
41     ' ${MROOT}/etc/nsswitch.conf
42     fi
43     }
44    
45     postremove()
46     {
47     # remove mdns4/6_minimal from the hosts line of /etc/nsswitch.conf
48     if [ ! -e ${MROOT}/usr/$(mlibdir)/libnss_myhostname.so.* ]
49     then
50     if [ -f ${MROOT}/etc/nsswitch.conf ]
51     then
52     sed -i -e '
53     /^hosts:/ !b
54     s/[[:blank:]]\+mdns\(4\|6\)\?\(_minimal\( \[NOTFOUND=return\]\)\?\)\?//g
55     ' ${MROOT}/etc/nsswitch.conf
56     fi
57     fi
58     }