Contents of /trunk/extras/nss-mdns/nss-mdns-0.10-r1.smage2
Parent Directory | Revision Log
Revision 15803 -
(show annotations)
(download)
Wed Jan 9 14:56:37 2013 UTC (11 years, 8 months ago) by niro
File size: 1192 byte(s)
Wed Jan 9 14:56:37 2013 UTC (11 years, 8 months ago) by niro
File size: 1192 byte(s)
auto added: ver bump to 0.10-r1
1 | # $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 | } |