-SECTION:=base
-CATEGORY:=Network
-DEFAULT:=y
-TITLE:=A lightweight DNS and DHCP server
-DESCRIPTION:=A lightweight DNS and DHCP server. It is intended to provide \\\
-coupled DNS and DHCP service to a LAN.
-URL:=http://www.thekelleys.org.uk/dnsmasq/
+ SECTION:=net
+ CATEGORY:=Base system
+ TITLE:=A lightweight DNS and DHCP server
+ URL:=http://www.thekelleys.org.uk/dnsmasq/
+endef
+
+define Package/dnsmasq/description
+ It is intended to provide coupled DNS and DHCP service to a LAN.
+endef
+
+define Package/dnsmasq/conffiles
+/etc/config/dhcp
+/etc/dnsmasq.conf
+endef
+
+TARGET_CFLAGS += -ffunction-sections -fdata-sections
+
+define Build/Compile
+ $(MAKE) -C $(PKG_BUILD_DIR) \
+ $(TARGET_CONFIGURE_OPTS) \
+ CFLAGS="$(TARGET_CFLAGS)" \
+ BINDIR="/usr/sbin" MANDIR="/usr/man" \
+ AWK="awk" \
+ LDFLAGS="-Wl,--gc-sections" \
+ all