Hi 

Attached are the build rules for the avahi mdns server. These are my first
packages, so feel free to comment.

Best regards
Tim
## SECTION=networking

config AVAHI
        tristate
        prompt "avahi"
        select INTLTOOL
        select EXPAT
        select LIBDAEMON
        select PYTHON_26
        select GLIBC
#       select DBUS_PYTHON
        help
          Avahi is a system which facilitates service discovery on a local 
network
# -*-makefile-*-
# $Id: template-make 9053 2008-11-03 10:58:48Z wsa $
#
# Copyright (C) 2009 by Tim Sander
#
# See CREDITS for details about who has contributed to this project.
#
# For further information about the PTXdist project and license conditions
# see the README file.
#

#
# We provide this package
#
PACKAGES-$(PTXCONF_AVAHI) += avahi

#
# Paths and names
#
AVAHI_VERSION   := 0.6.25
AVAHI           := avahi-$(AVAHI_VERSION)
AVAHI_SUFFIX            := tar.gz
AVAHI_URL               := http://avahi.org/download//$(AVAHI).$(AVAHI_SUFFIX)
AVAHI_SOURCE            := $(SRCDIR)/$(AVAHI).$(AVAHI_SUFFIX)
AVAHI_DIR               := $(BUILDDIR)/$(AVAHI)
AVAHI_CONF              := --with-distro=none --disable-qt4 --disable-qt3 
--disable-gtk --disable-gdbm --disable-python --disable-pygtk 
--disable-python-dbus --disable-mono --prefix="" 
--host=arm-1136jfs-linux-gnueabi --disable-glib --disable-gobject 
--disable-stack-protector --with-avahi-user=messagebus 
--with-avahi-group=messagebus --with-avahi-priv-access-group=root

# ----------------------------------------------------------------------------
# Get
# ----------------------------------------------------------------------------

$(AVAHI_SOURCE):
        @$(call targetinfo)
        @$(call get, AVAHI)

# ----------------------------------------------------------------------------
# Extract
# ----------------------------------------------------------------------------

$(STATEDIR)/avahi.extract:
        @$(call targetinfo)
        @$(call clean, $(AVAHI_DIR))
        @$(call extract, AVAHI)
        @$(call patchin, AVAHI)
        @$(call touch)

# ----------------------------------------------------------------------------
# Prepare
# ----------------------------------------------------------------------------

AVAHI_PATH      := PATH=$(CROSS_PATH)
AVAHI_ENV       := $(CROSS_ENV)

#
# autoconf
#
AVAHI_AUTOCONF := $(CROSS_AUTOCONF_USR) $(AVAHI_CONF)

$(STATEDIR)/avahi.prepare:
        @$(call targetinfo)
        @$(call clean, $(AVAHI_DIR)/config.cache)
        cd $(AVAHI_DIR) && \
                $(AVAHI_PATH) $(AVAHI_ENV) \
                ./configure $(AVAHI_AUTOCONF)
        @$(call touch)

# ----------------------------------------------------------------------------
# Compile
# ----------------------------------------------------------------------------

$(STATEDIR)/avahi.compile:
        @$(call targetinfo)
        cd $(AVAHI_DIR) && $(AVAHI_PATH) $(MAKE) $(PARALLELMFLAGS)
        @$(call touch)

# ----------------------------------------------------------------------------
# Install
# ----------------------------------------------------------------------------

$(STATEDIR)/avahi.install:
        @$(call targetinfo)
        @$(call install, AVAHI)
        @$(call touch)

# ----------------------------------------------------------------------------
# Target-Install
# ----------------------------------------------------------------------------

