Magellan Linux

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 6723 - (show annotations) (download)
Wed Sep 22 10:02:39 2010 UTC (13 years, 7 months ago) by niro
File size: 2642 byte(s)
-disabled gtk3
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-gtk3 \
60 --disable-qt3 \
61 --disable-qt4 \
62 || die
63
64 mmake || die
65 }
66
67 src_install()
68 {
69 cd ${SRCDIR}
70 mmake DESTDIR=${BINDIR} install || die
71
72 # for howl and mdnsresponder compat
73 mlink avahi-compat-howl.pc /usr/$(mlibdir)/pkgconfig/howl.pc || die
74 mlink avahi-compat-libdns_sd.pc /usr/$(mlibdir)/pkgconfig/libdns_sd.pc || die
75 mlink avahi-compat-libdns_sd/dns_sd.h /usr/include/dns_sd.h || die
76
77 # init scripts
78 minstallrc avahi-daemon.rc avahi-daemon || die
79 minstallrc avahi-dnsconfd.rc avahi-dnsconfd || die
80
81 minstalldocs ChangeLog LICENSE README
82 }
83
84 preinstall()
85 {
86 if [[ ! -z $(magequery -n mdnsresponder) ]]
87 then
88 echo -e ${COLRED}
89 echo -e "Error: net-misc/mdnsresponder is installed!!"
90 echo -e "mdnsresponder is now superseeded by avahi and deprecated in this distribution."
91 echo -e "Please uninstall net-misc/mdnsresponder first!"
92 echo -e ${COLDEFAULT}
93 die "net-misc/mdnsresponder found!"
94 fi
95
96 # adding avahi user
97 ${MLIBDIR}/mgroupadd -o "-g 303" netdev
98 ${MLIBDIR}/mgroupadd -o "-g 304" avahi
99 ${MLIBDIR}/museradd -o "-u 304 -g avahi -d /dev/null -s /bin/false" avahi
100 }
101
102 postinstall()
103 {
104 # reload dbus config here
105 [[ -n $(pidof dbus-daemon) ]] && /etc/init.d/dbus reload
106
107 mstartservice avahi-daemon
108 mstartservice avahi-dnsconfd
109 mstartservice avahi-autoipd
110 }
111
112 postremove()
113 {
114 mstopservice avahi-daemon
115 mstopservice avahi-dnsconfd
116 mstopservice avahi-autoipd
117 }