On Thu, May 27, 2010 at 10:21:33PM +0200, Tim Sander wrote:
> diff --git a/rules/avahi.in b/rules/avahi.in
> index 3b0a51e..c8dd8ea 100644
> --- a/rules/avahi.in
> +++ b/rules/avahi.in
> @@ -117,6 +117,12 @@ config AVAHI_SERVICES
> help
> install avahi service descriptions
>
> +config AVAHI_SERVICES_PROJECTROOT
> + bool
> + depends on AVAHI_DAEMON
> + prompt "avahi services from projectroot"
> + help
> + install avahi services from
> ${ptxdist_workspace}/projectroot/etc/avahi/services
> endif
>
> config AVAHI_DNSCONFD
> diff --git a/rules/avahi.make b/rules/avahi.make
> index 5d9a88b..a357945 100644
> --- a/rules/avahi.make
> +++ b/rules/avahi.make
> @@ -189,7 +189,16 @@ ifdef PTXCONF_AVAHI_SERVICES
> @$(call install_copy, avahi, 0, 0, 0644, -,
> /etc/avahi/services/ssh.service)
> endif
>
> -ifdef PTXCONF_AVAHI_DNSCONFD
> +ifdef PTXCONF_AVAHI_SERVICES_PROJECTROOT
> + @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
> +endif
> +
> +ifdef AVAHI_DNSCONFD
> # avahi dnsconfd (Unicast DNS server from mDNS/DNS-SD configuration
> daemon)
> # depends on avahi-daemon
> @$(call install_copy, avahi, 0, 0, 0755, -, /usr/sbin/avahi-dnsconfd)
> @@ -207,6 +216,10 @@ ifdef PTXCONF_AVAHI_AUTOIP
> @$(call install_link, avahi, ../init.d/zeroconf,
> /etc/rc.d/S30zeroconf)
> endif
>
> +ifdef PTXCONF_INITMETHOD_UPSTART
> + @$(call install_alternative, avahi, 0, 0, 0644, /etc/init/avahi-
> daemon.conf)
> +endif
> +
> @$(call install_finish, avahi)
>
> @$(call touch)
How is this related to upstart? This should be a separate patch
> diff --git a/rules/dbus.make b/rules/dbus.make
> index b7af1e7..214aaed 100644
> --- a/rules/dbus.make
> +++ b/rules/dbus.make
> @@ -2,6 +2,7 @@
> #
> # Copyright (C) 2006 by Roland Hostettler
> # 2008, 2009 by Marc Kleine-Budde <[email protected]>
> +# 2010 Tim
> Sander <[email protected]>
> #
> # See CREDITS for details about who has contributed to this project.
> #
> @@ -111,6 +112,7 @@ $(STATEDIR)/dbus.targetinstall:
> /usr/lib/libdbus-1.so.3.4.0)
> @$(call install_link, dbus, libdbus-1.so.3.4.0,
> /usr/lib/libdbus-1.so.3)
> @$(call install_link, dbus, libdbus-1.so.3.4.0, /usr/lib/libdbus-1.so)
> + @$(call install_dir, dbus, 0, 0, 0755, -, /var/lib/dbus)
Dito.
> diff --git a/rules/host-libnih.in b/rules/host-libnih.in
> new file mode 100644
> index 0000000..53513d5
> --- /dev/null
> +++ b/rules/host-libnih.in
> @@ -0,0 +1,4 @@
> +## SECTION=hosttools_noprompt
> +config HOST_LIBNIH
> + tristate
> + select HOST_DBUS
> diff --git a/rules/host-libnih.make b/rules/host-libnih.make
> new file mode 100644
> index 0000000..385f8c5
> --- /dev/null
> +++ b/rules/host-libnih.make
> @@ -0,0 +1,33 @@
> +# -*-makefile-*-
> +#
> +# Copyright (C) 2010 by Tim Sander <[email protected]>
> +#
> +# 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
> +#
> +HOST_PACKAGES-$(PTXCONF_HOST_LIBNIH) += host-libnih
> +
> +#
> +# Paths and names
> +#
> +HOST_LIBNIH_DIR = $(HOST_BUILDDIR)/$(LIBNIH)
> +
> +#
> ----------------------------------------------------------------------------
> +# Prepare
> +#
> ----------------------------------------------------------------------------
> +
> +HOST_LIBNIH_PATH := PATH=$(HOST_PATH)
> +HOST_LIBNIH_ENV := $(HOST_ENV)
> +
> +#
> +# autoconf
> +#
> +HOST_LIBNIH_AUTOCONF := $(HOST_AUTOCONF)
> +
> +# vim: syntax=make
> diff --git a/rules/initmethod.in b/rules/initmethod.in
> index 6864e6b..f735981 100644
> --- a/rules/initmethod.in
> +++ b/rules/initmethod.in
> @@ -19,7 +19,6 @@ choice
>
> config INITMETHOD_UPSTART
> bool
> - depends on BROKEN
> prompt "upstart "
>
> config INITMETHOD_INITNG
> diff --git a/rules/libnih.in b/rules/libnih.in
> new file mode 100644
> index 0000000..0a883e2
> --- /dev/null
> +++ b/rules/libnih.in
> @@ -0,0 +1,9 @@
> +## SECTION=system_libraries
> +
> +config LIBNIH
> + bool
> + prompt "libnih"
> + select DBUS
> + select HOST_LIBNIH
> + help
> + libnih is a small library for C application development containing
> functions that, despite its name, are not implemented elsewhere in the
> standard library set.
> diff --git a/rules/libnih.make b/rules/libnih.make
> new file mode 100644
> index 0000000..4ec69ce
> --- /dev/null
> +++ b/rules/libnih.make
> @@ -0,0 +1,125 @@
> +# -*-makefile-*-
> +#
> +# Copyright (C) 2010 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_LIBNIH) += libnih
> +
> +#
> +# Paths and names
> +#
> +LIBNIH_VERSION := 1.0.2
> +LIBNIH := libnih-$(LIBNIH_VERSION)
> +LIBNIH_SUFFIX := tar.gz
> +#LIBNIH_SRCDIR := $(PTXDIST_WORKSPACE)/local_src/$(LIBNIH)
> +LIBNIH_URL :=
> http://launchpad.net/libnih/1.0/$(LIBNIH_VERSION)/+download/$(LIBNIH).
> $(LIBNIH_SUFFIX)
> +LIBNIH_DIR := $(BUILDDIR)/$(LIBNIH)
> +LIBNIH_SOURCE := $(SRCDIR)/$(LIBNIH).$(LIBNIH_SUFFIX)
> +
> +#
> ----------------------------------------------------------------------------
> +# Get
> +#
> ----------------------------------------------------------------------------
> +$(LIBNIH_SOURCE):
> + @$(call targetinfo)
> + @$(call get, LIBNIH)
> +
> +#
> ----------------------------------------------------------------------------
> +# Prepare
> +#
> ----------------------------------------------------------------------------
> +
> +LIBNIH_PATH := PATH=$(CROSS_PATH)
> +LIBNIH_ENV := $(CROSS_ENV) NIH_DBUS_TOOL=${PTXDIST_PLATFORMDIR}/sysroot-
> host/bin/nih-dbus-tool
> +
> +#
> +# autoconf
> +#
> +LIBNIH_AUTOCONF := \
> + $(CROSS_AUTOCONF_USR)
> +
> +#$(STATEDIR)/libnih.prepare:
> +# @$(call targetinfo)
> +# @$(call clean, $(LIBNIH_DIR)/config.cache)
> +# cd $(LIBNIH_DIR) && \
> +# $(LIBNIH_PATH) $(LIBNIH_ENV) \
> +# $(LIBNIH_SRCDIR)/configure $(LIBNIH_AUTOCONF)
> +# @$(call touch)
> +
> +#
> ----------------------------------------------------------------------------
> +# Compile
> +#
> ----------------------------------------------------------------------------
> +
> +#$(STATEDIR)/libnih.compile:
> +# @$(call targetinfo)
> +# cd $(LIBNIH_DIR) && $(LIBNIH_ENV) $(LIBNIH_PATH) $(MAKE)
> $(PARALLELMFLAGS)
> +# @$(call touch)
> +
> +#
> ----------------------------------------------------------------------------
> +# Install
> +#
> ----------------------------------------------------------------------------
> +
> +#$(STATEDIR)/libnih.install:
> +# @$(call targetinfo)
> +# @$(call install, LIBNIH)
> +# @$(call touch)
> +
> +#
> ----------------------------------------------------------------------------
> +# Target-Install
> +#
> ----------------------------------------------------------------------------
> +
> +$(STATEDIR)/libnih.targetinstall:
> + @$(call targetinfo)
> +
> + @$(call install_init, libnih)
> + @$(call install_fixup, libnih, PACKAGE, libnih)
> + @$(call install_fixup, libnih, PRIORITY, optional)
> + @$(call install_fixup, libnih, VERSION, 1.0.1)
> + @$(call install_fixup, libnih, SECTION, base)
> + @$(call install_fixup, libnih, AUTHOR, "Tim Sander")
> + @$(call install_fixup, libnih, DEPENDS,)
> + @$(call install_fixup, libnih, DESCRIPTION, missing)
> +
> +# #
> +# # example code:; copy all libraries, links and binaries
> +# #
> +
> + @for i in $(shell cd $(PKGDIR)/$(LIBNIH) && find bin sbin usr/bin
> usr/sbin -type f); do \
> + $(call install_copy, libnih, 0, 0, 0755, -, /$$i); \
> + done
> + @for i in $(shell cd $(PKGDIR)/$(LIBNIH) && find lib usr/lib -name
> "*.so*"); do \
> + $(call install_copy, libnih, 0, 0, 0644, -, /$$i); \
> + done
> + @links="$(shell cd $(PKGDIR)/$(LIBNIH) && find lib usr/lib -type l)";
> \
> + if [ -n "$$links" ]; then \
> + for i in $$links; do \
> + from="`readlink $(PKGDIR)/$(LIBNIH)/$$i`"; \
> + to="/$$i"; \
> + $(call install_link, libnih, $$from, $$to); \
> + done; \
> + fi
> +
> +# #
> +# # FIXME: add all necessary things here
> +# #
> +
> + @$(call install_finish, libnih)
> +
> + @$(call touch)
> +
> +#
> ----------------------------------------------------------------------------
> +# Clean
> +#
> ----------------------------------------------------------------------------
> +
> +libnih_clean:
> + rm -rf $(STATEDIR)/libnih.*
> + rm -rf $(PKGDIR)/libnih_*
> + rm -rf $(LIBNIH_DIR)
> +
> +# vim: syntax=make
[host-]libnih in separate patches before the upstart stuff.
mol
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
--
ptxdist mailing list
[email protected]