Magellan Linux

Contents of /branches/magellan-next/core/avahi/avahi-0.6.27-r1.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 6722 - (show annotations) (download)
Wed Sep 22 09:47:56 2010 UTC (13 years, 8 months ago) by niro
File size: 2623 byte(s)
auto added: ver bump to 0.6.27-r1
1 # $Id: avahi-0.6.25-r2.smage2 3465 2009-10-21 20:54:13Z niro $
2
3 PNAME="avahi"
4 PVER="0.6.27"
5 PBUILD="r1"
6
7 PCATEGORIE="net-dns"
8 STATE="unstable"
9
10 DESCRIPTION="Avahi is a system which facilitates service discovery on a local network."
11 HOMEPAGE="http://avahi.org/"
12
13 DEPEND=">= dev-libs/libdaemon-0.14
14 >= dev-libs/expat-2
15 >= dev-libs/glib2-2.24
16 >= sys-apps/dbus-1.3
17 >= sys-libs/libcap-2.19"
18
19 SDEPEND=">= dev-util/intltool-0.41
20 >= dev-util/pkgconfig-0.25"
21
22 SRCFILE="${PNAME}-${PVER}.tar.gz"
23 SRCDIR="${BUILDDIR}/${PNAME}-${PVER}"
24
25 sminclude mtools mbuild
26
27 SRC_URI=(
28 http://avahi.org/download/${SRCFILE}
29 mirror://${PNAME}/${SRCFILE}
30 mirror://${PNAME}/avahi-daemon.rc
31 mirror://${PNAME}/avahi-dnsconfd.rc
32 )
33
34 UP2DATE="updatecmd ${HOMEPAGE}/download | grep ${PNAME}- | lasttarball gz"
35
36 src_compile()
37 {
38 cd ${SRCDIR}
39
40 mconfigure \
41 --localstatedir=/var \
42 --with-distro=none \
43 --enable-compat-libdns_sd \
44 --enable-compat-howl \
45 --enable-autoipd \
46 --with-autoipd-user=avahi \
47 --with-autoipd-group=avahi \
48 --disable-python-dbus \
49 --disable-pygtk \
50 --disable-monodoc \
51 --disable-doxygen-doc \
52 --disable-xmltoman \
53 --disable-gdbm \
54 --disable-mono \
55 --disable-python \
56 --enable-dbus \
57 --enable-glib \
58 --disable-gtk \
59 --disable-qt3 \
60 --disable-qt4 \
61 || die
62
63 mmake || die
64 }
65
66 src_install()
67 {
68 cd ${SRCDIR}
69 mmake DESTDIR=${BINDIR} install || die
70
71 # for howl and mdnsresponder compat
72 mlink avahi-compat-howl.pc /usr/$(mlibdir)/pkgconfig/howl.pc || die
73 mlink avahi-compat-libdns_sd.pc /usr/$(mlibdir)/pkgconfig/libdns_sd.pc || die
74 mlink avahi-compat-libdns_sd/dns_sd.h /usr/include/dns_sd.h || die
75
76 # init scripts
77 minstallrc avahi-daemon.rc avahi-daemon || die
78 minstallrc avahi-dnsconfd.rc avahi-dnsconfd || die
79
80 minstalldocs ChangeLog LICENSE README
81 }
82
83 preinstall()
84 {
85 if [[ ! -z $(magequery -n mdnsresponder) ]]
86 then
87 echo -e ${COLRED}
88 echo -e "Error: net-misc/mdnsresponder is installed!!"
89 echo -e "mdnsresponder is now superseeded by avahi and deprecated in this distribution."
90 echo -e "Please uninstall net-misc/mdnsresponder first!"
91 echo -e ${COLDEFAULT}
92 die "net-misc/mdnsresponder found!"
93 fi
94
95 # adding avahi user
96 ${MLIBDIR}/mgroupadd -o "-g 303" netdev
97 ${MLIBDIR}/mgroupadd -o "-g 304" avahi
98 ${MLIBDIR}/museradd -o "-u 304 -g avahi -d /dev/null -s /bin/false" avahi
99 }
100
101 postinstall()
102 {
103 # reload dbus config here
104 [[ -n $(pidof dbus-daemon) ]] && /etc/init.d/dbus reload
105
106 mstartservice avahi-daemon
107 mstartservice avahi-dnsconfd
108 mstartservice avahi-autoipd
109 }
110
111 postremove()
112 {
113 mstopservice avahi-daemon
114 mstopservice avahi-dnsconfd
115 mstopservice avahi-autoipd
116 }