$(STATEDIR)/avahi.targetinstall:
        @$(call targetinfo)

        @$(call install_init, avahi)
        @$(call install_fixup, avahi,PACKAGE,avahi)
        @$(call install_fixup, avahi,PRIORITY,optional)
        @$(call install_fixup, avahi,VERSION,$(AVAHI_VERSION))
        @$(call install_fixup, avahi,SECTION,base)
        @$(call install_fixup, avahi,AUTHOR,"Tim Sander")
        @$(call install_fixup, avahi,DEPENDS,)
        @$(call install_fixup, avahi,DESCRIPTION,missing)

        @$(call install_copy, avahi, 0, 0, 0755, 
$(AVAHI_DIR)/avahi-daemon/avahi-daemon, /usr/sbin/avahi-daemon)
        @$(call install_copy, avahi, 0, 0, 0644, 
$(AVAHI_DIR)/avahi-daemon/avahi-service.dtd , 
/usr/share/avahi/avahi-service.dtd)
        @$(call install_copy, avahi, 0, 0, 0644, 
$(AVAHI_DIR)/avahi-daemon/Server.introspect , 
/usr/share/avahi/introspection/Server.introspect)
        @$(call install_copy, avahi, 0, 0, 0644, 
$(AVAHI_DIR)/avahi-daemon/ServiceResolver.introspect, 
/usr/share/avahi/introspection/ServiceResolver.introspect )
        @$(call install_copy, avahi, 0, 0, 0644, 
$(AVAHI_DIR)/avahi-daemon/EntryGroup.introspect, 
/usr/share/avahi/introspection/EntryGroup.introspect)
        @$(call install_copy, avahi, 0, 0, 0644, 
$(AVAHI_DIR)/avahi-daemon/AddressResolver.introspect, 
/usr/share/avahi/introspection/AddressResolver.introspect)
        @$(call install_copy, avahi, 0, 0, 0644, 
$(AVAHI_DIR)/avahi-daemon/RecordBrowser.introspect, 
/usr/share/avahi/introspection/RecordBrowser.introspect)
        @$(call install_copy, avahi, 0, 0, 0644, 
$(AVAHI_DIR)/avahi-daemon/DomainBrowser.introspect, 
/usr/share/avahi/introspection/DomainBrowser.introspect)
        @$(call install_copy, avahi, 0, 0, 0644, 
$(AVAHI_DIR)/avahi-daemon/ServiceBrowser.introspect, 
/usr/share/avahi/introspection/ServiceBrowser.introspect)
        @$(call install_copy, avahi, 0, 0, 0644, 
$(AVAHI_DIR)/avahi-daemon/HostNameResolver.introspect, 
/usr/share/avahi/introspection/HostNameResolver.introspect)
        @$(call install_copy, avahi, 0, 0, 0644, 
$(AVAHI_DIR)/avahi-daemon/ServiceTypeBrowser.introspect, 
/usr/share/avahi/introspection/ServiceTypeBrowser.introspect)
        @$(call install_copy, avahi, 0, 0, 0644, 
$(AVAHI_DIR)/avahi-daemon/avahi-daemon.conf , /etc/avahi/avahi-daemon.conf)
        @$(call install_copy, avahi, 0, 0, 0644, 
$(AVAHI_DIR)/avahi-daemon/hosts , /etc/avahi/hosts)
        @$(call install_copy, avahi, 0, 0, 0644, 
$(AVAHI_DIR)/avahi-daemon/avahi-dbus.conf, /etc/dbus-1/system.d/avahi-dbus.conf)
        @$(call install_copy, avahi, 0, 0, 0644, 
$(AVAHI_DIR)/avahi-common/.libs/libavahi-common.so.3.5.1, 
/usr/lib/libavahi-common.so.3.5.1)
        @$(call install_link, avahi, libavahi-common.so.3.5.1, 
/usr/lib/libavahi-common.so.3)
        @$(call install_link, avahi, libavahi-common.so.3.5.1, 
/usr/lib/libavahi-common.so)
        @$(call install_copy, avahi, 0, 0, 0644, 
$(AVAHI_DIR)/avahi-core/.libs/libavahi-core.so.6.0.1, 
/usr/lib/libavahi-core.so.6.0.1)
        @$(call install_link, avahi, libavahi-core.so.6.0.1, 
/usr/lib/libavahi-core.so.6)
        @$(call install_link, avahi, libavahi-core.so.6.0.1, 
/usr/lib/libavahi-core.so)
        

        @cd $(PTXDIST_WORKSPACE)/projectroot/etc/avahi/services/; \
        for file in *; do \
                $(call install_copy, avahi, 0, 0, 0644, \
                        
$(PTXDIST_WORKSPACE)/projectroot/etc/avahi/services/$$file, \
                        /etc/avahi/services/$$file, n); \
        done

        @$(call install_finish, avahi)

        @$(call touch)

# ----------------------------------------------------------------------------
# Clean
# ----------------------------------------------------------------------------

avahi_clean:
        rm -rf $(STATEDIR)/avahi.*
        rm -rf $(PKGDIR)/avahi_*
        rm -rf $(AVAHI_DIR)

# vim: syntax=make
--
ptxdist mailing list
[email protected]

Reply via email to