Mercurial > vanilla
comparison dns/avahi/avahi.sh @ 931:20743b1b6f74
dns/avahi: initial import, closes #1211
author | David Demelier <markand@malikania.fr> |
---|---|
date | Thu, 29 Aug 2019 21:30:00 +0200 |
parents | |
children | ddab65a5b3f5 |
comparison
equal
deleted
inserted
replaced
930:7050a00e84e5 | 931:20743b1b6f74 |
---|---|
1 #!/bin/sh | |
2 # | |
3 # Copyright (c) 2019 David Demelier <markand@malikania.fr> | |
4 # | |
5 # Permission to use, copy, modify, and/or distribute this software for any | |
6 # purpose with or without fee is hereby granted, provided that the above | |
7 # copyright notice and this permission notice appear in all copies. | |
8 # | |
9 # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | |
10 # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | |
11 # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | |
12 # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | |
13 # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | |
14 # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | |
15 # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | |
16 # | |
17 | |
18 # TODO: add MONO option. | |
19 | |
20 PKGNAME=avahi | |
21 PKGVERSION=0.7 | |
22 PKGREVISION=1 | |
23 PKGLICENSE="LGPLv21" | |
24 PKGSUMMARY="DNS-SD over mDNS implementation" | |
25 PKGDOWNLOAD="http://avahi.org/download/$PKGNAME-$PKGVERSION.tar.gz" | |
26 PKGUIDS="avahi:107 avahi-autoipd:108" | |
27 PKGGIDS="avahi:107 avahi-autoipd:108" | |
28 PKGDEPENDS="expat libdaemon" | |
29 PKGOPTIONS="DBUS GLIB GOBJECT GTK INTROSPECTION NLS" | |
30 PKGPROTECT="etc/avahi/avahi-autoipd.action | |
31 etc/avahi/avahi-daemon.conf | |
32 etc/avahi/avahi-dnfconfd.action | |
33 etc/avahi/hosts | |
34 etc/rc.d/avahi" | |
35 | |
36 : ${CHOST:=$(uname -m)-linux-musl} | |
37 : ${CBUILD:=$(uname -m)-linux-musl} | |
38 : ${CC:=clang} | |
39 : ${CFLAGS:=-O2} | |
40 : ${CXX:=clang++} | |
41 : ${CXXFLAGS:=-O2} | |
42 : ${LDFLAGS:=} | |
43 : ${LIBS:=} | |
44 : ${DBUS:=yes} | |
45 : ${GLIB:=yes} | |
46 : ${GOBJECT:=yes} # Note: requires GLIB. | |
47 : ${GTK:=yes} | |
48 : ${INTROSPECTION:=yes} | |
49 : ${NLS:=yes} | |
50 | |
51 if [ "$DBUS" = "yes" ]; then | |
52 PKGDEPENDS="dbus $PKGDEPENDS" | |
53 with_dbus="--enable-dbus" | |
54 else | |
55 with_dbus="--disable-dbus" | |
56 fi | |
57 | |
58 if [ "$GLIB" = "yes" ]; then | |
59 PKGDEPENDS="glib $PKGDEPENDS" | |
60 with_glib="--enable-glib" | |
61 else | |
62 with_glib="--disable-glib" | |
63 fi | |
64 | |
65 if [ "$GOBJECT" = "yes" ]; then | |
66 with_gobject="--enable-gobject" | |
67 else | |
68 with_gobject="--disable-gobject" | |
69 fi | |
70 | |
71 if [ "$GTK" = "yes" ]; then | |
72 PKGDEPENDS="gtk $PKGDEPENDS" | |
73 with_gtk="--enable-gtk3" | |
74 else | |
75 with_gtk="--disable-gtk3" | |
76 fi | |
77 | |
78 if [ "$INTROSPECTION" = "yes" ]; then | |
79 PKGDEPENDS="gobject-introspection:build $PKGDEPENDS" | |
80 with_introspection="--enable-introspection" | |
81 else | |
82 with_introspection="--disable-introspection" | |
83 fi | |
84 | |
85 if [ "$NLS" = "yes" ]; then | |
86 PKGDEPENDS="gettext $PKGDEPENDS" | |
87 with_nls="--enable-nls" | |
88 else | |
89 with_nls="--disable-nls" | |
90 fi | |
91 | |
92 build() | |
93 { | |
94 rm -rf $PKGNAME-$PKGVERSION | |
95 tar xvf $PKGNAME-$PKGVERSION.tar.gz | |
96 cd $PKGNAME-$PKGVERSION | |
97 | |
98 # --disable-python: does not support Python 3 yet. | |
99 CC="$CC" \ | |
100 CFLAGS="$CFLAGS" \ | |
101 CXX="$CXX" \ | |
102 CXXFLAGS="$CXXFLAGS" \ | |
103 LDFLAGS="$LDFLAGS" \ | |
104 LIBS="$LIBS" \ | |
105 ./configure \ | |
106 --build=$CBUILD \ | |
107 --host=$CHOST \ | |
108 --prefix= \ | |
109 --sbindir=/bin \ | |
110 --disable-gtk \ | |
111 --disable-qt3 \ | |
112 --disable-qt4 \ | |
113 --disable-mono \ | |
114 --disable-monodoc \ | |
115 --disable-python \ | |
116 --with-xml=expat \ | |
117 --with-distro="none" \ | |
118 --without-systemdsystemunitdir \ | |
119 $with_dbus \ | |
120 $with_glib \ | |
121 $with_gobject \ | |
122 $with_gtk \ | |
123 $with_introspection \ | |
124 $with_nls | |
125 make | |
126 make install DESTDIR=$DESTDIR | |
127 rmdir $DESTDIR/run | |
128 find $DESTDIR -type f -name "*.la" -delete | |
129 install -Dm644 ../avahi $DESTDIR/etc/rc.d/avahi | |
130 | |
131 cd .. | |
132 rm -rf $PKGNAME-$PKGVERSION | |
133 } |