Magellan Linux

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 8336 - (show annotations) (download)
Thu Jul 14 23:12:10 2011 UTC (12 years, 9 months ago) by niro
File size: 5741 byte(s)
-split package -> avahi, avahi-gtk, avahi-qt3, avahi-qt4
1 # $Id$
2
3 PNAME="avahi"
4 PVER="0.6.30"
5 PBUILD="r3"
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 mirror://${PNAME}/avahi-daemon.rc
39 mirror://${PNAME}/avahi-dnsconfd.rc
40 )
41
42 UP2DATE="updatecmd ${HOMEPAGE}/download | grep ${PNAME}- | lasttarball gz"
43
44 split_info_avahi()
45 {
46 DESCRIPTION="Avahi is a system which facilitates service discovery on a local network."
47 DEPEND="${AVAHI_DEPEND}"
48
49 preinstall()
50 {
51 if [[ ! -z $(magequery -n mdnsresponder) ]]
52 then
53 echo -e ${COLRED}
54 echo -e "Error: net-misc/mdnsresponder is installed!!"
55 echo -e "mdnsresponder is now superseeded by avahi and deprecated in this distribution."
56 echo -e "Please uninstall net-misc/mdnsresponder first!"
57 echo -e ${COLDEFAULT}
58 die "net-misc/mdnsresponder found!"
59 fi
60
61 # adding avahi user
62 ${MLIBDIR}/mgroupadd -o "-g 303" netdev
63 ${MLIBDIR}/mgroupadd -o "-g 304" avahi
64 ${MLIBDIR}/museradd -o "-u 304 -g avahi -d /dev/null -s /bin/false" avahi
65 }
66
67 postinstall()
68 {
69 # reload dbus config here
70 [[ -n $(pidof dbus-daemon) ]] && /etc/init.d/dbus reload
71
72 mstartservice avahi-daemon
73 mstartservice avahi-dnsconfd
74 mstartservice avahi-autoipd
75 }
76
77 postremove()
78 {
79 mstopservice avahi-daemon
80 mstopservice avahi-dnsconfd
81 mstopservice avahi-autoipd
82 }
83 }
84
85 split_info_avahi-gtk()
86 {
87 DESCRIPTION="Avahi is a system which facilitates service discovery on a local network."
88 DEPEND="== net-dns/avahi-${PVER}
89 ${GTK_DEPEND}"
90 unset preinstall postinstall postremove
91 }
92
93 split_info_avahi-qt3()
94 {
95 DESCRIPTION="Avahi is a system which facilitates service discovery on a local network."
96 DEPEND="== net-dns/avahi-${PVER}
97 ${QT3_DEPEND}"
98 unset preinstall postinstall postremove
99 }
100
101 split_info_avahi-qt4()
102 {
103 DESCRIPTION="Avahi is a system which facilitates service discovery on a local network."
104 DEPEND="== net-dns/avahi-${PVER}
105 ${QT4_DEPEND}"
106 unset preinstall postinstall postremove
107 }
108
109 src_compile()
110 {
111 local myconf="--localstatedir=/var
112 --with-distro=none
113 --enable-compat-libdns_sd
114 --enable-compat-howl
115 --enable-autoipd
116 --with-autoipd-user=avahi
117 --with-autoipd-group=avahi
118 --disable-python-dbus
119 --disable-pygtk
120 --disable-monodoc
121 --disable-doxygen-doc
122 --disable-xmltoman
123 --disable-gdbm
124 --disable-mono
125 --disable-python
126 --enable-dbus
127 --enable-glib
128 --enable-gtk
129 --disable-gtk3"
130
131 # qt3/qt4 are not multilib on 64bit systems!
132 # exclude them from multlib, but build everything else mutlilib
133 if [[ ${ARCH} = x86_64 ]]
134 then
135 only-m32 mconfigure ${myconf} --disable-qt3 --disable-qt4 || die
136 only-m64 mconfigure ${myconf} --enable-qt3 --enable-qt4 || die
137 else
138 mconfigure ${myconf} --enable-qt3 --enable-qt4 || die
139 fi
140
141 mmake || die
142 }
143
144 src_install_avahi()
145 {
146 mmake DESTDIR=${BINDIR} install || die
147
148 # for howl and mdnsresponder compat
149 mlink avahi-compat-howl.pc /usr/$(mlibdir)/pkgconfig/howl.pc || die
150 mlink avahi-compat-libdns_sd.pc /usr/$(mlibdir)/pkgconfig/libdns_sd.pc || die
151 mlink avahi-compat-libdns_sd/dns_sd.h /usr/include/dns_sd.h || die
152
153 # init scripts
154 minstallrc avahi-daemon.rc avahi-daemon || die
155 minstallrc avahi-dnsconfd.rc avahi-dnsconfd || die
156
157 minstalldocs ChangeLog LICENSE README
158
159 # remove stuff from other packages
160 # gtk
161 rm ${BINDIR}/usr/bin/bssh || die
162 rm ${BINDIR}/usr/bin/bshell || die
163 rm ${BINDIR}/usr/bin/bvnc || die
164 rm -r ${BINDIR}/usr/share/applications || die
165 rm -r ${BINDIR}/usr/share/avahi/interfaces || die
166 rm -r ${BINDIR}/usr/include/avahi-ui || die
167 # qt3
168 rm ${BINDIR}/usr/$(mlibdir)/libavahi-qt3*.* || die
169 rm ${BINDIR}/usr/$(mlibdir)/pkgconfig/avahi-qt3*.* || die
170 rm -r ${BINDIR}/usr/include/avahi-qt3 || die
171 # qt4
172 rm ${BINDIR}/usr/$(mlibdir)/libavahi-qt4*.* || die
173 rm ${BINDIR}/usr/$(mlibdir)/pkgconfig/avahi-qt4*.* || die
174 rm -r ${BINDIR}/usr/include/avahi-qt4 || die
175 }
176
177 src_install_avahi-gtk()
178 {
179 mmake -j1 -C avahi-ui DESTDIR=${BINDIR} install || die
180 # missing pkgconfig file
181 all-abis 'minstalldir /usr/$(mlibdir)/pkgconfig' || die
182 all-abis 'minstallfile avahi-ui.pc /usr/$(mlibdir)/pkgconfig' || die
183 }
184
185 src_install_avahi-qt3()
186 {
187 mmake -j1 -C avahi-qt DESTDIR=${BINDIR} install || die
188 # missing pkgconfig file
189 if [[ ${ARCH} = x86_64 ]]
190 then
191 only-m64 'minstalldir /usr/$(mlibdir)/pkgconfig' || die
192 only-m64 'minstallfile avahi-qt3.pc /usr/$(mlibdir)/pkgconfig' || die
193 else
194 all-abis 'minstalldir /usr/$(mlibdir)/pkgconfig' || die
195 all-abis 'minstallfile avahi-qt3.pc /usr/$(mlibdir)/pkgconfig' || die
196 fi
197
198 zapmost ${BINDIR} \
199 usr/$(mlibdir)/libavahi-qt3*.* \
200 usr/$(mlibdir)/pkgconfig/avahi-qt3*.* \
201 usr/include/avahi-qt3 \
202 || die
203 }
204
205 src_install_avahi-qt4()
206 {
207 mmake -j1 -C avahi-qt DESTDIR=${BINDIR} install || die
208 # missing pkgconfig file
209 if [[ ${ARCH} = x86_64 ]]
210 then
211 only-m64 'minstalldir /usr/$(mlibdir)/pkgconfig' || die
212 only-m64 'minstallfile avahi-qt4.pc /usr/$(mlibdir)/pkgconfig' || die
213 else
214 all-abis 'minstalldir /usr/$(mlibdir)/pkgconfig' || die
215 all-abis 'minstallfile avahi-qt4.pc /usr/$(mlibdir)/pkgconfig' || die
216 fi
217
218 zapmost ${BINDIR} \
219 usr/$(mlibdir)/libavahi-qt4*.* \
220 usr/$(mlibdir)/pkgconfig/avahi-qt4*.* \
221 usr/include/avahi-qt4 \
222 || die
223 }