GARNAME = dhcdbd
GARVERSION = 1.14
CATEGORIES = bootstrap
DISTFILES = $(GARNAME)-$(GARVERSION).tar.gz
PATCHFILES = makefile-fix.diff dhcdbd-1.14-dbus-deprecated.patch

MASTER_SITES = http://people.redhat.com/jvdias/dhcdbd/

DESCRIPTION = bootstrap
define BLURB
dhcdbd exists to :
o  provide D-BUS control of the ISC dhclient software,
o  store DHCP configuration parameters (options) persistently
o  providing access to DHCP options over D-BUS
o  notify applications of changes to DHCP IP interface configuration
endef

BUILD_SCRIPTS = custom
INSTALL_SCRIPTS = custom

include ../category.mk

dbus_includes=`pkg-config dbus-1 --cflags`
dbus_libs=`pkg-config dbus-1 --libs`

build-custom:
	DBUS_INCLUDES=$(dbus_includes) DBUS_LIBS=$(dbus_libs) CC="$(CC)" $(MAKE) -C $(WORKSRC);
	$(MAKECOOKIE)

install-custom:
	DESTDIR=$(prefix) $(MAKE) -C $(WORKSRC) install;
	$(MAKECOOKIE)

uninstall:
	rm -f $(sbindir)/dhcdbd
	rm -f $(sysconfdir)/dbus-1/system.d/dhcdbd.conf
	rm -f $(sharedstatedir)/dbus-1/services/dhcdbd.service
	rm -rf cookies/main.d/install*
