-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathavahi
69 lines (49 loc) · 1.55 KB
/
avahi
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#!/bin/bash
export CFLAGS=-"O2"
export CXXFLAGS="-O2"
PKG_VER=0.8
URL=https://github.com/lathiat/avahi/releases/download/v$PKG_VER/avahi-$PKG_VER.tar.gz
TAR=$(echo $URL | sed -r 's|(.*)/||')
DIR=$(echo $TAR | sed 's|.tar.*||g')
PACKAGE=$(echo $DIR | sed 's|-[^-]*$||g')
# Get Package
cd /blfs/builds
wget https://www.linuxfromscratch.org/patches/blfs/svn/avahi-$PKG_VER-ipv6_race_condition_fix-1.patch
wget $URL
tar -xvf $TAR
cd $DIR
# Build
patch -Np1 -i ../avahi-$PKG_VER-ipv6_race_condition_fix-1.patch
sed -i '426a if (events & AVAHI_WATCH_HUP) { \
client_free(c); \
return; \
}' avahi-daemon/simple-protocol.c
./configure \
--prefix=/usr \
--sysconfdir=/etc \
--localstatedir=/var \
--disable-static \
--disable-mono \
--disable-monodoc \
--disable-python \
--disable-qt3 \
--disable-qt4 \
--enable-core-docs \
--with-distro=none \
--enable-compat-howl \
--enable-compat-libdns_sd \
--with-dbus-system-address='unix:path=/run/dbus/systemd_bus_socket'
make -j16
# Install
sudo make DESTDIR=/pkgs/$PACKAGE install
echo 'groupadd -fg 84 avahi &&
useradd -c "Avahi Daemon Owner" -d /run/avahi-daemon -u 84 \
-g avahi -s /bin/false avahi' > /pkgs/avahi/postinst
echo "groupadd -fg 86 netdev" >> /pkgs/avahi/postinst
sudo make install
cd /pkgs
sudo echo "gtk2 gtk3 libdaemon libglade gobject-introspection glib libevent qt5" > /pkgs/$PACKAGE/depends
sudo tar -cvpf $PACKAGE.tar.xz $PACKAGE
sudo cp $PACKAGE.tar.xz /finished
cd /blfs/builds
sudo rm -r $DIR