PageRenderTime 27ms CodeModel.GetById 2ms RepoModel.GetById 0ms app.codeStats 0ms

/packages/network/avahi/package.mk

http://github.com/OpenELEC/OpenELEC.tv
Makefile | 117 lines | 84 code | 10 blank | 23 comment | 2 complexity | 5a5946871a1d47852e3429b3c3189496 MD5 | raw file
Possible License(s): CC0-1.0
  1. ################################################################################
  2. # This file is part of OpenELEC - http://www.openelec.tv
  3. # Copyright (C) 2009-2017 Stephan Raue (stephan@openelec.tv)
  4. #
  5. # OpenELEC is free software: you can redistribute it and/or modify
  6. # it under the terms of the GNU General Public License as published by
  7. # the Free Software Foundation, either version 2 of the License, or
  8. # (at your option) any later version.
  9. #
  10. # OpenELEC is distributed in the hope that it will be useful,
  11. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. # GNU General Public License for more details.
  14. #
  15. # You should have received a copy of the GNU General Public License
  16. # along with OpenELEC. If not, see <http://www.gnu.org/licenses/>.
  17. ################################################################################
  18. PKG_NAME="avahi"
  19. PKG_VERSION="0.6.32"
  20. PKG_REV="1"
  21. PKG_ARCH="any"
  22. PKG_LICENSE="GPL"
  23. PKG_SITE="http://avahi.org/"
  24. PKG_URL="http://sources.openelec.tv/mirror/avahi/$PKG_NAME-$PKG_VERSION.tar.gz"
  25. PKG_DEPENDS_TARGET="toolchain expat libdaemon dbus connman"
  26. PKG_PRIORITY="optional"
  27. PKG_SECTION="network"
  28. PKG_SHORTDESC="avahi: A Zeroconf mDNS/DNS-SD responder"
  29. PKG_LONGDESC="Avahi is a framework for Multicast DNS Service Discovery (mDNS/DNS-SD a.k.a. Zeroconf) on Linux. It allows programs to publish and discover services running on a local network with no specific configuration. For example, you can plug into a network and instantly find printers to print to, files to look at, and people to talk to."
  30. PKG_IS_ADDON="no"
  31. #broken
  32. PKG_AUTORECONF="no"
  33. MAKEFLAGS="-j1"
  34. PKG_CONFIGURE_OPTS_TARGET="py_cv_mod_gtk_=yes \
  35. py_cv_mod_dbus_=yes \
  36. ac_cv_func_chroot=no \
  37. --with-distro=none \
  38. --disable-glib \
  39. --disable-gobject \
  40. --disable-qt3 \
  41. --disable-qt4 \
  42. --disable-gtk \
  43. --disable-gtk3 \
  44. --enable-dbus \
  45. --disable-dbm \
  46. --disable-gdbm \
  47. --enable-libdaemon \
  48. --disable-python \
  49. --disable-pygtk \
  50. --disable-python-dbus \
  51. --disable-mono \
  52. --disable-monodoc \
  53. --disable-autoipd \
  54. --disable-doxygen-doc \
  55. --disable-doxygen-dot \
  56. --disable-doxygen-man \
  57. --disable-doxygen-rtf \
  58. --disable-doxygen-xml \
  59. --disable-doxygen-chm \
  60. --disable-doxygen-chi \
  61. --disable-doxygen-html \
  62. --disable-doxygen-ps \
  63. --disable-doxygen-pdf \
  64. --disable-core-docs \
  65. --disable-manpages \
  66. --disable-xmltoman \
  67. --disable-tests \
  68. --disable-compat-libdns_sd \
  69. --disable-compat-howl \
  70. --with-xml=expat \
  71. --with-avahi-user=avahi \
  72. --with-avahi-group=avahi \
  73. --disable-nls"
  74. pre_configure_target() {
  75. NOCONFIGURE=1 ./autogen.sh
  76. }
  77. post_makeinstall_target() {
  78. # for some reason avai can fail to start see: http://forums.gentoo.org/viewtopic-p-7322172.html#7322172
  79. sed -e "s,^.*disallow-other-stacks=.*$,disallow-other-stacks=yes,g" -i $INSTALL/etc/avahi/avahi-daemon.conf
  80. # disable wide-area
  81. sed -e "s,^.*enable-wide-area=.*$,enable-wide-area=no,g" -i $INSTALL/etc/avahi/avahi-daemon.conf
  82. # publish-hinfo
  83. sed -e "s,^.*publish-hinfo=.*$,publish-hinfo=no,g" -i $INSTALL/etc/avahi/avahi-daemon.conf
  84. # publish-workstation
  85. sed -e "s,^.*publish-workstation=.*$,publish-workstation=no,g" -i $INSTALL/etc/avahi/avahi-daemon.conf
  86. # browse domains?
  87. sed -e "s,^.*browse-domains=.*$,# browse-domains=,g" -i $INSTALL/etc/avahi/avahi-daemon.conf
  88. rm -rf $INSTALL/etc/avahi/avahi-dnsconfd.action
  89. rm -rf $INSTALL/etc/avahi/services/ssh.service
  90. if [ ! $SFTP_SERVER = "yes" ]; then
  91. rm -rf $INSTALL/etc/avahi/services/sftp-ssh.service
  92. fi
  93. rm -rf $INSTALL/usr/lib/systemd
  94. rm -f $INSTALL/usr/share/dbus-1/system-services/org.freedesktop.Avahi.service
  95. rm -f $INSTALL/usr/sbin/avahi-dnsconfd
  96. rm -f $INSTALL/usr/bin/avahi-bookmarks
  97. rm -f $INSTALL/usr/bin/avahi-publish*
  98. rm -f $INSTALL/usr/bin/avahi-resolve*
  99. mkdir -p $INSTALL/usr/share/services
  100. cp -P $PKG_DIR/default.d/*.conf $INSTALL/usr/share/services
  101. }
  102. post_install() {
  103. add_user avahi x 495 495 "avahi-daemon" "/var/run/avahi-daemon" "/bin/sh"
  104. add_group avahi 495
  105. enable_service avahi-defaults.service
  106. enable_service avahi-daemon.service
  107. }