Magellan Linux

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 8972 - (show annotations) (download)
Fri Aug 26 19:35:03 2011 UTC (12 years, 9 months ago) by niro
File size: 5228 byte(s)
-dropped SysV support
1 # $Id$
2
3 PNAME="avahi"
4 PVER="0.6.30"
5 PBUILD="r4"
6
7 SPLIT_PACKAGES="avahi avahi-gtk avahi-qt3 avahi-qt4"
8
9 PCATEGORIE="net-dns"
10
11 HOMEPAGE="http://avahi.org/"
12
13 AVAHI_DEPEND=">= dev-libs/libdaemon-0.14
14 >= dev-libs/expat-2
15 >= dev-libs/glib2-2.28
16 >= sys-apps/dbus-1.4
17 >= sys-libs/libcap-2.20"
18 GTK_DEPEND=">= x11-libs/gtk2+-2.24
19 >= gnome-base/libglade-2.6.4"
20 QT3_DEPEND=">= x11-libs/qt4-3.3"
21 QT4_DEPEND=">= x11-libs/qt4-4.7"
22
23 SDEPEND="${AVAHI_DEPEND}
24 ${GTK_DEPEND}
25 ${QT3_DEPEND}
26 ${QT4_DEPEND}
27 >= dev-util/intltool-0.41
28 >= dev-util/pkgconfig-0.25"
29
30 SRCFILE="${PNAME}-${PVER}.tar.gz"
31 SRCDIR="${BUILDDIR}/${PNAME}-${PVER}"
32
33 sminclude mtools qt3 qt4 multilib cleanutils
34
35 SRC_URI=(
36 http://avahi.org/download/${SRCFILE}
37 mirror://${PNAME}/${SRCFILE}
38 )
39
40 UP2DATE="updatecmd ${HOMEPAGE}/download | grep ${PNAME}- | lasttarball gz"
41
42 split_info_avahi()
43 {
44 DESCRIPTION="Avahi is a system which facilitates service discovery on a local network."
45 DEPEND="${AVAHI_DEPEND}"
46 }
47
48 split_info_avahi-gtk()
49 {
50 DESCRIPTION="Avahi is a system which facilitates service discovery on a local network."
51 DEPEND="== net-dns/avahi-${PVER}
52 ${GTK_DEPEND}"
53 }
54
55 split_info_avahi-qt3()
56 {
57 DESCRIPTION="Avahi is a system which facilitates service discovery on a local network."
58 DEPEND="== net-dns/avahi-${PVER}
59 ${QT3_DEPEND}"
60 }
61
62 split_info_avahi-qt4()
63 {
64 DESCRIPTION="Avahi is a system which facilitates service discovery on a local network."
65 DEPEND="== net-dns/avahi-${PVER}
66 ${QT4_DEPEND}"
67 }
68
69 src_compile()
70 {
71 local myconf="--localstatedir=/var
72 --with-distro=none
73 --enable-compat-libdns_sd
74 --enable-compat-howl
75 --enable-autoipd
76 --with-autoipd-user=avahi
77 --with-autoipd-group=avahi
78 --disable-python-dbus
79 --disable-pygtk
80 --disable-monodoc
81 --disable-doxygen-doc
82 --disable-xmltoman
83 --disable-gdbm
84 --disable-mono
85 --disable-python
86 --enable-dbus
87 --enable-glib
88 --enable-gtk
89 --disable-gtk3"
90
91 # qt3/qt4 are not multilib on 64bit systems!
92 # exclude them from multlib, but build everything else mutlilib
93 if [[ ${ARCH} = x86_64 ]]
94 then
95 only-m32 mconfigure ${myconf} --disable-qt3 --disable-qt4 || die
96 only-m64 mconfigure ${myconf} --enable-qt3 --enable-qt4 || die
97 else
98 mconfigure ${myconf} --enable-qt3 --enable-qt4 || die
99 fi
100
101 mmake || die
102 }
103
104 src_install_avahi()
105 {
106 mmake DESTDIR=${BINDIR} install || die
107
108 # for howl and mdnsresponder compat
109 mlink avahi-compat-howl.pc /usr/$(mlibdir)/pkgconfig/howl.pc || die
110 mlink avahi-compat-libdns_sd.pc /usr/$(mlibdir)/pkgconfig/libdns_sd.pc || die
111 mlink avahi-compat-libdns_sd/dns_sd.h /usr/include/dns_sd.h || die
112
113 # init scripts
114 minstallrc avahi-daemon.rc avahi-daemon || die
115 minstallrc avahi-dnsconfd.rc avahi-dnsconfd || die
116
117 minstalldocs ChangeLog LICENSE README
118
119 # remove stuff from other packages
120 # gtk
121 rm ${BINDIR}/usr/bin/bssh || die
122 rm ${BINDIR}/usr/bin/bshell || die
123 rm ${BINDIR}/usr/bin/bvnc || die
124 rm -r ${BINDIR}/usr/share/applications || die
125 rm -r ${BINDIR}/usr/share/avahi/interfaces || die
126 rm -r ${BINDIR}/usr/include/avahi-ui || die
127 # qt3
128 rm ${BINDIR}/usr/$(mlibdir)/libavahi-qt3*.* || die
129 rm ${BINDIR}/usr/$(mlibdir)/pkgconfig/avahi-qt3*.* || die
130 rm -r ${BINDIR}/usr/include/avahi-qt3 || die
131 # qt4
132 rm ${BINDIR}/usr/$(mlibdir)/libavahi-qt4*.* || die
133 rm ${BINDIR}/usr/$(mlibdir)/pkgconfig/avahi-qt4*.* || die
134 rm -r ${BINDIR}/usr/include/avahi-qt4 || die
135 }
136
137 src_install_avahi-gtk()
138 {
139 mmake -j1 -C avahi-ui DESTDIR=${BINDIR} install || die
140 # missing pkgconfig file
141 all-abis 'minstalldir /usr/$(mlibdir)/pkgconfig' || die
142 all-abis 'minstallfile avahi-ui.pc /usr/$(mlibdir)/pkgconfig' || die
143 }
144
145 src_install_avahi-qt3()
146 {
147 mmake -j1 -C avahi-qt DESTDIR=${BINDIR} install || die
148 # missing pkgconfig file
149 if [[ ${ARCH} = x86_64 ]]
150 then
151 only-m64 'minstalldir /usr/$(mlibdir)/pkgconfig' || die
152 only-m64 'minstallfile avahi-qt3.pc /usr/$(mlibdir)/pkgconfig' || die
153 else
154 all-abis 'minstalldir /usr/$(mlibdir)/pkgconfig' || die
155 all-abis 'minstallfile avahi-qt3.pc /usr/$(mlibdir)/pkgconfig' || die
156 fi
157
158 zapmost ${BINDIR} \
159 usr/$(mlibdir)/libavahi-qt3*.* \
160 usr/$(mlibdir)/pkgconfig/avahi-qt3*.* \
161 usr/include/avahi-qt3 \
162 || die
163 }
164
165 src_install_avahi-qt4()
166 {
167 mmake -j1 -C avahi-qt DESTDIR=${BINDIR} install || die
168 # missing pkgconfig file
169 if [[ ${ARCH} = x86_64 ]]
170 then
171 only-m64 'minstalldir /usr/$(mlibdir)/pkgconfig' || die
172 only-m64 'minstallfile avahi-qt4.pc /usr/$(mlibdir)/pkgconfig' || die
173 else
174 all-abis 'minstalldir /usr/$(mlibdir)/pkgconfig' || die
175 all-abis 'minstallfile avahi-qt4.pc /usr/$(mlibdir)/pkgconfig' || die
176 fi
177
178 zapmost ${BINDIR} \
179 usr/$(mlibdir)/libavahi-qt4*.* \
180 usr/$(mlibdir)/pkgconfig/avahi-qt4*.* \
181 usr/include/avahi-qt4 \
182 || die
183 }
184
185 preinstall_avahi()
186 {
187 if [[ ! -z $(magequery -n mdnsresponder) ]]
188 then
189 echo -e ${COLRED}
190 echo -e "Error: net-misc/mdnsresponder is installed!!"
191 echo -e "mdnsresponder is now superseeded by avahi and deprecated in this distribution."
192 echo -e "Please uninstall net-misc/mdnsresponder first!"
193 echo -e ${COLDEFAULT}
194 die "net-misc/mdnsresponder found!"
195 fi
196
197 # adding avahi user
198 ${MLIBDIR}/mgroupadd -o "-g 303" netdev
199 ${MLIBDIR}/mgroupadd -o "-g 304" avahi
200 ${MLIBDIR}/museradd -o "-u 304 -g avahi -d /dev/null -s /bin/false" avahi
201 }