Magellan Linux

Contents of /branches/magellan-next/core/avahi/avahi-0.6.30-r2.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 8186 - (show annotations) (download)
Tue Jul 12 23:41:26 2011 UTC (12 years, 11 months ago) by niro
File size: 2571 byte(s)
-multilib
1 # $Id$
2
3 PNAME="avahi"
4 PVER="0.6.30"
5 PBUILD="r2"
6
7 PCATEGORIE="net-dns"
8
9 DESCRIPTION="Avahi is a system which facilitates service discovery on a local network."
10 HOMEPAGE="http://avahi.org/"
11
12 DEPEND=">= dev-libs/libdaemon-0.14
13 >= dev-libs/expat-2
14 >= dev-libs/glib2-2.28
15 >= sys-apps/dbus-1.4
16 >= sys-libs/libcap-2.20"
17
18 SDEPEND=">= dev-util/intltool-0.41
19 >= dev-util/pkgconfig-0.25"
20
21 SRCFILE="${PNAME}-${PVER}.tar.gz"
22 SRCDIR="${BUILDDIR}/${PNAME}-${PVER}"
23
24 sminclude mtools multilib
25
26 SRC_URI=(
27 http://avahi.org/download/${SRCFILE}
28 mirror://${PNAME}/${SRCFILE}
29 mirror://${PNAME}/avahi-daemon.rc
30 mirror://${PNAME}/avahi-dnsconfd.rc
31 )
32
33 UP2DATE="updatecmd ${HOMEPAGE}/download | grep ${PNAME}- | lasttarball gz"
34
35 src_compile()
36 {
37 cd ${SRCDIR}
38
39 mconfigure \
40 --localstatedir=/var \
41 --with-distro=none \
42 --enable-compat-libdns_sd \
43 --enable-compat-howl \
44 --enable-autoipd \
45 --with-autoipd-user=avahi \
46 --with-autoipd-group=avahi \
47 --disable-python-dbus \
48 --disable-pygtk \
49 --disable-monodoc \
50 --disable-doxygen-doc \
51 --disable-xmltoman \
52 --disable-gdbm \
53 --disable-mono \
54 --disable-python \
55 --enable-dbus \
56 --enable-glib \
57 --disable-gtk \
58 --disable-gtk3 \
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 }