[packages] Use default templates instead of custom reimplementations where applicable
[packages] Use default templates instead of custom reimplementations where applicable


git-svn-id: svn://svn.openwrt.org/openwrt/packages@19705 3c298f89-4303-0410-b956-a3cf2f4a3e73

--- a/Xorg/lib/atk/Makefile
+++ b/Xorg/lib/atk/Makefile
@@ -1,5 +1,5 @@
-# 
-# Copyright (C) 2006 OpenWrt.org
+#
+# Copyright (C) 2006-2010 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -10,16 +10,20 @@
 
 PKG_NAME:=atk
 PKG_VERSION:=1.22.0
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=@GNOME/$(PKG_NAME)/1.22/
 PKG_MD5SUM:=06a2b39a22d5ca35c47435da6b9643ac
+
 PKG_FIXUP:=libtool
+PKG_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
-EXTRA_LDFLAGS:=-L$(STAGING_DIR)/usr/lib/libiconv/lib/ -L$(STAGING_DIR)/usr/lib/libintl/lib/
+TARGET_LDFLAGS += \
+	-L$(STAGING_DIR)/usr/lib/libiconv/lib/ \
+	-L$(STAGING_DIR)/usr/lib/libintl/lib/ \
 
 define Package/atk
   SECTION:=xorg-libs
@@ -27,11 +31,6 @@
   SUBMENU:=libraries
   TITLE:=Accesibility library for gtk+ apps
   DEPENDS:=+glib2
-endef
-
-
-define Build/Compile
-	$(MAKE) -C $(PKG_BUILD_DIR) all install DESTDIR=$(PKG_INSTALL_DIR)
 endef
 
 define Build/InstallDev

--- a/Xorg/lib/tslib/Makefile
+++ b/Xorg/lib/tslib/Makefile
@@ -1,5 +1,5 @@
-# 
-# Copyright (C) 2006 OpenWrt.org
+#
+# Copyright (C) 2006-2010 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -14,7 +14,8 @@
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=http://download.berlios.de/tslib/
 
-PKG_FIXUP = libtool
+PKG_INSTALL:=1
+PKG_FIXUP:=libtool
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -31,7 +32,7 @@
 	Tslib is an abstraction layer for touchscreen panel events,
 	as well as a filter stack for the manipulation of those events.
 	It was created by Russell King, of arm.linux.org.uk.
-	Examples of implemented filters include jitter smoothing and the calibration transform. 
+	Examples of implemented filters include jitter smoothing and the calibration transform.
 endef
 
 ifeq ($(CONFIG_TARGET_om_gta02),y)
@@ -41,10 +42,6 @@
 define Build/Configure
 	(cd $(PKG_BUILD_DIR); ./autogen.sh );
 	$(call Build/Configure/Default, --enable-malloc0returnsnull)
-endef
-
-define Build/Compile
-	$(MAKE) -C $(PKG_BUILD_DIR) DESTDIR="$(PKG_INSTALL_DIR)" all install
 endef
 
 define Build/InstallDev

--- a/Xorg/wm/matchbox-window-manager/Makefile
+++ b/Xorg/wm/matchbox-window-manager/Makefile
@@ -14,7 +14,9 @@
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=http://matchbox-project.org/sources/$(PKG_NAME)/$(PKG_VERSION)
+
 PKG_FIXUP:=libtool
+PKG_INSTALL:=1
 
 TARGET_LDFLAGS+= \
 	-Wl,-rpath-link=$(STAGING_DIR)/usr/lib \
@@ -37,7 +39,7 @@
 		LIBMB_LIBS="$(TARGET_LDFLAGS) -lfontconfig -lXrender \
 		-lz -lexpat -lfreetype -lXft -lmb -lX11 -lXext -lXau -lXdmcp \
 		-lpng12" \
-		all install 
+		all
 endef
 
 define Package/matchbox-window-manager/install
@@ -50,7 +52,7 @@
 	$(INSTALL_BIN) \
 		$(PKG_INSTALL_DIR)/usr/bin/* \
 		$(1)/usr/bin/
-	
+
 	$(INSTALL_DIR) $(1)/usr/share/{matchbox,themes}
 	$(INSTALL_DATA) \
 		$(PKG_INSTALL_DIR)/usr/share/matchbox/* \

--- a/admin/zabbix/Makefile
+++ b/admin/zabbix/Makefile
@@ -16,6 +16,7 @@
 PKG_SOURCE_URL:=@SF/zabbix
 
 PKG_BUILD_DEPENDS:=libsqlite3
+PKG_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -63,12 +64,6 @@
 	$(call Build/Configure/Default, \
 		$(PKG_CONFIGURE_OPTIONS) \
 	)
-endef
-
-define Build/Compile
-	$(MAKE) -C $(PKG_BUILD_DIR) \
-		DESTDIR="$(PKG_INSTALL_DIR)" \
-		all install
 endef
 
 define Package/zabbix-agent/conffiles

--- a/lang/egenix-mx/Makefile
+++ b/lang/egenix-mx/Makefile
@@ -34,6 +34,8 @@
  This package contains a set of base packages from Egenix required by other 
  python packages.
 endef
+
+TARGET_CFLAGS += $(FPIC)
 
 define Build/Compile
 	$(if $(Build/Compile/PyMod),,@echo Python packaging code not found.; false)

--- a/lang/perl/Makefile
+++ b/lang/perl/Makefile
@@ -60,7 +60,7 @@
 define Build/microperl/Compile
 	$(MAKE) -C $(PKG_BUILD_DIR) -f Makefile.micro \
 		CC="$(TARGET_CC)" OPTIMIZE="$(TARGET_CFLAGS)"
-	mkdir -p $(PKG_INSTALL_DIR)/usr/bin/
+	$(INSTALL_DIR) $(PKG_INSTALL_DIR)/usr/bin/
 	$(CP) $(PKG_BUILD_DIR)/microperl $(PKG_INSTALL_DIR)/usr/bin/
 endef
 

--- a/lang/pygtk/Makefile
+++ b/lang/pygtk/Makefile
@@ -19,11 +19,11 @@
 include $(INCLUDE_DIR)/package.mk
 -include $(if $(DUMP),,$(STAGING_DIR)/mk/python-package.mk)
 
-EXTRA_CFLAGS+= \
+TARGET_CFLAGS+= \
 	-I$(STAGING_DIR)/usr/lib/libintl/include/ \
 	-I$(STAGING_DIR)/usr/lib/libiconv/include/
 
-EXTRA_LDFLAGS+= \
+TARGET_LDFLAGS+= \
 	-L$(STAGING_DIR)/usr/lib/libintl/lib \
 	-L$(STAGING_DIR)/usr/lib/libiconv/lib
 

--- a/lang/pygtk/patches/010-dont-override-python-include-dir.patch
+++ /dev/null
@@ -1,25 +1,1 @@
-diff -urN pygtk-2.12.1.orig/configure pygtk-2.12.1/configure
---- pygtk-2.12.1.orig/configure	2008-09-30 17:05:56.000000000 +0200
-+++ pygtk-2.12.1/configure	2008-09-30 17:06:38.000000000 +0200
-@@ -10399,8 +10399,6 @@
- 
- { echo "$as_me:$LINENO: checking for PySignal_SetWakeupFd in Python.h" >&5
- echo $ECHO_N "checking for PySignal_SetWakeupFd in Python.h... $ECHO_C" >&6; }
--py_prefix=`$PYTHON -c "import sys; print sys.prefix"`
--PYTHON_INCLUDES="-I${py_prefix}/include/python${PYTHON_VERSION}"
- old_CPPFLAGS=$CPPFLAGS
- CPPFLAGS="-Wall -Werror $PYTHON_INCLUDES"
- cat >conftest.$ac_ext <<_ACEOF
-diff -urN pygtk-2.12.1.orig/configure.in pygtk-2.12.1/configure.in
---- pygtk-2.12.1.orig/configure.in	2008-09-30 17:05:56.000000000 +0200
-+++ pygtk-2.12.1/configure.in	2008-09-30 17:06:24.000000000 +0200
-@@ -78,8 +78,6 @@
- AM_CHECK_PYTHON_HEADERS(,[AC_MSG_ERROR(could not find Python headers)])
- 
- AC_MSG_CHECKING([for PySignal_SetWakeupFd in Python.h])
--py_prefix=`$PYTHON -c "import sys; print sys.prefix"`
--PYTHON_INCLUDES="-I${py_prefix}/include/python${PYTHON_VERSION}"
- old_CPPFLAGS=$CPPFLAGS
- CPPFLAGS="-Wall -Werror $PYTHON_INCLUDES"
- AC_TRY_COMPILE([#include <Python.h>],
 

--- a/libs/aalib/Makefile
+++ b/libs/aalib/Makefile
@@ -16,6 +16,7 @@
 PKG_MD5SUM:=790434e0f2005fc95559ab3eab42e746
 
 PKG_FIXUP:=libtool
+PKG_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -24,20 +25,17 @@
   CATEGORY:=Libraries
   TITLE:=Ascii-Art rendering library
   URL:=http://aa-project.sourceforge.net/
-  DEPENDS:= +libncurses
+  DEPENDS:=+libncurses
 endef
 
-CONFIGURE_ARGS+= \
-	--enable-shared \
-	--enable-static \
-	--without-x \
-	--without-x11-driver \
-	--without-slang-driver \
-
-define Build/Compile
-	$(MAKE) -C $(PKG_BUILD_DIR) all \
-		DESTDIR="$(PKG_INSTALL_DIR)" \
-		all install
+define Build/Configure
+	$(call Build/Configure/Default, \
+		--enable-shared \
+		--enable-static \
+		--without-x \
+		--without-x11-driver \
+		--without-slang-driver \
+	)
 endef
 
 define Build/InstallDev

--- a/libs/apr/Makefile
+++ b/libs/apr/Makefile
@@ -16,6 +16,7 @@
 PKG_MD5SUM:=7138ac64d4458eeeaa9b9aefa4e6e51b
 
 PKG_FIXUP:=libtool
+PKG_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -40,10 +41,6 @@
 	apr_cv_mutex_robust_shared=no \
 	apr_cv_tcp_nodelay_with_cork=yes \
 	LDFLAGS="$$$$LDFLAGS -lpthread" \
-
-define Build/Compile
-	$(MAKE) -C $(PKG_BUILD_DIR) DESTDIR="$(PKG_INSTALL_DIR)" all install
-endef
 
 define Build/InstallDev
 	$(INSTALL_DIR) $(1)/usr/bin $(1)/usr/include/apr-1 $(1)/usr/lib $(1)/usr/lib/pkgconfig $(1)/usr/share/build-1

--- a/libs/argtable/Makefile
+++ b/libs/argtable/Makefile
@@ -53,12 +53,6 @@
 	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libargtable2.{a,so*} $(1)/usr/lib/
 endef
 
-define Build/UninstallDev
-	rm -rf \
-	$(STAGING_DIR)/usr/include/argtable2.h \
-	$(STAGING_DIR)/usr/lib/libargtable2.{a,so*}
-endef
-
 define Package/argtable/install
 	$(INSTALL_DIR) $(1)/usr/lib
 	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libargtable2.so.* $(1)/usr/lib/

--- a/libs/avahi/Makefile
+++ b/libs/avahi/Makefile
@@ -17,7 +17,8 @@
 
 PKG_BUILD_DEPENDS:=libexpat libdaemon libgdbm intltool/host
 
-PKG_FIXUP = libtool
+PKG_FIXUP:=libtool
+PKG_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -42,7 +43,7 @@
   $(call Package/avahi/Default)
   SECTION:=libs
   CATEGORY:=Libraries
-  DEPENDS:=+libdaemon +libpthread
+  DEPENDS:=+libdaemon +libpthread +libgdbm
   TITLE+= (library)
 endef
 
@@ -150,12 +151,6 @@
 	$(call Build/Configure/Default)
 endef
 
-define Build/Compile
-	$(MAKE) -C $(PKG_BUILD_DIR) \
-		DESTDIR="$(PKG_INSTALL_DIR)" \
-		all install
-endef
-
 define Build/InstallDev
 	$(INSTALL_DIR) $(1)/usr/include
 	$(CP) $(PKG_INSTALL_DIR)/usr/include/avahi-{common,core} $(1)/usr/include/

--- a/libs/bluez-libs/Makefile
+++ b/libs/bluez-libs/Makefile
@@ -1,5 +1,5 @@
-# 
-# Copyright (C) 2006 OpenWrt.org
+#
+# Copyright (C) 2006-2010 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -9,11 +9,13 @@
 
 PKG_NAME:=bluez-libs
 PKG_VERSION:=3.36
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://bluez.sourceforge.net/download
 PKG_MD5SUM:=8c2ca546c0e7bb73dbd0e906fce7f6b1
+
+PKG_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -29,12 +31,6 @@
 		--enable-static \
 
 TARGET_CFLAGS += $(FPIC)
-
-define Build/Compile
-	$(MAKE) -C $(PKG_BUILD_DIR) \
-		DESTDIR="$(PKG_INSTALL_DIR)" \
-		all install
-endef
 
 define Build/InstallDev
 	$(INSTALL_DIR) $(1)/usr/include/bluetooth

--- a/libs/classpath/Makefile
+++ b/libs/classpath/Makefile
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2006-2009 OpenWrt.org
+# Copyright (C) 2006-2010 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -9,11 +9,13 @@
 
 PKG_NAME:=classpath
 PKG_VERSION:=0.98
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=@GNU/classpath
 PKG_MD5SUM:=90c6571b8b0309e372faa0f9f6255ea9
+
+PKG_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -25,23 +27,20 @@
   MAINTAINER:=Roberto Riggio (roberto.riggio@create-net.org)
 endef
 
-define Package/classpath/Description 
+define Package/classpath/Description
 	GNU Classpath, Essential Libraries for Java, is a GNU project 
 	to create free core class libraries for use with virtual 
 	machines and compilers for the java programming language.
-endef 
+endef
 
-CONFIGURE_ARGS+= \
-	--with-javac \
-	--enable-jni \
-	--disable-gtk-peer \
-	--disable-gconf-peer \
-	--disable-plugin \
-
-define Build/Compile	
-	$(MAKE) -C $(PKG_BUILD_DIR) DESTDIR="$(PKG_INSTALL_DIR)" \
-		CPPFLAGS="$(TARGET_CPPFLAGS)" \
-		all install
+define Build/Configure
+	$(call Build/Configure/Default, \
+		--with-javac \
+		--enable-jni \
+		--disable-gtk-peer \
+		--disable-gconf-peer \
+		--disable-plugin \
+	)
 endef
 
 define Package/classpath/install

--- a/libs/clinkc/Makefile
+++ b/libs/clinkc/Makefile
@@ -18,6 +18,7 @@
 PKG_BUILD_DIR:=$(BUILD_DIR)/CyberLinkC
 
 PKG_BUILD_DEPENDS:=libexpat
+PKG_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -39,9 +40,7 @@
 
 define Build/Compile
 	chmod +x $(PKG_BUILD_DIR)/config/install-sh
-	$(MAKE) -C $(PKG_BUILD_DIR) \
-		DESTDIR="$(PKG_INSTALL_DIR)" \
-		all install
+	$(call Build/Compile/Default)
 endef
 
 define Build/InstallDev

--- a/libs/db47/Makefile
+++ b/libs/db47/Makefile
@@ -73,8 +73,6 @@
 TARGET_CFLAGS += $(FPIC)
 
 define Build/Compile
-	rm -rf $(PKG_INSTALL_DIR)
-	mkdir -p $(PKG_INSTALL_DIR)
 	$(MAKE) -C $(PKG_BUILD_DIR)/build_unix \
 		DESTDIR="$(PKG_INSTALL_DIR)" install
 endef

--- a/libs/eventlog/Makefile
+++ b/libs/eventlog/Makefile
@@ -14,6 +14,8 @@
 PKG_SOURCE_URL:=http://www.balabit.com/downloads/files/eventlog/0.2/
 PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).tar.gz
 
+PKG_INSTALL:=1
+
 include $(INCLUDE_DIR)/package.mk
 
 define Package/libeventlog
@@ -26,12 +28,6 @@
   A new API to format and send structured log messages. It supports multiple message
   representations (plain, XML attributes and XML tags) and multiple output methods
   (local syslogd).
-endef
-
-define Build/Compile
-	$(MAKE) -C $(PKG_BUILD_DIR) \
-		DESTDIR="$(PKG_INSTALL_DIR)" \
-		all install
 endef
 
 define Build/InstallDev

--- a/libs/faad2/Makefile
+++ b/libs/faad2/Makefile
@@ -15,9 +15,12 @@
 PKG_SOURCE_URL:=@SF/faac
 PKG_MD5SUM:=4c332fa23febc0e4648064685a3d4332
 
-PKG_FIXUP = libtool
+PKG_FIXUP:=libtool
+PKG_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
+
+TARGET_CFLAGS += $(FPIC)
 
 define Package/faad2/Default
   URL:=http://www.audiocoding.com/faad2.html
@@ -71,12 +74,6 @@
 	)
 endef
 
-TARGET_CFLAGS += $(FPIC)
-
-MAKE_FLAGS += \
-	DESTDIR="$(PKG_INSTALL_DIR)" \
-	all install \
-
 define Build/InstallDev
 	$(INSTALL_DIR) $(1)/usr/include
 	$(CP) $(PKG_INSTALL_DIR)/usr/include/*.h $(1)/usr/include

--- a/libs/fcgi/Makefile
+++ b/libs/fcgi/Makefile
@@ -16,6 +16,7 @@
 PKG_MD5SUM:=d15060a813b91383a9f3c66faf84867e
 
 PKG_FIXUP:=libtool-ucxx
+PKG_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -44,10 +45,6 @@
 	CXXFLAGS="$$$$CXXFLAGS -fno-builtin -fno-rtti -nostdinc++"  \
 	LIBS="-nodefaultlibs -luClibc++ -lm" \
 
-define Build/Compile
-	$(MAKE) -C $(PKG_BUILD_DIR) DESTDIR="$(PKG_INSTALL_DIR)" all install
-endef
-
 define Build/InstallDev
 	$(INSTALL_DIR) $(1)/usr/include
 	$(CP) $(PKG_INSTALL_DIR)/usr/include/fastcgi.h $(1)/usr/include/

--- a/libs/file/Makefile
+++ b/libs/file/Makefile
@@ -1,4 +1,4 @@
-# 
+#
 # Copyright (C) 2007 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
@@ -14,6 +14,8 @@
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=ftp://ftp.astron.com/pub/file/
 PKG_MD5SUM:=74cd5466416136da30a4e69f74dbc7a0
+
+PKG_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -40,22 +42,22 @@
  that succeeds causes the file type to be printed.
 
  Starting with version 4, the file command is not much more than
- a wrapper around the "magic" library. 
+ a wrapper around the "magic" library.
 endef
+
+MAKE_PATH:=src
 
 TARGET_CFLAGS += $(FPIC)
 
-CONFIGURE_ARGS += \
-	--enable-shared \
-	--enable-static \
-	--disable-rpath \
-	--without-libiconv-prefix \
-	--without-libintl-prefix \
-
-MAKE_FLAGS += \
-	-C $(PKG_BUILD_DIR)/src \
-	DESTDIR="$(PKG_INSTALL_DIR)" \
-	all install \
+define Build/Configure
+	$(call Build/Configure/Default, \
+		--enable-shared \
+		--enable-static \
+		--disable-rpath \
+		--without-libiconv-prefix \
+		--without-libintl-prefix \
+	)
+endef
 
 define Build/Prepare
 	$(call Build/Prepare/Default)

--- a/libs/gd/Makefile
+++ b/libs/gd/Makefile
@@ -15,7 +15,8 @@
 PKG_SOURCE_URL:=http://www.libgd.org/releases
 PKG_MD5SUM:=6c6c3dbb7bf079e0bb5fbbfd3bb8a71c
 
-PKG_FIXUP = libtool
+PKG_FIXUP:=libtool
+PKG_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -53,12 +54,6 @@
 	$(call Build/Configure/Default)
 endef
 
-define Build/Compile
-	$(MAKE) -C $(PKG_BUILD_DIR) \
-		DESTDIR="$(PKG_INSTALL_DIR)" \
-		all install
-endef
-
 define Build/InstallDev
 	$(INSTALL_DIR) $(1)/usr/bin
 	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/gdlib-config $(1)/usr/bin/

--- a/libs/glib/Makefile
+++ b/libs/glib/Makefile
@@ -18,7 +18,8 @@
 	http://www.mirrorservice.org/sites/ftp.gimp.org/pub/gtk/v1.2/
 PKG_MD5SUM:=6fe30dad87c77b91b632def29dd69ef9
 
-PKG_FIXUP = libtool
+PKG_FIXUP:=libtool
+PKG_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -36,6 +37,7 @@
 endef
 
 TARGET_CFLAGS += $(FPIC)
+TARGET_LDFLAGS += -L$(TOOLCHAIN_DIR)/lib
 
 CONFIGURE_ARGS += \
 	--enable-shared \
@@ -57,11 +59,6 @@
 	glib_cv_sizeof_gmutex=24 \
 	glib_cv_byte_contents_gmutex="0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0" \
 
-TARGET_LDFLAGS += -L$(TOOLCHAIN_DIR)/lib
-define Build/Compile
-	$(MAKE) -C $(PKG_BUILD_DIR) DESTDIR="$(PKG_INSTALL_DIR)" all install
-endef
-
 define Build/InstallDev
 	$(INSTALL_DIR) $(1) $(2)/bin
 	$(CP) $(PKG_INSTALL_DIR)/* $(1)/

--- a/libs/gsl/Makefile
+++ b/libs/gsl/Makefile
@@ -1,4 +1,4 @@
-# 
+#
 # Copyright (C) 2008 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
@@ -16,6 +16,7 @@
 PKG_MD5SUM:=81dca4362ae8d2aa1547b7d010881e43
 
 PKG_FIXUP:=libtool
+PKG_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -35,15 +36,6 @@
 
 TARGET_CFLAGS += $(FPIC)
 
-define Build/Compile
-	rm -rf $(PKG_INSTALL_DIR)
-	mkdir -p $(PKG_INSTALL_DIR)
-	$(MAKE) -C $(PKG_BUILD_DIR) \
-		$(TARGET_CONFIGURE_OPTS) \
-		DESTDIR="$(PKG_INSTALL_DIR)" \
-		all install
-endef
-
 define Package/libgsl/install
 	$(INSTALL_DIR) $(1)/usr/lib
 	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libgsl.so* $(1)/usr/lib/

--- a/libs/gsm/Makefile
+++ b/libs/gsm/Makefile
@@ -63,8 +63,6 @@
 TARGET_CFLAGS += $(FPIC)
 
 define Build/Compile
-	rm -rf $(PKG_INSTALL_DIR)
-	mkdir -p $(PKG_INSTALL_DIR)
 	$(MAKE) -C $(PKG_BUILD_DIR) \
 		$(TARGET_CONFIGURE_OPTS) \
 		LD="$(TARGET_CC)" \

--- a/libs/howl/Makefile
+++ b/libs/howl/Makefile
@@ -1,5 +1,5 @@
-# 
-# Copyright (C) 2006 OpenWrt.org
+#
+# Copyright (C) 2006-2010 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -9,13 +9,17 @@
 
 PKG_NAME:=howl
 PKG_VERSION:=1.0.0
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://www.porchdogsoft.com/download/
 PKG_MD5SUM:=c389d3ffba0e69a179de2ec650f1fdcc
 
+PKG_INSTALL:=1
+
 include $(INCLUDE_DIR)/package.mk
+
+TARGET_CFLAGS += $(FPIC)
 
 define Package/howl/Default
   SECTION:=net
@@ -89,14 +93,6 @@
 	);
 endef
 
-TARGET_CFLAGS += $(FPIC)
-
-define Build/Compile
-	$(MAKE) -C $(PKG_BUILD_DIR) \
-		DESTDIR="$(PKG_INSTALL_DIR)" \
-		all install
-endef
-
 define Build/InstallDev
 	$(INSTALL_DIR) $(1)/usr/include
 	$(CP) $(PKG_INSTALL_DIR)/usr/include/howl $(1)/usr/include/

--- a/libs/id3lib/Makefile
+++ b/libs/id3lib/Makefile
@@ -1,4 +1,4 @@
-# 
+#
 # Copyright (C) 2006 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
@@ -16,6 +16,7 @@
 PKG_MD5SUM:=19f27ddd2dda4b2d26a559a4f0f402a7
 
 PKG_FIXUP:=libtool-ucxx
+PKG_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -31,15 +32,11 @@
 
 CONFIGURE_ARGS += \
 	--enable-shared \
-	--enable-static \
+	--disable-static
 
-CONFIGURE_VARS += \
+#CONFIGURE_VARS += \
 	CXXFLAGS="$$$$CXXFLAGS -fno-builtin -fno-rtti"  \
 	LIBS="-nodefaultlibs -lz -luClibc++ -Wl,-Bstatic,-lstdc++,-Bdynamic -lm" \
-
-define Build/Compile
-	$(MAKE) -C $(PKG_BUILD_DIR) DESTDIR="$(PKG_INSTALL_DIR)" all install
-endef
 
 define Build/InstallDev
 	$(INSTALL_DIR) $(1)/usr/include

--- a/libs/iksemel/Makefile
+++ b/libs/iksemel/Makefile
@@ -15,7 +15,8 @@
 PKG_SOURCE_URL:=http://iksemel.googlecode.com/files/
 PKG_MD5SUM:=532e77181694f87ad5eb59435d11c1ca
 
-PKG_FIXUP = libtool
+PKG_FIXUP:=libtool
+PKG_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -35,17 +36,18 @@
 endef
 
 TARGET_CFLAGS += $(FPIC)
+TARGET_LDFLAGS += \
+	-Wl,-rpath-link,$(STAGING_DIR)/usr/lib \
+	-lgnutls -lgcrypt -lgpg-error
 
-CONFIGURE_ARGS += \
-	--enable-shared \
-	--enable-static \
-	--with-libgnutls-prefix="$(STAGING_DIR)/usr" \
-
-CONFIGURE_VARS += \
-	LIBS="$(TARGET_LDFLAGS) -Wl,-rpath-link,$(STAGING_DIR)/usr/lib -lgnutls -lgcrypt -lgpg-error" \
-
-define Build/Compile
-	$(MAKE) -C $(PKG_BUILD_DIR) DESTDIR="$(PKG_INSTALL_DIR)" all install
+define Build/Configure
+	$(call Build/Configure/Default, \
+		--enable-shared \
+		--enable-static \
+		--with-libgnutls-prefix="$(STAGING_DIR)/usr" \
+		, \
+		LIBS="$(TARGET_LDFLAGS)" \
+	)
 endef
 
 define Build/InstallDev

--- a/libs/jpeg/Makefile
+++ b/libs/jpeg/Makefile
@@ -62,8 +62,7 @@
 endef
 
 define Build/Compile
-	rm -rf $(PKG_INSTALL_DIR)
-	mkdir -p $(PKG_INSTALL_DIR)/usr/{include,lib,bin,man/man1}
+	$(INSTALL_DIR) $(PKG_INSTALL_DIR)/usr/{include,lib,bin,man/man1}
 	$(MAKE) -C $(PKG_BUILD_DIR) \
 		LIBTOOL="./libtool --tag=CC" \
 		prefix="$(PKG_INSTALL_DIR)/usr" \

--- a/libs/libaio/Makefile
+++ b/libs/libaio/Makefile
@@ -28,7 +28,7 @@
 define Build/Configure
 endef
 
-LIBAIO_CFLAGS:=-nostdlib -nostartfiles -I. $(TARGET_CFLAGS) $(TARGET_CPPFLAGS)
+LIBAIO_CFLAGS:=-nostdlib -nostartfiles -I. $(TARGET_CFLAGS) $(TARGET_CPPFLAGS) $(FPIC)
 
 TARGET_CFLAGS += $(FPIC)
 

--- a/libs/libao/Makefile
+++ b/libs/libao/Makefile
@@ -14,6 +14,8 @@
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://downloads.xiph.org/releases/ao/
 PKG_MD5SUM:=b92cba3cbcf1ee9bc221118a85d23dcd
+
+PKG_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -40,12 +42,6 @@
 
 TARGET_CFLAGS += $(FPIC)
 
-define Build/Compile
-	$(MAKE) -C $(PKG_BUILD_DIR) \
-		DESTDIR="$(PKG_INSTALL_DIR)" \
-		all install
-endef
-
 define Build/InstallDev
 	$(INSTALL_DIR) $(1)/usr/include
 	$(CP) $(PKG_INSTALL_DIR)/usr/include/ao $(1)/usr/include/

--- a/libs/libatomicops/Makefile
+++ b/libs/libatomicops/Makefile
@@ -1,5 +1,5 @@
-# 
-# Copyright (C) 2007 OpenWrt.org
+#
+# Copyright (C) 2007-2010 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -10,13 +10,15 @@
 PKG_NAME:=libatomicops
 PKG_VERSION:=1.2
 PKG_EXTRA_VERSION:=+cvs20080819.orig
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=libatomic-ops_$(PKG_VERSION)$(PKG_EXTRA_VERSION).tar.gz
 PKG_SOURCE_URL:=http://ftp.de.debian.org/debian/pool/main/liba/libatomic-ops/
 PKG_MD5SUM:=bf26c062f28796e3daaab586a38abec1
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/libatomic_ops-$(PKG_VERSION)
+
+PKG_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -44,12 +46,6 @@
 	--enable-shared \
 	--enable-static \
 
-define Build/Compile
-	$(MAKE) -C $(PKG_BUILD_DIR) \
-		DESTDIR="$(PKG_INSTALL_DIR)" \
-		all install
-endef
-
 define Build/InstallDev
 	$(INSTALL_DIR) $(1)/usr/include/
 	$(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/

--- a/libs/libcelt/Makefile
+++ b/libs/libcelt/Makefile
@@ -1,4 +1,4 @@
-# 
+#
 # Copyright (C) 2009 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
@@ -15,7 +15,9 @@
 PKG_BUILD_DIR:=$(BUILD_DIR)/celt-$(PKG_VERSION)
 PKG_SOURCE_URL:=http://downloads.us.xiph.org/releases/celt/
 PKG_MD5SUM:=0bb72abec367f4ef12551f79dda11b23
+
 PKG_BUILD_DEPENDS:=libogg
+PKG_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -30,24 +32,18 @@
  The CELT codec is an experimental audio codec for use in low-delay speech and audio communication.
 endef
 
-CONFIGURE_ARGS += \
-	--without-ogg
-
-define Build/Compile
-	$(MAKE) -C $(PKG_BUILD_DIR) \
-		$(TARGET_CONFIGURE_OPTS) \
-		CFLAGS="$(TARGET_CFLAGS)" \
-		LDFLAGS="$(TARGET_LDFLAGS)" \
-		DESTDIR="$(PKG_INSTALL_DIR)" \
-		all install
+define Build/Configure
+	$(call Build/Configure/Default, \
+		--without-ogg \
+	)
 endef
 
 define Build/InstallDev
 	$(INSTALL_DIR) $(1)/usr/include/celt
-	$(CP)   $(PKG_INSTALL_DIR)/usr/include/celt/celt*.h \
+	$(CP) $(PKG_INSTALL_DIR)/usr/include/celt/celt*.h \
 		$(1)/usr/include/celt
 	$(INSTALL_DIR) $(1)/usr/lib
-	$(CP)   $(PKG_INSTALL_DIR)/usr/lib/* \
+	$(CP) $(PKG_INSTALL_DIR)/usr/lib/* \
 		$(1)/usr/lib/
 endef
 

--- a/libs/libcrypto++/Makefile
+++ b/libs/libcrypto++/Makefile
@@ -13,6 +13,8 @@
 PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).orig.tar.gz
 PKG_SOURCE_URL:=http://ftp.de.debian.org/debian/pool/main/libc/libcrypto++/
 PKG_MD5SUM:=
+
+PKG_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -41,13 +43,6 @@
 	)
 endef
 
-define Build/Compile
-	$(MAKE) -C $(PKG_BUILD_DIR) \
-		DESTDIR="$(PKG_INSTALL_DIR)" \
-		all install
-endef
-
-
 define Build/InstallDev
 	$(INSTALL_DIR) $(1)/usr/include/crypto++
 	$(CP) $(PKG_INSTALL_DIR)/usr/include/crypto--/* $(1)/usr/include/crypto++/

--- a/libs/libdaemon/Makefile
+++ b/libs/libdaemon/Makefile
@@ -14,6 +14,8 @@
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://0pointer.de/lennart/projects/libdaemon/
 PKG_MD5SUM:=509dc27107c21bcd9fbf2f95f5669563
+
+PKG_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -47,12 +49,6 @@
 
 TARGET_CFLAGS += $(FPIC)
 
-define Build/Compile
-	$(MAKE) -C $(PKG_BUILD_DIR) \
-		DESTDIR="$(PKG_INSTALL_DIR)" \
-		all install
-endef
-
 define Build/InstallDev
 	$(INSTALL_DIR) $(1)/usr/include
 	$(CP) $(PKG_INSTALL_DIR)/usr/include/libdaemon $(1)/usr/include/

--- a/libs/libdbi/Makefile
+++ b/libs/libdbi/Makefile
@@ -1,5 +1,5 @@
-# 
-# Copyright (C) 2009 OpenWrt.org
+#
+# Copyright (C) 2009-2010 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -9,11 +9,13 @@
 
 PKG_NAME:=libdbi
 PKG_VERSION:=0.8.3
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=@SF/libdbi
 PKG_MD5SUM:=
+
+PKG_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -31,12 +33,6 @@
 	(v3.x) shared library, used by other programs.
 endef
 
-define Build/Compile
-	$(MAKE) -C $(PKG_BUILD_DIR) \
-		DESTDIR="$(PKG_INSTALL_DIR)" \
-		all install
-endef
-
 define Build/InstallDev
 	$(INSTALL_DIR) $(1)/usr/include
 	$(CP) $(PKG_INSTALL_DIR)/usr/include/dbi $(1)/usr/include/

--- a/libs/libdmapsharing/Makefile
+++ b/libs/libdmapsharing/Makefile
@@ -19,12 +19,14 @@
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/libdmapsharing-$(PKG_VERSION)
 
+PKG_INSTALL:=1
+
 include $(INCLUDE_DIR)/package.mk
 
-EXTRA_CFLAGS+= \
+TARGET_CFLAGS+= \
 	-I$(STAGING_DIR)/usr/lib/libintl/include
 
-EXTRA_LDFLAGS+= \
+TARGET_LDFLAGS+= \
 	-Wl,-rpath-link=$(STAGING_DIR)/usr/lib \
 	-L$(STAGING_DIR)/usr/lib/libintl/lib
 
@@ -38,12 +40,6 @@
 
 define Package/libdmapsharing/decription
   Libdmapsharing is a DMAP library implementation in C
-endef
-
-define Build/Compile
-	$(MAKE) -C $(PKG_BUILD_DIR) \
-		DESTDIR="$(PKG_INSTALL_DIR)" \
-		all install
 endef
 
 define Build/InstallDev

--- a/libs/libdnet/Makefile
+++ b/libs/libdnet/Makefile
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2006-2008 OpenWrt.org
+# Copyright (C) 2006-2010 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -9,12 +9,14 @@
 
 PKG_NAME:=libdnet
 PKG_VERSION:=1.11
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=@SF/$(PKG_NAME)
 PKG_MD5SUM:=04c394ed8e1e7fc455456e79e908916d
+
 PKG_FIXUP:=libtool
+PKG_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -58,10 +60,6 @@
 
 CONFIGURE_VARS += \
 	ac_cv_dnet_bsd_bpf=no
-
-MAKE_FLAGS += \
-	DESTDIR="$(PKG_INSTALL_DIR)" \
-	all install
 
 define Build/InstallDev
 	$(INSTALL_DIR) $(2)/bin

--- a/libs/libffi-sable/Makefile
+++ b/libs/libffi-sable/Makefile
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2006 OpenWrt.org
+# Copyright (C) 2006-2010 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -9,11 +9,13 @@
 
 PKG_NAME:=libffi-sable
 PKG_VERSION:=3325
-PKG_RELEASE:=3
+PKG_RELEASE:=4
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://sablevm.org/download/snapshot/2005-01-21/
 PKG_MD5SUM:=0c32eaaea0269c5fbe156fcd0be3e5bd
+
+PKG_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -42,20 +44,14 @@
 	)
 endef
 
-define Build/Compile	
-	$(MAKE) -C $(PKG_BUILD_DIR) \
-		DESTDIR="$(PKG_INSTALL_DIR)" \
-		all install
-endef
-
-define Build/InstallDev	
+define Build/InstallDev
 	$(INSTALL_DIR) $(1)/usr/include
 	$(CP) $(PKG_INSTALL_DIR)/usr/include/ffi{,target}.h $(1)/usr/include/
 	$(INSTALL_DIR) $(1)/usr/lib
 	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libffi.{a,so*} $(1)/usr/lib/
 endef
 
-define Package/libffi-sable/install	
+define Package/libffi-sable/install
 	$(INSTALL_DIR) $(1)/usr/lib
 	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libffi.so.* $(1)/usr/lib/
 endef

--- a/libs/libgcrypt/Makefile
+++ b/libs/libgcrypt/Makefile
@@ -16,6 +16,7 @@
 PKG_MD5SUM:=34105aa927e23c217741966496b97e67
 
 PKG_FIXUP:=libtool
+PKG_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -49,12 +50,6 @@
 	--enable-ciphers="arcfour des aes" \
 	--enable-pubkey-ciphers="rsa dsa" \
 
-define Build/Compile
-	$(MAKE) -C $(PKG_BUILD_DIR) \
-		DESTDIR="$(PKG_INSTALL_DIR)" \
-		all install
-endef
-
 define Build/InstallDev
 	$(INSTALL_DIR) $(1)/usr/bin $(2)/bin $(1)/usr/include $(1)/usr/lib $(1)/usr/share/aclocal
 	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/libgcrypt-config $(1)/usr/bin/

--- a/libs/libid3tag/Makefile
+++ b/libs/libid3tag/Makefile
@@ -1,5 +1,5 @@
-# 
-# Copyright (C) 2006 OpenWrt.org
+#
+# Copyright (C) 2006-2010 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -9,11 +9,13 @@
 
 PKG_NAME:=libid3tag
 PKG_VERSION:=0.15.1b
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=@SF/mad
 PKG_MD5SUM:=e5808ad997ba32c498803822078748c3
+
+PKG_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -41,12 +43,6 @@
 	)
 endef
 
-define Build/Compile
-	$(MAKE) -C $(PKG_BUILD_DIR) \
-		DESTDIR="$(PKG_INSTALL_DIR)" \
-		all install
-endef
-
 define Build/InstallDev
 	$(INSTALL_DIR) $(1)/usr/include
 	$(CP) $(PKG_INSTALL_DIR)/usr/include/id3tag.h $(1)/usr/include/

--- a/libs/libjson-c/Makefile
+++ b/libs/libjson-c/Makefile
@@ -15,7 +15,11 @@
 PKG_SOURCE_URL:=http://oss.metaparadigm.com/json-c/
 PKG_MD5SUM:=3a13d264528dcbaf3931b0cede24abae
 
+PKG_INSTALL:=1
+
 include $(INCLUDE_DIR)/package.mk
+
+TARGET_CFLAGS += $(FPIC)
 
 define Package/libjson
   SECTION:=libs
@@ -26,14 +30,6 @@
 
 define Package/libjson/description
  This package contains a library for javascript object notation backends.
-endef
-
-TARGET_CFLAGS += $(FPIC)
-
-define Build/Compile
-	$(MAKE) -C $(PKG_BUILD_DIR) \
-		DESTDIR="$(PKG_INSTALL_DIR)" \
-		all install
 endef
 
 define Build/InstallDev

--- a/libs/libmad/Makefile
+++ b/libs/libmad/Makefile
@@ -1,5 +1,5 @@
-# 
-# Copyright (C) 2006 OpenWrt.org
+#
+# Copyright (C) 2006-2010 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -9,12 +9,14 @@
 
 PKG_NAME:=libmad
 PKG_VERSION:=0.15.1b
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=@SF/mad \
 	ftp://ftp.mars.org/pub/mpeg/
 PKG_MD5SUM:=1be543bc30c56fb6bea1d7bf6a64e66c
+
+PKG_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -45,17 +47,15 @@
 
 TARGET_CFLAGS += $(FPIC)
 
-CONFIGURE_ARGS += \
-	--enable-shared \
-	--enable-static \
-	--enable-fpm="$(FPM)" \
-	--disable-debugging \
-	--enable-speed \
-
-MAKE_FLAGS += \
-	CFLAGS="$(TARGET_CFLAGS)" \
-	DESTDIR="$(PKG_INSTALL_DIR)" \
-	all install
+define Build/Configure
+	$(call Build/Configure/Default, \
+		--enable-shared \
+		--enable-static \
+		--enable-fpm="$(FPM)" \
+		--disable-debugging \
+		--enable-speed \
+	)
+endef
 
 define Build/InstallDev
 	$(INSTALL_DIR) $(1)/usr/include

--- a/libs/libmcrypt/Makefile
+++ b/libs/libmcrypt/Makefile
@@ -1,5 +1,5 @@
-# 
-# Copyright (C) 2006-2008 OpenWrt.org
+#
+# Copyright (C) 2006-2010 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -15,7 +15,11 @@
 PKG_SOURCE_URL:=@SF/mcrypt
 PKG_MD5SUM:=c4f491dd411a09e9de3b8702ea6f73eb
 
+PKG_INSTALL:=1
+
 include $(INCLUDE_DIR)/package.mk
+
+TARGET_CFLAGS += $(FPIC)
 
 define Package/libmcrypt
   SECTION:=libs
@@ -36,14 +40,6 @@
 	)
 endef
 
-TARGET_CFLAGS += $(FPIC)
-
-define Build/Compile
-	$(MAKE) -C $(PKG_BUILD_DIR) \
-		DESTDIR="$(PKG_INSTALL_DIR)" \
-		all install
-endef
-
 define Build/InstallDev
 	$(INSTALL_DIR) $(1)/usr/include
 	$(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/

--- a/libs/libmms/Makefile
+++ b/libs/libmms/Makefile
@@ -1,5 +1,5 @@
-# 
-# Copyright (C) 2009 OpenWrt.org
+#
+# Copyright (C) 2010 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -15,8 +15,8 @@
 PKG_SOURCE_URL:=http://code.launchpad.net/libmms/trunk/$(PKG_VERSION)/+download/
 PKG_MD5SUM:=cf83053ec891f14e73a04c84d9de08ee
 
-PKG_FIXUP:= libtool
-PKG_INSTALL:= 1
+PKG_FIXUP:=libtool
+PKG_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -42,12 +42,6 @@
 	$(call Build/Configure/Default)
 endef
 
-define Build/Compile
-	$(MAKE) -C $(PKG_BUILD_DIR) \
-		DESTDIR="$(PKG_INSTALL_DIR)" \
-		all install
-endef
-
 define Build/InstallDev
 	$(INSTALL_DIR) $(1)/usr/include
 	$(CP) $(PKG_INSTALL_DIR)/usr/include/libmms $(1)/usr/include/
@@ -56,14 +50,6 @@
 	$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig $(1)/usr/lib/
 endef
 
-define Build/UninstallDev
-	rm -rf \
-		$(STAGING_DIR)/usr/include/libmms \
-		$(STAGING_DIR)/usr/lib/libmms.{a,so*} \
-		$(STAGING_DIR)/usr/lib/pkgconfig/libmms.pc
-endef
-
-
 define Package/libmms/install
 	$(INSTALL_DIR) $(1)/usr/lib
 	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libmms.so.* $(1)/usr/lib/

--- a/libs/libmpd/Makefile
+++ b/libs/libmpd/Makefile
@@ -15,7 +15,12 @@
 PKG_SOURCE_URL:=http://download.sarine.nl/Programs/gmpc/$(PKG_VERSION)/
 PKG_MD5SUM:=a994f5f25a22c778926a3684c3e3050d
 
+PKG_INSTALL:=1
+
 include $(INCLUDE_DIR)/package.mk
+
+TARGET_CFLAGS += $(FPIC)
+
 
 define Package/libmpd
   SECTION:=libs
@@ -26,14 +31,6 @@
 
 define Package/libmpd/description
 It's wraps around libmpdclient and provides a higher level api.
-endef
-
-TARGET_CFLAGS += $(FPIC)
-
-define Build/Compile
-	$(MAKE) -C $(PKG_BUILD_DIR) \
-	DESTDIR="$(PKG_INSTALL_DIR)" \
-		all install
 endef
 
 define Build/InstallDev

--- a/libs/libnet-1.0.x/Makefile
+++ b/libs/libnet-1.0.x/Makefile
@@ -16,6 +16,7 @@
 PKG_MD5SUM:=ddf53f0f484184390e8c2a1bd0853667
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/Libnet-$(PKG_VERSION)
+PKG_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -55,14 +56,6 @@
 	$(call Build/Configure/Default)
 endef
 
-define Build/Compile
-	# pass CFLAGS again to override -O2 set by configure
-	$(MAKE) -C $(PKG_BUILD_DIR) \
-		CFLAGS="$(TARGET_CFLAGS)" \
-		DESTDIR="$(PKG_INSTALL_DIR)" \
-		all install
-endef
-
 define Build/InstallDev
 	$(INSTALL_DIR) $(1)/usr/lib/libnet-1.0.x/bin/
 	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/libnet-config $(1)/usr/lib/libnet-1.0.x/bin/

--- a/libs/libnet-1.1.x/Makefile
+++ b/libs/libnet-1.1.x/Makefile
@@ -16,6 +16,8 @@
 PKG_MD5SUM:=be845c41170d72c7db524f3411b50256
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/libnet
+
+PKG_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -55,14 +57,6 @@
 	$(call Build/Configure/Default)
 endef
 
-define Build/Compile
-	# pass CFLAGS again to override -O2 set by configure
-	$(MAKE) -C $(PKG_BUILD_DIR) \
-		CFLAGS="$(TARGET_CFLAGS)" \
-		DESTDIR="$(PKG_INSTALL_DIR)" \
-		all install
-endef
-
 define Build/InstallDev
 	$(INSTALL_DIR) $(1)/usr/lib/libnet-1.1.x/bin
 	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/libnet-config $(1)/usr/lib/libnet-1.1.x/bin/

--- a/libs/libnfnetlink/Makefile
+++ b/libs/libnfnetlink/Makefile
@@ -15,6 +15,8 @@
 PKG_SOURCE_URL:=ftp://ftp.netfilter.org/pub/libnfnetlink/ \
 	http://mirrors.evolva.ro/netfilter.org/libnfnetlink/
 PKG_MD5SUM:=016fdec8389242615024c529acc1adb8
+
+PKG_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -38,13 +40,6 @@
 CONFIGURE_ARGS += \
 	--enable-static \
 	--enable-shared
-
-define Build/Compile
-	$(MAKE) -C $(PKG_BUILD_DIR) \
-		CFLAGS="$(TARGET_CFLAGS)" \
-		DESTDIR="$(PKG_INSTALL_DIR)" \
-		all install
-endef
 
 define Build/InstallDev
 	$(INSTALL_DIR) $(1)/usr/include/libnfnetlink

--- a/libs/libosip2/Makefile
+++ b/libs/libosip2/Makefile
@@ -1,5 +1,5 @@
-# 
-# Copyright (C) 2006,2007 OpenWrt.org
+#
+# Copyright (C) 2006-2010 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -9,13 +9,14 @@
 
 PKG_NAME:=libosip2
 PKG_VERSION:=3.1.0
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=@GNU/osip
 PKG_MD5SUM:=7eb305608256ac2a7a27b66ce52627c8
 
-PKG_FIXUP = libtool
+PKG_FIXUP:=libtool
+PKG_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -33,17 +34,16 @@
 
 TARGET_CFLAGS += $(FPIC)
 
-CONFIGURE_ARGS+= \
-	--enable-shared \
-	--enable-static \
-	--disable-debug \
-	--disable-trace \
-	--enable-pthread \
-	--enable-semaphore \
-	--enable-ntimer \
-
-define Build/Compile
-	$(MAKE) -C $(PKG_BUILD_DIR) DESTDIR="$(PKG_INSTALL_DIR)" all install
+define Build/Configure
+	$(call Build/Configure/Default, \
+		--enable-shared \
+		--enable-static \
+		--disable-debug \
+		--disable-trace \
+		--enable-pthread \
+		--enable-semaphore \
+		--enable-ntimer \
+	)
 endef
 
 define Build/InstallDev

--- a/libs/libpar2/Makefile
+++ b/libs/libpar2/Makefile
@@ -16,6 +16,7 @@
 PKG_MD5SUM:=94c6df4e38efe08056ecde2a04e0be91
 
 PKG_FIXUP:=libtool
+PKG_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -33,14 +34,6 @@
 CONFIGURE_ARGS += \
 	--disable-static \
 	--disable-nls \
-
-define Build/Compile
-	$(MAKE) -C $(PKG_BUILD_DIR) \
-		$(TARGET_CONFIGURE_OPTS) \
-		CFLAGS="$(TARGET_CFLAGS)" \
-		DESTDIR="$(PKG_INSTALL_DIR)" \
-		all install
-endef
 
 define Build/InstallDev
 	$(INSTALL_DIR) $(1)/usr/include/libpar2

--- a/libs/libpng/Makefile
+++ b/libs/libpng/Makefile
@@ -15,10 +15,13 @@
 PKG_SOURCE_URL:=@SF/libpng
 PKG_MD5SUM:=2faa7f8d81e6a35beb991cb75edbf056
 
-PKG_FIXUP = libtool
+PKG_FIXUP:=libtool
+PKG_INSTALL:=1
 
 include $(INCLUDE_DIR)/host-build.mk
 include $(INCLUDE_DIR)/package.mk
+
+TARGET_CFLAGS += $(FPIC)
 
 define Package/libpng
   SECTION:=libs
@@ -34,18 +37,6 @@
 		--enable-static \
 		--with-zlib="$(STAGING_DIR)/usr" \
 	)
-endef
-
-TARGET_CFLAGS += $(FPIC)
-
-define Build/Compile
-	$(MAKE) -C $(PKG_BUILD_DIR) \
-		DESTDIR="$(PKG_INSTALL_DIR)" \
-		all install
-endef
-
-define Host/Install
-	$(MAKE) -C "$(HOST_BUILD_DIR)" install
 endef
 
 define Build/InstallDev

--- a/libs/librsync/Makefile
+++ b/libs/librsync/Makefile
@@ -1,5 +1,5 @@
-# 
-# Copyright (C) 2006-2009 OpenWrt.org
+#
+# Copyright (C) 2006-2010 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -9,13 +9,17 @@
 
 PKG_NAME:=librsync
 PKG_VERSION:=0.9.7
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=@SF/librsync
 PKG_MD5SUM:=24cdb6b78f45e0e83766903fd4f6bc84
 
+PKG_INSTALL:=1
+
 include $(INCLUDE_DIR)/package.mk
+
+TARGET_CFLAGS += $(FPIC)
 
 define Package/librsync
   SECTION:=libs
@@ -38,14 +42,6 @@
 	);
 endef
 
-TARGET_CFLAGS += $(FPIC)
-
-define Build/Compile
-	$(MAKE) -C $(PKG_BUILD_DIR) \
-		DESTDIR="$(PKG_INSTALL_DIR)" \
-		all install
-endef
-
 define Build/InstallDev
 	$(INSTALL_DIR) $(1)/usr/include
 	$(CP) $(PKG_INSTALL_DIR)/usr/include/librsync{,-config}.h $(1)/usr/include/

--- a/libs/libsamplerate/Makefile
+++ b/libs/libsamplerate/Makefile
@@ -16,6 +16,7 @@
 PKG_MD5SUM:=ad093e60ec44f0a60de8e29983ddbc0f
 
 PKG_FIXUP:=libtool
+PKG_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -37,12 +38,6 @@
 CONFIGURE_ARGS += \
 	--disable-fftw \
 
-define Build/Compile
-	$(MAKE) -C $(PKG_BUILD_DIR) \
-		DESTDIR="$(PKG_INSTALL_DIR)" \
-		all install
-endef
-
 define Build/InstallDev
 	$(INSTALL_DIR) $(1)
 	$(CP) $(PKG_INSTALL_DIR)/* $(1)/

--- a/libs/libshout/Makefile
+++ b/libs/libshout/Makefile
@@ -15,9 +15,12 @@
 PKG_SOURCE_URL:=http://downloads.us.xiph.org/releases/libshout/
 PKG_MD5SUM:=4f75fc9901c724b712c371c9a1e782d3
 
-PKG_FIXUP = libtool
+PKG_FIXUP:=libtool
+PKG_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
+
+TARGET_CFLAGS += $(FPIC)
 
 define Package/libshout
   SECTION:=libs
@@ -44,14 +47,6 @@
 	)
 endef
 
-TARGET_CFLAGS += $(FPIC)
-
-define Build/Compile
-	$(MAKE) -C $(PKG_BUILD_DIR) \
-		DESTDIR="$(PKG_INSTALL_DIR)" \
-		all install
-endef
-
 define Build/InstallDev
 	$(INSTALL_DIR) $(1)/usr/include/shout
 	$(CP) $(PKG_INSTALL_DIR)/usr/include/shout/shout.h $(1)/usr/include/shout

--- a/libs/libsndfile/Makefile
+++ b/libs/libsndfile/Makefile
@@ -1,5 +1,5 @@
-# 
-# Copyright (C) 2007-2009 OpenWrt.org
+#
+# Copyright (C) 2007-2010 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -9,13 +9,14 @@
 
 PKG_NAME:=libsndfile
 PKG_VERSION:=1.0.20
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://www.mega-nerd.com/libsndfile/
 PKG_MD5SUM:=e0553e12c7a467af44693e95e2eac668
 
 PKG_FIXUP:=libtool
+PKG_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -34,15 +35,13 @@
 
 TARGET_CFLAGS += $(FPIC)
 
-CONFIGURE_ARGS += \
-	--disable-alsa \
-	--disable-external-libs \
-	--disable-sqlite \
-
-define Build/Compile
-	$(MAKE) -C $(PKG_BUILD_DIR) \
-		DESTDIR="$(PKG_INSTALL_DIR)" \
-		all install
+define Build/Configure
+	$(call Build/Configure/Default, \
+		--disable-alsa \
+		--disable-external-libs \
+		--disable-sqlite \
+		--disable-shave \
+	)
 endef
 
 define Build/InstallDev

--- a/libs/libsynce/Makefile
+++ b/libs/libsynce/Makefile
@@ -1,4 +1,4 @@
-# 
+#
 # Copyright (C) 2008 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.

--- a/libs/libtasn1/Makefile
+++ b/libs/libtasn1/Makefile
@@ -19,7 +19,8 @@
 	http://josefsson.org/gnutls/releases/libtasn1/
 PKG_MD5SUM:=a733ecdfed3517910e627d24e050979f
 
-PKG_FIXUP = libtool
+PKG_FIXUP:=libtool
+PKG_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -41,10 +42,6 @@
 		--enable-shared \
 		--enable-static
 
-define Build/Compile
-	$(MAKE) -C $(PKG_BUILD_DIR) DESTDIR="$(PKG_INSTALL_DIR)" all install
-endef
-
 define Build/InstallDev
 	$(INSTALL_DIR) $(1)/usr/bin
 	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/libtasn1-config $(1)/usr/bin/

--- a/libs/libtorrent/Makefile
+++ b/libs/libtorrent/Makefile
@@ -10,7 +10,8 @@
 PKG_NAME:=libtorrent
 PKG_REV:=1130
 PKG_VERSION:=0.12.6_r$(PKG_REV)
-PKG_RELEASE:=1
+PKG_RELEASE:=2
+
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=svn://rakshasa.no/libtorrent/trunk/libtorrent

--- a/libs/libtwin/Makefile
+++ b/libs/libtwin/Makefile
@@ -59,10 +59,6 @@
 		$(1)/usr/lib/pkgconfig/
 endef
 
-define Build/UninstallDev
-	rm -rf $(1)/usr/include/libtwin
-endef
-
 define Package/libtwin/install
 	$(INSTALL_DIR) $(1)/usr/lib
 	$(INSTALL_BIN) \

--- a/libs/libvorbisidec/Makefile
+++ b/libs/libvorbisidec/Makefile
@@ -15,7 +15,8 @@
 PKG_SOURCE_URL:=http://ftp.de.debian.org/debian/pool/main/libv/libvorbisidec/
 PKG_MD5SUM:=bc617d4af1cd74b38d7c51451dd6eff0
 
-PKG_FIXUP = libtool
+PKG_FIXUP:=libtool
+PKG_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -43,12 +44,6 @@
 	)
 endef
 
-define Build/Compile
-	$(MAKE) -C $(PKG_BUILD_DIR) \
-		DESTDIR="$(PKG_INSTALL_DIR)" \
-		all install
-endef
-
 define Build/InstallDev
 	$(INSTALL_DIR) $(1)/usr/include
 	$(CP) $(PKG_INSTALL_DIR)/usr/include/tremor $(1)/usr/include/

--- a/libs/libyaml/Makefile
+++ b/libs/libyaml/Makefile
@@ -18,6 +18,8 @@
 PKG_FIXUP:=libtool
 
 include $(INCLUDE_DIR)/package.mk
+
+TARGET_CFLAGS += $(FPIC)
 
 define Package/libyaml
   SUBMENU:=Python

--- a/libs/mysql/Makefile
+++ b/libs/mysql/Makefile
@@ -68,8 +68,6 @@
 TARGET_CFLAGS += $(FPIC)
 
 define Build/Compile
-	rm -rf $(PKG_INSTALL_DIR)
-	mkdir -p $(PKG_INSTALL_DIR)
 	$(MAKE) -C "$(PKG_BUILD_DIR)" \
 		SUBDIRS="include" \
 		DESTDIR="$(PKG_INSTALL_DIR)" \

--- a/libs/popt/Makefile
+++ b/libs/popt/Makefile
@@ -15,7 +15,11 @@
 PKG_SOURCE_URL:=http://downloads.openwrt.org/sources/
 PKG_MD5SUM:=5988e7aeb0ae4dac8d83561265984cc9
 
+PKG_INSTALL:=1
+
 include $(INCLUDE_DIR)/package.mk
+
+TARGET_CFLAGS += $(FPIC)
 
 define Package/libpopt
   SECTION:=libs
@@ -29,14 +33,6 @@
 		--enable-shared \
 		--enable-static \
 	)
-endef
-
-TARGET_CFLAGS += $(FPIC)
-
-define Build/Compile
-	$(MAKE) -C $(PKG_BUILD_DIR) \
-		DESTDIR="$(PKG_INSTALL_DIR)" \
-		all install
 endef
 
 define Build/InstallDev

--- a/libs/rrdtool-1.0.x/Makefile
+++ b/libs/rrdtool-1.0.x/Makefile
@@ -99,8 +99,6 @@
 	shrext_cmds=".so"
 
 define Build/Compile
-	rm -rf $(PKG_INSTALL_DIR)
-	mkdir -p $(PKG_INSTALL_DIR)
 	$(MAKE) -C $(PKG_BUILD_DIR) \
 		DESTDIR="$(PKG_INSTALL_DIR)" \
 		shrext_cmds=".so" \

--- a/libs/sqlite2/Makefile
+++ b/libs/sqlite2/Makefile
@@ -1,5 +1,5 @@
-# 
-# Copyright (C) 2006-2009 OpenWrt.org
+#
+# Copyright (C) 2006-2010 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -18,8 +18,11 @@
 PKG_BUILD_DIR:=$(BUILD_DIR)/sqlite-$(PKG_VERSION)
 
 PKG_BUILD_DEPENDS:=libncurses libreadline
+PKG_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
+
+TARGET_CFLAGS += $(FPIC)
 
 define Package/sqlite2/Default
   SUBMENU:=database
@@ -35,7 +38,6 @@
 endef
 
 define Package/libsqlite2/description
-=
 	SQLite is a small C library that implements a self-contained, embeddable, 
 	zero-configuration SQL database engine.	
 	This package contains the SQLite (v2.x) shared library, used by other programs.
@@ -51,7 +53,6 @@
 endef
 
 define Package/sqlite2-cli/description
-=
 	SQLite is a small C library that implements a self-contained, embeddable, 
 	zero-configuration SQL database engine.	
 	This package contains a terminal-based front-end to the SQLite (v2.x) library 
@@ -72,14 +73,6 @@
 		config_TARGET_READLINE_LIBS="$(TARGET_LDFLAGS) -lreadline -lncurses" \
 		config_TARGET_TCL_INC="-DNO_TCL=1" \
 	)
-endef
-
-TARGET_CFLAGS += $(FPIC)
-
-define Build/Compile
-	$(MAKE) -C $(PKG_BUILD_DIR) \
-		DESTDIR="$(PKG_INSTALL_DIR)" \
-		all install
 endef
 
 define Build/InstallDev

--- a/libs/sqlite3/Makefile
+++ b/libs/sqlite3/Makefile
@@ -16,6 +16,7 @@
 PKG_MD5SUM:=4bb3e9ee5d25e88b8ff8533fbeb168aa
 
 PKG_BUILD_DEPENDS:=libncurses libreadline
+PKG_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -73,12 +74,6 @@
 	config_TARGET_READLINE_INC="$(TARGET_CPPFLAGS)" \
 	config_TARGET_READLINE_LIBS="$(TARGET_LDFLAGS) -lreadline -lncurses" \
 
-define Build/Compile
-	$(MAKE) -C $(PKG_BUILD_DIR) \
-		DESTDIR="$(PKG_INSTALL_DIR)" \
-		all install
-endef
-
 define Build/InstallDev
 	$(INSTALL_DIR) $(1)/usr/include
 	$(CP) $(PKG_INSTALL_DIR)/usr/include/sqlite3.h $(1)/usr/include/

--- a/libs/ustl/Makefile
+++ b/libs/ustl/Makefile
@@ -41,8 +41,6 @@
 TARGET_CFLAGS += $(FPIC)
 
 define Build/Compile
-	rm -rf $(PKG_INSTALL_DIR)
-	mkdir -p $(PKG_INSTALL_DIR)
 	$(MAKE) -C $(PKG_BUILD_DIR) \
 		CROSS="$(TARGET_CROSS)" \
 		OPTFLAGS="$(TARGET_CFLAGS)" \

--- a/libs/wxbase/Makefile
+++ b/libs/wxbase/Makefile
@@ -16,6 +16,8 @@
 PKG_MD5SUM:=88b867bc118a183af56efc67014bdf27
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/wxGTK-$(PKG_VERSION)
+
+PKG_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -113,12 +115,6 @@
   LIB_PFX:=
 endif
 
-define Build/Compile
-	$(MAKE) -C $(PKG_BUILD_DIR) \
-		DESTDIR="$(PKG_INSTALL_DIR)" \
-		all install
-endef
-
 define Build/InstallDev
 	$(INSTALL_DIR) $(1)/usr/bin $(1)/usr/include $(1)/usr/lib
 	$(CP) -L $(PKG_BUILD_DIR)/wx-config $(1)/usr/bin/

--- a/multimedia/gst-plugins-good/Makefile
+++ b/multimedia/gst-plugins-good/Makefile
@@ -82,7 +82,7 @@
 		--disable-sunaudio \
 		--without-x \
 	)
-	mkdir -p $(PKG_BUILD_DIR)/bin
+	$(INSTALL_DIR) $(PKG_BUILD_DIR)/bin
 	touch $(PKG_BUILD_DIR)/bin/gtkdoc-rebase
 	chmod +x $(PKG_BUILD_DIR)/bin/gtkdoc-rebase
 endef

--- a/multimedia/hasciicam/Makefile
+++ b/multimedia/hasciicam/Makefile
@@ -17,6 +17,8 @@
 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
 PKG_SOURCE_VERSION:=262f56eb307f9a0d4bee04d38e0adde7e4257d87
 
+PKG_INSTALL:=1
+
 include $(INCLUDE_DIR)/package.mk
 
 define Package/hasciicam
@@ -31,13 +33,7 @@
 CONFIGURE_VARS += \
 	LIBS="-lncurses" \
 
-define Build/Compile
-	$(MAKE) -C $(PKG_BUILD_DIR) \
-		DESTDIR="$(PKG_INSTALL_DIR)" \
-		all install
-endef
-
-define Package/hasciicam/install	
+define Package/hasciicam/install
 	$(INSTALL_DIR) $(1)/usr/bin
 	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/hasciicam $(1)/usr/bin/
 endef

--- a/multimedia/motion/Makefile
+++ b/multimedia/motion/Makefile
@@ -15,6 +15,8 @@
 PKG_SOURCE_URL:=http://www.lavrsen.dk/sources/motion-daily \
 		@SF/motion
 PKG_MD5SUM:=4e729f129d8f9b9abaed5121c3cd0037
+
+PKG_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -36,12 +38,6 @@
 	--without-mysql \
 	--without-pgsql \
 
-define Build/Compile
-	$(MAKE) -C $(PKG_BUILD_DIR) \
-		DESTDIR="$(PKG_INSTALL_DIR)" \
-		all install
-endef
-
 define Package/motion/install
 	$(INSTALL_DIR) $(1)/etc
 	$(CP) $(PKG_INSTALL_DIR)/etc/motion-dist.conf $(1)/etc/motion.conf

--- a/multimedia/peercast/Makefile
+++ b/multimedia/peercast/Makefile
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2006 OpenWrt.org
+# Copyright (C) 2006-2010 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -9,11 +9,13 @@
 
 PKG_NAME:=peercast
 PKG_VERSION:=0.1214
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://www.cti.ecp.fr/~beauxir5/peercast
 PKG_MD5SUM:=4e8449cde7135ad97f788e67e1bd64ee
+
+PKG_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -44,13 +46,7 @@
 	CXXFLAGS="$$$$CXXFLAGS -fno-builtin -fno-rtti -nostdinc++" \
 	LIBS="-nodefaultlibs -luClibc++ -lpthread" \
 
-define Build/Compile
-	$(MAKE) -C $(PKG_BUILD_DIR) \
-		DESTDIR="$(PKG_INSTALL_DIR)" \
-		all install
-endef
-
-define Package/peercast/install	
+define Package/peercast/install
 	$(INSTALL_DIR) $(1)/usr/sbin
 	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/peercast $(1)/usr/sbin/
 	$(INSTALL_DIR) $(1)/usr/share/peercast/html

--- a/net/aircrack-ng/Makefile
+++ b/net/aircrack-ng/Makefile
@@ -33,8 +33,6 @@
 endef
 
 define Build/Compile
-	rm -rf $(PKG_INSTALL_DIR)
-	mkdir -p $(PKG_INSTALL_DIR)
 	$(MAKE) -C $(PKG_BUILD_DIR) \
 		$(TARGET_CONFIGURE_OPTS) \
 		CFLAGS="$(TARGET_CFLAGS) -Wall -Iinclude/ $(TARGET_CPPFLAGS) -D_REVISION=0" \

--- a/net/aircrack-ptw/Makefile
+++ b/net/aircrack-ptw/Makefile
@@ -30,8 +30,6 @@
 endef
 
 define Build/Compile
-	rm -rf $(PKG_INSTALL_DIR)
-	mkdir -p $(PKG_INSTALL_DIR)
 	$(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_CPPFLAGS) \
 		$(TARGET_LDFLAGS) \
 		-lpcap -o $(PKG_BUILD_DIR)/aircrack-ptw \

--- a/net/amwall/Makefile
+++ b/net/amwall/Makefile
@@ -27,8 +27,6 @@
 endef
 
 define Build/Compile
-	rm -rf $(PKG_INSTALL_DIR)
-	mkdir -p $(PKG_INSTALL_DIR)
 	$(MAKE) -C $(PKG_BUILD_DIR) \
 		$(TARGET_CONFIGURE_OPTS) \
 		V= \

--- a/net/apache/Makefile
+++ b/net/apache/Makefile
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2007-2009 OpenWrt.org
+# Copyright (C) 2007-2010 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -9,7 +9,7 @@
 
 PKG_NAME:=apache
 PKG_VERSION:=2.2.14
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 PKG_SOURCE_NAME:=httpd
 
 PKG_SOURCE:=$(PKG_SOURCE_NAME)-$(PKG_VERSION).tar.bz2
@@ -18,6 +18,8 @@
 PKG_MD5SUM:=a5226203aaf97e5b941c41a71c112704
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_SOURCE_NAME)-$(PKG_VERSION)
+
+PKG_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -103,12 +105,6 @@
 	)
 endef
 
-define Build/Compile
-	$(MAKE) -C $(PKG_BUILD_DIR) \
-		DESTDIR="$(PKG_INSTALL_DIR)" \
-		all install
-endef
-
 define Build/InstallDev
 	rm -rf	$(PKG_INSTALL_DIR)/usr/man/ \
 		$(PKG_INSTALL_DIR)/usr/share/manual/

--- a/net/appweb/Makefile
+++ b/net/appweb/Makefile
@@ -49,8 +49,6 @@
 endef
 
 define Build/Prepare
-	rm -rf $(PKG_BUILD_DIR)
-	mkdir -p $(PKG_BUILD_DIR)
 	tar xzf "$(DL_DIR)/$(PKG_SOURCE)" --strip-components 1 -C "$(PKG_BUILD_DIR)"
 endef
 

--- a/net/arpd/Makefile
+++ b/net/arpd/Makefile
@@ -22,7 +22,7 @@
 define Package/arpd
   SECTION:=net
   CATEGORY:=Network
-  DEPENDS:=+libpcap +libdnet +libevent +librt
+  DEPENDS:=+libpcap +libdnet +libevent +librt @BROKEN
   TITLE:=A daemon to fake ARP replies
   URL:=http://niels.xtdnet.nl/honeyd/
 endef

--- a/net/bind/Makefile
+++ b/net/bind/Makefile
@@ -90,8 +90,6 @@
 		BUILD_CC="$(TARGET_CC)" \
 
 define Build/Compile
-	rm -rf $(PKG_INSTALL_DIR)
-	mkdir -p $(PKG_INSTALL_DIR)
 	$(MAKE) -C $(PKG_BUILD_DIR)/lib/dns \
 		BUILD_CC="$(HOSTCC)" \
 		CC="$(HOSTCC)" \

--- a/net/bitchx/Makefile
+++ b/net/bitchx/Makefile
@@ -31,8 +31,6 @@
 endef
 
 define Build/Compile
-	rm -rf $(PKG_INSTALL_DIR)
-	mkdir -p $(PKG_INSTALL_DIR)
 	$(MAKE) -C $(PKG_BUILD_DIR) \
 		CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" \
 		DESTDIR="$(PKG_INSTALL_DIR)" \

--- a/net/chillispot/Makefile
+++ b/net/chillispot/Makefile
@@ -1,5 +1,5 @@
-# 
-# Copyright (C) 2006-2009 OpenWrt.org
+#
+# Copyright (C) 2006-2010 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -9,12 +9,13 @@
 
 PKG_NAME:=chillispot
 PKG_VERSION:=1.1.0
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://www.chillispot.info/download
 PKG_MD5SUM:=9d2597756af3fa14d7331b4a3651fc9b
 
+PKG_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -43,12 +44,6 @@
 
 # uses GNU configure
 
-define Build/Compile
-	$(MAKE) -C $(PKG_BUILD_DIR) \
-		DESTDIR="$(PKG_INSTALL_DIR)" \
-		all install
-endef
-
 define Package/chillispot/install
 	$(INSTALL_DIR) $(1)/etc/init.d
 	$(INSTALL_BIN) ./files/$(PKG_NAME).init $(1)/etc/init.d/chilli

--- a/net/click/Makefile
+++ b/net/click/Makefile
@@ -76,8 +76,6 @@
 
 
 define Build/Compile
-	rm -rf $(PKG_INSTALL_DIR)
-	mkdir -p $(PKG_INSTALL_DIR)
 	$(CONF_OPTS) \
 	$(MAKE) -C $(PKG_BUILD_DIR) \
 		$(BUILDOPTS) \

--- a/net/cups/Makefile
+++ b/net/cups/Makefile
@@ -67,8 +67,6 @@
 endef
 
 define Build/Compile
-	rm -rf $(PKG_INSTALL_DIR)
-	mkdir -p $(PKG_INSTALL_DIR)
 	$(MAKE) -C $(PKG_BUILD_DIR) \
 		$(TARGET_CONFIGURE_OPTS) \
 		DSTROOT="$(PKG_INSTALL_DIR)" \

--- a/net/dansguardian/Makefile
+++ b/net/dansguardian/Makefile
@@ -14,6 +14,8 @@
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://dansguardian.org/downloads/2/Stable
 PKG_MD5SUM:=0987a1c9bfbdf398118386f10279611a
+
+PKG_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -46,12 +48,6 @@
 	)
 endef
 
-define Build/Compile
-	$(MAKE) -C $(PKG_BUILD_DIR) \
-		DESTDIR="$(PKG_INSTALL_DIR)" \
-		all install
-endef
-
 define Package/dansguardian/install
 	$(INSTALL_DIR) $(1)/usr/sbin
 	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/dansguardian $(1)/usr/sbin/

--- a/net/darkstat/Makefile
+++ b/net/darkstat/Makefile
@@ -39,7 +39,6 @@
 	--with-chroot-dir /var/empty
 
 define Build/Compile
-	mkdir -p $(PKG_INSTALL_DIR)
 	$(HOSTCC) $(PKG_BUILD_DIR)/static/c-ify.c \
 		-o $(PKG_BUILD_DIR)/c-ify
 	$(MAKE) -C $(PKG_BUILD_DIR) \

--- a/net/dhcpcd/Makefile
+++ b/net/dhcpcd/Makefile
@@ -15,6 +15,8 @@
 PKG_SOURCE_URL:=http://download.berlios.de/dhcpcd/
 PKG_MD5SUM:=e9100e53f64ca1f9fb0d392c3a623738
 
+PKG_INSTALL:=1
+
 include $(INCLUDE_DIR)/package.mk
 
 define Package/dhcpcd
@@ -29,14 +31,6 @@
 	IP address changes.
 endef
 
-define Build/Compile
-	$(MAKE) -C $(PKG_BUILD_DIR) \
-		DESTDIR="$(PKG_INSTALL_DIR)" \
-		CC="$(TARGET_CC)" \
-		CFLAGS="$(TARGET_CFLAGS)" \
-		all install
-endef
-
 define Package/dhcpcd/install
 	$(INSTALL_DIR) $(1)/sbin
 	$(CP) $(PKG_INSTALL_DIR)/sbin/* $(1)/sbin/

--- a/net/dircproxy/Makefile
+++ b/net/dircproxy/Makefile
@@ -15,6 +15,8 @@
 PKG_SOURCE_URL:=http://dircproxy.googlecode.com/files/
 PKG_MD5SUM:=4fe2e82619c7b575599bfb236adbd872
 
+PKG_INSTALL:=1
+
 include $(INCLUDE_DIR)/package.mk
 
 define Package/dircproxy
@@ -27,12 +29,6 @@
 
 # uses Build/Configure/Default
 
-define Build/Compile
-	$(MAKE) -C $(PKG_BUILD_DIR) \
-		DESTDIR="$(PKG_INSTALL_DIR)" \
-		all install
-endef
-
 define Package/dircproxy/install
 	$(INSTALL_DIR) $(1)/usr/bin
 	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/dircproxy{,-crypt} $(1)/usr/bin/

--- a/net/ekg/Makefile
+++ b/net/ekg/Makefile
@@ -1,5 +1,5 @@
-# 
-# Copyright (C) 2009 OpenWrt.org
+#
+# Copyright (C) 2009-2010 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -8,11 +8,13 @@
 
 PKG_NAME:=ekg
 PKG_VERSION:=1.7
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://ekg.chmurka.net/
 PKG_MD5SUM:=2aa92b56517fdf09d75519a105772b74
+
+PKG_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -39,12 +41,6 @@
 	CFLAGS="$$$$CFLAGS $(TARGET_CPPFLAGS)" \
 	CFLAGS_LIBGADU="$$$$CFLAGS $(TARGET_CPPFLAGS)" \
 
-define Build/Compile
-	$(MAKE) -C $(PKG_BUILD_DIR) \
-		DESTDIR="$(PKG_INSTALL_DIR)" \
-		all install
-endef
-
 define Package/ekg/install
 	$(INSTALL_DIR) $(1)/usr/bin
 	$(CP) $(PKG_INSTALL_DIR)/usr/bin/ekg $(1)/usr/bin/

--- a/net/faifa/Makefile
+++ b/net/faifa/Makefile
@@ -41,8 +41,6 @@
 endef
 
 define Build/Compile
-	rm -rf $(PKG_INSTALL_DIR)
-	mkdir -p $(PKG_INSTALL_DIR)
 	$(MAKE) -C $(PKG_BUILD_DIR) \
 		$(TARGET_CONFIGURE_OPTS) \
 		CFLAGS="$(TARGET_CFLAGS) -DSVN_REV=$(PKG_REV) $(TARGET_CPPFLAGS)" \

--- a/net/gpsd/Makefile
+++ b/net/gpsd/Makefile
@@ -16,8 +16,9 @@
 PKG_MD5SUM:=a23c728b8734c542d559c485857238d2
 
 PKG_FIXUP:=libtool-ucxx
+PKG_INSTALL:=1
 
-PKG_BUILD_DEPENDS=libncurses
+PKG_BUILD_DEPENDS:=libncurses
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -49,12 +50,6 @@
 	LIBS="-nodefaultlibs -luClibc++ -lm -lgcc" \
 	CC="$(TARGET_CC)" CXX="$(TARGET_CXX)" \
 
-define Build/Compile
-	$(MAKE) -C $(PKG_BUILD_DIR) \
-		DESTDIR="$(PKG_INSTALL_DIR)" \
-		all install
-endef
-
 define Build/InstallDev
 	$(INSTALL_DIR) $(1)/usr/include
 	$(CP) $(PKG_INSTALL_DIR)/usr/include/gps.h $(1)/usr/include/

--- a/net/ipcad/Makefile
+++ b/net/ipcad/Makefile
@@ -14,6 +14,8 @@
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=@SF/ipcad
 PKG_MD5SUM:=125605249958894148ec26d3c88189f5
+
+PKG_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -49,13 +51,7 @@
 	ac_cv_header_linux_netfilter_ipv4_ip_queue_h=no \
 	ac_cv_header_linux_netfilter_ipv4_ipt_ULOG_h=no \
 
-define Build/Compile	
-	$(MAKE) -C $(PKG_BUILD_DIR) \
-		DESTDIR="$(PKG_INSTALL_DIR)" \
-		all install
-endef
-
-define Package/ipcad/install	
+define Package/ipcad/install
 	$(INSTALL_DIR) $(1)/etc
 	$(CP) $(PKG_INSTALL_DIR)/etc/ipcad.conf $(1)/etc/
 	$(INSTALL_DIR) $(1)/usr/bin

--- a/net/ipkungfu/Makefile
+++ b/net/ipkungfu/Makefile
@@ -14,6 +14,8 @@
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://www.linuxkungfu.org/ipkungfu
 PKG_MD5SUM:=89f6bc0df356dd4ee650882c54ec9074
+
+PKG_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -67,12 +69,6 @@
 		 ac_cv_path_SED="/bin/sed" \
 		 ac_cv_path_AWK="/usr/bin/awk" \
 
-define Build/Compile
-	$(MAKE) -C $(PKG_BUILD_DIR) \
-		DESTDIR="$(PKG_INSTALL_DIR)" \
-		all install
-endef
-
 define Package/ipkungfu/install
 	$(INSTALL_DIR) $(1)/usr/sbin
 	$(INSTALL_BIN) $(PKG_BUILD_DIR)/dummy_server $(1)/usr/sbin/

--- a/net/ipsec-tools/Makefile
+++ b/net/ipsec-tools/Makefile
@@ -15,6 +15,8 @@
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=@SF/ipsec-tools
 PKG_MD5SUM:=821bd84e8d4ad5a93bf594b8b3d66e1e
+
+PKG_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -58,12 +60,6 @@
 endef
 
 # override CFLAGS holding "-Werror" that break builds on compile warnings
-define Build/Compile
-	$(MAKE) -C $(PKG_BUILD_DIR) \
-		DESTDIR="$(PKG_INSTALL_DIR)" \
-		CFLAGS="$(TARGET_CFLAGS)" \
-		all install
-endef
 
 define Package/ipsec-tools/install
 	$(INSTALL_DIR) $(1)/etc

--- a/net/keepalived/Makefile
+++ b/net/keepalived/Makefile
@@ -50,8 +50,6 @@
 	ac_cv_file_$(call acvar,$(LINUX_DIR)/net/core/link_watch.c)=yes
 
 define Build/Compile
-	rm -rf $(PKG_INSTALL_DIR)
-	mkdir -p $(PKG_INSTALL_DIR)
 	$(MAKE) -C $(PKG_BUILD_DIR) \
 		DESTDIR="$(PKG_INSTALL_DIR)" \
 		STRIP="/bin/true" \

--- a/net/krb5/Makefile
+++ b/net/krb5/Makefile
@@ -10,7 +10,11 @@
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
 
+PKG_INSTALL:=1
+
 include $(INCLUDE_DIR)/package.mk
+
+MAKE_PATH:=src
 
 define Package/krb5/Default
 	SECTION:=net
@@ -83,16 +87,6 @@
 	$(call Build/Configure/Default)
 endef
 
-define Build/Compile
-	rm -rf "$(PKG_INSTALL_DIR)"
-	mkdir -p "$(PKG_INSTALL_DIR)"
-	$(MAKE) -C $(PKG_BUILD_DIR)/src \
-		DESTDIR="$(PKG_INSTALL_DIR)" \
-		CFLAGS="$(TARGET_CFLAGS)" \
-		CC="$(TARGET_CC)" \
-		all install
-endef
-
 define Package/krb5-libs/install
 	$(INSTALL_DIR) $(1)/usr/lib
 	$(INSTALL_DIR) $(1)/usr/lib/krb5

--- a/net/matrixtunnel/Makefile
+++ b/net/matrixtunnel/Makefile
@@ -1,5 +1,5 @@
-# 
-# Copyright (C) 2006 OpenWrt.org
+#
+# Copyright (C) 2006-2010 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -9,7 +9,7 @@
 
 PKG_NAME:=matrixtunnel
 PKG_VERSION:=0.2
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://znerol.ch/files
@@ -17,7 +17,11 @@
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
 
+PKG_INSTALL:=1
+
 include $(INCLUDE_DIR)/package.mk
+
+MAKE_PATH:=src
 
 define Package/matrixtunnel
   SECTION:=net
@@ -41,12 +45,6 @@
 	)
 endef
 
-define Build/Compile
-	$(MAKE) -C $(PKG_BUILD_DIR)/src \
-		DESTDIR="$(PKG_INSTALL_DIR)" \
-		all install
-endef
-
 define Package/matrixtunnel/install
 	$(INSTALL_DIR) $(1)/usr/bin
 	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/matrixtunnel $(1)/usr/bin/

--- a/net/miau/Makefile
+++ b/net/miau/Makefile
@@ -14,6 +14,8 @@
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=@SF/miau
 PKG_MD5SUM:=cbce4182d66430a965a5fff26738ce3f
+
+PKG_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -39,12 +41,8 @@
 	--enable-privlog \
 	--enable-onconnect
 
-MAKE_FLAGS += \
-	DESTDIR="$(PKG_INSTALL_DIR)" \
-	all install
-
-define Package/miau/install	
-	$(INSTALL_DIR) $(1)/usr/bin  	
+define Package/miau/install
+	$(INSTALL_DIR) $(1)/usr/bin
 	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/$(PKG_NAME) $(1)/usr/bin/
 	$(INSTALL_DIR) $(1)/etc/init.d
 	$(INSTALL_DIR) $(1)/etc/default

--- a/net/mtr/Makefile
+++ b/net/mtr/Makefile
@@ -14,6 +14,8 @@
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=ftp://ftp.bitwizard.nl/mtr/
 PKG_MD5SUM:=23baca52d0922c2ecba7eba05317868c
+
+PKG_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -53,12 +55,6 @@
 	)
 endef
 
-define Build/Compile
-	$(MAKE) -C $(PKG_BUILD_DIR) \
-		DESTDIR="$(PKG_INSTALL_DIR)" \
-		all install
-endef
-
 define Package/mtr/install
 	$(INSTALL_DIR) $(1)/usr/sbin
 	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/mtr $(1)/usr/sbin/

--- a/net/mutella/Makefile
+++ b/net/mutella/Makefile
@@ -1,5 +1,5 @@
-# 
-# Copyright (C) 2007-2008 OpenWrt.org
+#
+# Copyright (C) 2007-2010 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -9,13 +9,14 @@
 
 PKG_NAME:=mutella
 PKG_VERSION:=0.4.5
-PKG_RELEASE:=3
+PKG_RELEASE:=4
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=@SF/$(PKG_NAME)
 PKG_MD5SUM:=1a676eacf562e3b8de90493f99fe059c
 
-PKG_FIXUP = libtool
+PKG_FIXUP:=libtool
+PKG_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -48,10 +49,6 @@
 	$(SED) 's,-L$$$$(libdir),,g' $(PKG_BUILD_DIR)/{mutella,util}/Makefile.in
 endef
 
-define Build/Compile
-	$(MAKE) -C $(PKG_BUILD_DIR) DESTDIR="$(PKG_INSTALL_DIR)" all install
-endef
-
 define Package/mutella/install
 	$(INSTALL_DIR) $(1)/usr/bin
 	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mutella{,_sio} $(1)/usr/bin/

--- a/net/nagios-plugins/Makefile
+++ b/net/nagios-plugins/Makefile
@@ -14,6 +14,8 @@
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=@SF/nagiosplug
 PKG_MD5SUM:=a1835a48a777863ed2583de3c82446a9
+
+PKG_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -41,12 +43,6 @@
 	--with-ssh-command="/usr/bin/ssh" \
 	--with-nslookup-command="/usr/bin/nslookup"
 
-define Build/Compile
-	$(MAKE) -C $(PKG_BUILD_DIR) \
-		DESTDIR="$(PKG_INSTALL_DIR)" \
-		all install
-endef
-
 define Package/nagios-plugins/install
 	$(INSTALL_DIR) $(1)/usr/libexec/nagios
 	$(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/libexec/nagios/

--- a/net/natpmp/Makefile
+++ b/net/natpmp/Makefile
@@ -27,7 +27,6 @@
 endef
 
 define Build/Compile
-	rm -rf $(PKG_INSTALL_DIR)
 	$(MAKE) -C $(PKG_BUILD_DIR) \
 		$(TARGET_CONFIGURE_OPTS) \
 		CC="$(TARGET_CC)" \

--- a/net/netcat/Makefile
+++ b/net/netcat/Makefile
@@ -7,6 +7,8 @@
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=@SF/$(PKG_NAME)
 PKG_MD5SUM:=0a29eff1736ddb5effd0b1ec1f6fe0ef
+
+PKG_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -27,12 +29,6 @@
 		--disable-rpath \
 		--with-included-getopt \
 	)
-endef
-
-define Build/Compile
-	DESTDIR="$(PKG_INSTALL_DIR)" \
-	$(MAKE) -C $(PKG_BUILD_DIR) \
-	all install
 endef
 
 define Package/netcat/install

--- a/net/netdiscover/Makefile
+++ b/net/netdiscover/Makefile
@@ -15,6 +15,8 @@
 PKG_SOURCE_URL:=http://nixgeneration.com/~jaime/netdiscover/releases/
 PKG_MD5SUM:=0919227a91ecaeeb2443cff249417be2
 
+PKG_INSTALL:=1
+
 include $(INCLUDE_DIR)/package.mk
 
 define Package/netdiscover
@@ -29,12 +31,6 @@
 	CPPFLAGS="$(TARGET_CPPFLAGS) -I$(STAGING_DIR)/usr/lib/libnet-1.1.x/include" \
 	LDFLAGS="$(TARGET_LDFLAGS) -L$(STAGING_DIR)/usr/lib/libnet-1.1.x/lib" \
 
-define Build/Compile
-	$(MAKE) -C $(PKG_BUILD_DIR) \
-		DESTDIR="$(PKG_INSTALL_DIR)" \
-		all install
-endef
-
 define Package/netdiscover/install
 	$(INSTALL_DIR) $(1)/usr/sbin
 	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/netdiscover $(1)/usr/sbin/

--- a/net/ngircd/Makefile
+++ b/net/ngircd/Makefile
@@ -14,6 +14,8 @@
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=ftp://ngircd.barton.de/pub/ngircd/
 PKG_MD5SUM:=c183a85eba6fe51255983848f099c8ae
+
+PKG_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -36,16 +38,6 @@
 /etc/ngircd.conf
 endef
 
-define Build/Configure
-	$(call Build/Configure/Default)
-endef
-
-define Build/Compile
-	$(MAKE) -C $(PKG_BUILD_DIR) \
-		DESTDIR="$(PKG_INSTALL_DIR)" \
-		all install
-endef
-
 define Package/ngircd/install
 	$(INSTALL_DIR) $(1)/usr/sbin
 	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/ngircd $(1)/usr/sbin/

--- a/net/nmap/Makefile
+++ b/net/nmap/Makefile
@@ -14,6 +14,8 @@
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=http://download.insecure.org/nmap/dist
 PKG_MD5SUM:=ea50419f99472200c4184a304e3831ea
+
+PKG_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -41,13 +43,7 @@
 	CXXFLAGS="$$$$CXXFLAGS -fno-builtin -fno-rtti -nostdinc++" \
 	LIBS="-nodefaultlibs -luClibc++ -lgcc" \
 
-define Build/Compile	
-	$(MAKE) -C $(PKG_BUILD_DIR) \
-		DESTDIR="$(PKG_INSTALL_DIR)" \
-		all install
-endef
-
-define Package/nmap/install	
+define Package/nmap/install
 	$(INSTALL_DIR) $(1)/usr/bin
 	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/nmap $(1)/usr/bin/
 	$(INSTALL_DIR) $(1)/usr/share/nmap

--- a/net/nocatsplash/Makefile
+++ b/net/nocatsplash/Makefile
@@ -16,6 +16,8 @@
 PKG_MD5SUM:=e0fcc0effe52e63bc31070d16d0b4a81
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/NoCatSplash-$(PKG_VERSION)
+
+PKG_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -48,16 +50,9 @@
 	)
 endef
 
-define Build/Compile	
-	mkdir -p $(PKG_INSTALL_DIR)
-	$(MAKE) -C $(PKG_BUILD_DIR) \
-		DESTDIR="$(PKG_INSTALL_DIR)" \
-		all install
-endef
-
-define Package/nocatsplash/install	
+define Package/nocatsplash/install
 	$(INSTALL_DIR) $(1)
-	$(CP) $(PKG_INSTALL_DIR)/* $(1)/ 
+	$(CP) $(PKG_INSTALL_DIR)/* $(1)/
 endef
 
 $(eval $(call BuildPackage,nocatsplash))

--- a/net/olsrd/Makefile
+++ b/net/olsrd/Makefile
@@ -110,8 +110,6 @@
 endef
 
 define Build/Compile
-	rm -rf $(PKG_INSTALL_DIR)
-	mkdir -p $(PKG_INSTALL_DIR)
 	$(MAKE) -C "$(PKG_BUILD_DIR)" \
 		$(TARGET_CONFIGURE_OPTS) \
 		NODEBUG=1 \

--- a/net/opendchub/Makefile
+++ b/net/opendchub/Makefile
@@ -14,6 +14,8 @@
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=@SF/opendchub
 PKG_MD5SUM:=8f9ab5bb7f85730f4b1ce7cceb6aef96
+
+PKG_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -37,14 +39,7 @@
 	)
 endef
 
-define Build/Compile	
-	$(call Build/Compile/Default,\
-		DESTDIR="$(PKG_INSTALL_DIR)" \
-		all install \
-	)
-endef
-
-define Package/opendchub/install	
+define Package/opendchub/install
 	$(INSTALL_DIR) $(1)/usr/bin
 	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/opendchub $(1)/usr/bin/
 endef

--- a/net/openssh/Makefile
+++ b/net/openssh/Makefile
@@ -122,8 +122,6 @@
 CONFIGURE_VARS += LD="$(TARGET_CC)"
 
 define Build/Compile
-	rm -rf $(PKG_INSTALL_DIR)
-	mkdir -p $(PKG_INSTALL_DIR)
 	$(MAKE) -C $(PKG_BUILD_DIR) \
 		DESTDIR="$(PKG_INSTALL_DIR)" \
 		LIBS="" \
@@ -145,7 +143,7 @@
 
 define Package/openssh-client-utils/install
 	$(INSTALL_DIR) $(1)/usr/bin
-	$(INSTALL_BIN) $(foreach bin,add agent keyscan keysign,$(PKG_BUILD_DIR)/ssh-$(bin)) $(1)/usr/bin/
+	$(INSTALL_BIN) $(foreach bin,add agent keyscan keysign keygen,$(PKG_BUILD_DIR)/ssh-$(bin)) $(1)/usr/bin/
 endef
 
 define Package/openssh-server/install

--- a/net/openvpn/Makefile
+++ b/net/openvpn/Makefile
@@ -14,6 +14,8 @@
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://openvpn.net/release @SF/openvpn
 PKG_MD5SUM:=452a83326ae198cf961e9ae02539c8fb
+
+PKG_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -59,12 +61,6 @@
 	)
 endef
 
-define Build/Compile
-	$(MAKE) -C $(PKG_BUILD_DIR) \
-		DESTDIR="$(PKG_INSTALL_DIR)" \
-		all install
-endef
-
 define Package/openvpn/install
 	$(INSTALL_DIR) $(1)/usr/sbin
 	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/openvpn $(1)/usr/sbin/

--- a/net/pepperspot/Makefile
+++ b/net/pepperspot/Makefile
@@ -14,6 +14,8 @@
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=@SF/pepperspot
 PKG_MD5SUM:=a7ac2c8f93799f7d23d9ad2a0841fe4a
+
+PKG_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -39,12 +41,6 @@
 
 # uses GNU configure
 
-define Build/Compile
-	$(MAKE) -C $(PKG_BUILD_DIR) \
-		DESTDIR="$(PKG_INSTALL_DIR)" \
-		all install
-endef
-
 define Package/pepperspot/install
 	$(INSTALL_DIR) $(1)/etc/init.d
 	$(INSTALL_BIN) ./files/$(PKG_NAME).init $(1)/etc/init.d/pepper

--- a/net/qolyester/Makefile
+++ b/net/qolyester/Makefile
@@ -14,6 +14,8 @@
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=http://qolsr.lri.fr/code/
 PKG_MD5SUM:=650286fc2ea3e13c246d233aaa46f2a4
+
+PKG_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -32,13 +34,8 @@
 endef
 
 # uses GNU configure
-define Build/Compile	
-	$(MAKE) -C $(PKG_BUILD_DIR) \
-		DESTDIR="$(PKG_INSTALL_DIR)" \
-		all install
-endef
 
-define Package/qolyester/install	
+define Package/qolyester/install
 	$(INSTALL_DIR) $(1)/usr/bin
 	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/qolsrd $(1)/usr/bin/
 endef

--- a/net/quagga-unstable/Makefile
+++ b/net/quagga-unstable/Makefile
@@ -22,6 +22,8 @@
 PKG_CONFIG_DEPENDS:= \
 	CONFIG_PACKAGE_quagga-unstable-isisd \
 	CONFIG_PACKAGE_quagga-unstable-ripngd
+
+PKG_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -114,12 +116,6 @@
 ifneq ($(CONFIG_PACKAGE_quagga-unstable-ripngd),)
   CONFIGURE_ARGS+= --enable-ripngd
 endif
-
-define Build/Compile
-	$(MAKE) -C $(PKG_BUILD_DIR) \
-		DESTDIR=$(PKG_INSTALL_DIR) \
-		all install
-endef
 
 define Package/quagga-unstable/install
 	$(INSTALL_DIR) $(1)/usr/sbin

--- a/net/raddump/Makefile
+++ b/net/raddump/Makefile
@@ -14,6 +14,8 @@
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=@SF/raddump
 PKG_MD5SUM:=f8c29c67141ea78bb6ae8b97d5149480
+
+PKG_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -34,13 +36,7 @@
 
 # uses GNU configure
 
-define Build/Compile	
-	$(MAKE) -C $(PKG_BUILD_DIR) \
-		DESTDIR="$(PKG_INSTALL_DIR)" \
-		all install
-endef
-
-define Package/raddump/install	
+define Package/raddump/install
 	$(INSTALL_DIR) $(1)/usr/bin
 	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/raddump $(1)/usr/bin/
 endef

--- a/net/radsecproxy/Makefile
+++ b/net/radsecproxy/Makefile
@@ -14,6 +14,8 @@
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://software.uninett.no/radsecproxy/
 PKG_MD5SUM:=565b389268d906c3b465f63750938667
+
+PKG_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -32,12 +34,6 @@
 CONFIGURE_ARGS+= \
 	--with-ssl="$(STAGING_DIR)/usr"
 
-define Build/Compile	
-	$(MAKE) -C $(PKG_BUILD_DIR) \
-		DESTDIR="$(PKG_INSTALL_DIR)" \
-		all install
-endef
-
 define Package/radsecproxy/install
 	$(INSTALL_DIR) $(1)/usr/sbin/
 	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/radsecproxy $(1)/usr/sbin/

--- a/net/rarpd/Makefile
+++ b/net/rarpd/Makefile
@@ -14,6 +14,8 @@
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=ftp://ftp.dementia.org/pub/net-tools
 PKG_MD5SUM:=04e2ca849e758d0b88c8281775ec3b58
+
+PKG_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -42,13 +44,7 @@
 	)
 endef
 
-define Build/Compile	
-	$(MAKE) -C $(PKG_BUILD_DIR) \
-		DESTDIR="$(PKG_INSTALL_DIR)" \
-		all install
-endef
-
-define Package/rarpd/install	
+define Package/rarpd/install
 	$(INSTALL_DIR) $(1)/usr/sbin
 	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/rarpd $(1)/usr/sbin/
 	$(INSTALL_DIR) $(1)/etc/default

--- a/net/reaim/Makefile
+++ b/net/reaim/Makefile
@@ -15,6 +15,8 @@
 PKG_SOURCE_URL:=@SF/reaim
 PKG_MD5SUM:=647d2ab72ec454f89294accfb3182c09
 
+PKG_INSTALL:=1
+
 include $(INCLUDE_DIR)/package.mk
 
 define Package/reaim
@@ -30,15 +32,7 @@
 ReAIM is a proxy for file transfers with MSN/AIM.
 endef
 
-define Build/Compile	
-	$(call Build/Compile/Default, \
-		CFLAGS="$(TARGET_CFLAGS)" \
-		DESTDIR="$(PKG_INSTALL_DIR)" \
-		all install \
-	)
-endef
-
-define Package/reaim/install	
+define Package/reaim/install
 	$(INSTALL_DIR) $(1)/usr/sbin
 	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/reaim $(1)/usr/sbin/
 	$(INSTALL_DIR) $(1)/etc/init.d

--- a/net/rp-l2tp/Makefile
+++ b/net/rp-l2tp/Makefile
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2006 OpenWrt.org
+# Copyright (C) 2006-2010 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -9,11 +9,13 @@
 
 PKG_NAME:=rp-l2tp
 PKG_VERSION:=0.4
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=@SF/rp-l2tp
 PKG_MD5SUM:=0e45d11cb4fa6c56cce6b1d119733ed9
+
+PKG_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -29,11 +31,6 @@
 define Package/rp-l2tpd/description
 	Roaring Penguin L2TP (Layer 2 Tunneling Protocol) implementation.
 endef
-
-# uses GNU configure
-MAKE_FLAGS += \
-	DESTDIR="$(PKG_INSTALL_DIR)" \
-	all install
 
 TARGET_CFLAGS := -I$(PKG_BUILD_DIR)/libevent $(TARGET_CFLAGS)
 

--- a/net/rtpproxy/Makefile
+++ b/net/rtpproxy/Makefile
@@ -15,6 +15,8 @@
 PKG_SOURCE_URL:=http://b2bua.org/chrome/site/
 PKG_MD5SUM:=b0b5d6cdce3f17cdbbac473c11a2d0e5
 
+PKG_INSTALL:=1
+
 include $(INCLUDE_DIR)/package.mk
 
 define Package/rtpproxy
@@ -27,12 +29,6 @@
 
 # uses GNU configure
 
-define Build/Compile
-	$(MAKE) -C $(PKG_BUILD_DIR) \
-		DESTDIR="$(PKG_INSTALL_DIR)" \
-		all install
-endef
-
 define Package/rtpproxy/install
 	$(INSTALL_DIR) $(1)/usr/bin
 	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/rtpproxy $(1)/usr/bin/

--- a/net/scdp/Makefile
+++ b/net/scdp/Makefile
@@ -15,6 +15,8 @@
 PKG_SOURCE_URL:=@SF/scdp
 PKG_MD5SUM:=7eafaf5a422e37d04715613993ed5d95
 
+PKG_INSTALL:=1
+
 include $(INCLUDE_DIR)/package.mk
 
 define Package/scdp
@@ -30,7 +32,7 @@
 	selected interfaces and tells the connected switch (cisco only)
 	where the host is connected.
 endef
-			
+
 define Build/Configure
 	$(call Build/Configure/Default, \
 		, \
@@ -40,12 +42,6 @@
 	)
 endef
 
-define Build/Compile	
-	$(MAKE) -C $(PKG_BUILD_DIR) \
-		DESTDIR="$(PKG_INSTALL_DIR)" \
-		all install
-endef
-
 define Package/scdp/install
 	$(INSTALL_DIR) $(1)/usr/bin
 	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/scdp $(1)/usr/bin/

--- a/net/ser2net/Makefile
+++ b/net/ser2net/Makefile
@@ -14,6 +14,8 @@
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=@SF/ser2net
 PKG_MD5SUM:=22977477789868923a5de09a85e847dd
+
+PKG_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -37,12 +39,6 @@
 
 # uses GNU configure
 
-define Build/Compile
-	$(MAKE) -C $(PKG_BUILD_DIR) \
-		DESTDIR="$(PKG_INSTALL_DIR)" \
-		all install
-endef
-
 define Package/ser2net/install
 	$(INSTALL_DIR) $(1)/usr/sbin
 	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/ser2net $(1)/usr/sbin/

--- a/net/shorewall-lite/Makefile
+++ b/net/shorewall-lite/Makefile
@@ -43,8 +43,6 @@
 endef
 
 define Build/Compile
-	rm -rf $(PKG_INSTALL_DIR)
-	mkdir -p $(PKG_INSTALL_DIR)
 	PREFIX=$(PKG_INSTALL_DIR) $(PKG_BUILD_DIR)/install.sh
 endef
 

--- a/net/sipsak/Makefile
+++ b/net/sipsak/Makefile
@@ -16,6 +16,8 @@
 	http://ftp.iptel.org/pub/sipsak/
 PKG_MD5SUM:=c4eb8e282902e75f4f040f09ea9d99d5
 
+PKG_INSTALL:=1
+
 include $(INCLUDE_DIR)/package.mk
 
 define Package/sipsak
@@ -25,17 +27,14 @@
   TITLE:=SIP (Session Initiation Protocol) stress and diagnostics utility
   URL:=http://www.sipsak.org/
 endef
-			
-CONFIGURE_ARGS += \
-	--disable-gnutls \
 
-define Build/Compile	
-	$(MAKE) -C $(PKG_BUILD_DIR) \
-		DESTDIR="$(PKG_INSTALL_DIR)" \
-		all install
+define Build/Configure
+	$(call Build/Configure/Default, \
+		--disable-gnutls \
+	)
 endef
 
-define Package/sipsak/install	
+define Package/sipsak/install
 	$(INSTALL_DIR) $(1)/usr/bin
 	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/sipsak $(1)/usr/bin/
 endef

--- a/net/slurm/Makefile
+++ b/net/slurm/Makefile
@@ -14,6 +14,8 @@
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://www.wormulon.net/slurm/
 PKG_MD5SUM:=e68d09202b835c644f7f6b7f070f29a2
+
+PKG_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -34,7 +36,7 @@
 	- it's themeable.
 endef
 
-define Build/Configure	
+define Build/Configure
 	(cd $(PKG_BUILD_DIR); touch \
 		configure.in \
 		aclocal.m4 \
@@ -49,13 +51,7 @@
 	)
 endef
 
-define Build/Compile	
-	$(MAKE) -C $(PKG_BUILD_DIR) \
-		DESTDIR="$(PKG_INSTALL_DIR)" \
-		all install
-endef
-
-define Package/slurm/install	
+define Package/slurm/install
 	$(INSTALL_DIR) $(1)/usr/bin
 	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/slurm $(1)/usr/bin/
 endef

--- a/net/socat/Makefile
+++ b/net/socat/Makefile
@@ -14,6 +14,8 @@
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=http://www.dest-unreach.org/socat/download/
 PKG_MD5SUM:=6a0dd33cde2a18eb382433aca8f76ce2
+
+PKG_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -45,13 +47,7 @@
 	)
 endef
 
-define Build/Compile	
-	$(MAKE) -C $(PKG_BUILD_DIR) \
-		DESTDIR="$(PKG_INSTALL_DIR)" \
-		all install
-endef
-
-define Package/socat/install	
+define Package/socat/install
 	$(INSTALL_DIR) $(1)/usr/bin
 	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/socat $(1)/usr/bin/
 endef

--- a/net/ssltunnel/Makefile
+++ b/net/ssltunnel/Makefile
@@ -14,6 +14,8 @@
 PKG_SOURCE:=${PKG_NAME}-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://www.hsc.fr/ressources/outils/ssltunnel/download
 PKG_MD5SUM:=4039b50566a33a4077883ea974e476d5
+
+PKG_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -43,12 +45,6 @@
 	)
 endef
 
-define Build/Compile
-	$(MAKE) -C $(PKG_BUILD_DIR) \
-		DESTDIR="$(PKG_INSTALL_DIR)" \
-		all install
-endef
-
 define Package/ssltunnel/install	
 	$(INSTALL_DIR) $(1)/usr/bin
 	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/pppclient $(1)/usr/bin/

--- a/net/stunnel/Makefile
+++ b/net/stunnel/Makefile
@@ -7,6 +7,8 @@
 PKG_MD5SUM:=14dc3f8412947f0548975cbce74d6863
 PKG_SOURCE_URL:=http://www.stunnel.org/download/stunnel/src/
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+
+PKG_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -41,9 +43,7 @@
 define Build/Compile
 	mkdir -p $(PKG_INSTALL_DIR)/etc/stunnel
 	echo '#dummy' > $(PKG_INSTALL_DIR)/etc/stunnel/stunnel.pem
-	$(MAKE) -C $(PKG_BUILD_DIR) \
-		DESTDIR="$(PKG_INSTALL_DIR)" \
-		all install
+	$(call Build/Compile/Default)
 endef
 
 define Package/stunnel/install

--- a/net/tinc/Makefile
+++ b/net/tinc/Makefile
@@ -17,7 +17,11 @@
 	http://www.mirrors.wiretapped.net/security/network-security/tinc/
 PKG_MD5SUM:=ee0b1a3366c6e379cae34be6fa5dcb15
 
+PKG_INSTALL:=1
+
 include $(INCLUDE_DIR)/package.mk
+
+TARGET_CFLAGS+=-std=gnu99
 
 define Package/tinc
   SECTION:=net
@@ -41,12 +45,6 @@
 	)
 endef
 
-define Build/Compile
-	$(MAKE) -C $(PKG_BUILD_DIR) \
-		DESTDIR="$(PKG_INSTALL_DIR)" \
-		all install
-endef
-
 define Package/tinc/install
 	$(INSTALL_DIR) $(1)/usr/sbin
 	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/tincd $(1)/usr/sbin/

--- a/net/tinyproxy/Makefile
+++ b/net/tinyproxy/Makefile
@@ -15,6 +15,8 @@
 PKG_SOURCE_URL:=http://www.banu.com/pub/tinyproxy/1.8/
 PKG_MD5SUM:=09843d47828261394d0a30af0b058997
 
+PKG_INSTALL:=1
+
 include $(INCLUDE_DIR)/package.mk
 
 define Package/tinyproxy
@@ -29,15 +31,12 @@
 /etc/config/tinyproxy
 endef
 
-CONFIGURE_ARGS+= \
-	--enable-filter \
-	--enable-transparent \
-	--enable-regexcheck=no \
-
-define Build/Compile
-	$(MAKE) -C $(PKG_BUILD_DIR) \
-		DESTDIR="$(PKG_INSTALL_DIR)" \
-		all install
+define Build/Configure
+	$(call Build/Configure/Default, \
+		--enable-filter \
+		--enable-transparent \
+		--enable-regexcheck=no \
+	)
 endef
 
 define Package/tinyproxy/install

--- a/net/tmsnc/Makefile
+++ b/net/tmsnc/Makefile
@@ -14,6 +14,8 @@
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=@SF/tmsnc
 PKG_MD5SUM:=337dae91d4775e03b6681f61db56d2a7
+
+PKG_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -39,13 +41,7 @@
 	)
 endef
 
-define Build/Compile
-	$(MAKE) -C $(PKG_BUILD_DIR) \
-		DESTDIR="$(PKG_INSTALL_DIR)" \
-		all install
-endef
-
-define Package/tmsnc/install	
+define Package/tmsnc/install
 	$(INSTALL_DIR) $(1)/usr/bin
 	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/tmsnc $(1)/usr/bin/
 endef

--- a/net/tsocks/Makefile
+++ b/net/tsocks/Makefile
@@ -15,6 +15,8 @@
 
 PKG_SOURCE_URL:=@SF/tsocks
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)beta5.tar.gz
+
+PKG_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -35,13 +37,6 @@
 	)
 endef
 
-define Build/Compile
-	$(call Build/Compile/Default,\
-		DESTDIR="$(PKG_INSTALL_DIR)" \
-		all install \
-	)
-endef
-
 define Package/tsocks/install
 	$(INSTALL_DIR) $(1)/usr/bin $(1)/usr/lib
 	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/tsocks $(1)/usr/bin/

--- a/net/umurmur/Makefile
+++ b/net/umurmur/Makefile
@@ -35,13 +35,7 @@
 	-I$(STAGING_DIR)/usr/include \
 	$(TARGET_CFLAGS)
 
-define Build/Compile
-	CC="$(TARGET_CC)" \
-	CFLAGS="$(TARGET_CFLAGS)" \
-	LDFLAGS="$(TARGET_LDFLAGS)" \
-	$(MAKE) -C $(PKG_BUILD_DIR)/src \
-		all
-endef
+MAKE_PATH:=src
 
 define Package/umurmur/install
 	$(INSTALL_DIR) $(1)/usr/bin

--- a/net/updatedd/Makefile
+++ b/net/updatedd/Makefile
@@ -14,6 +14,8 @@
 PKG_SOURCE_URL:=http://downloads.openwrt.org/sources/
 PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).tar.bz2
 PKG_MD5SUM:=f03446105ed043cd5dbd1ab95484d27f
+
+PKG_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -102,10 +104,6 @@
   TITLE:=zoneedit.com
 endef
 
-MAKE_FLAGS += \
-	DESTDIR="$(PKG_INSTALL_DIR)" \
-	all install
-
 define Build/Configure
 	(cd $(PKG_BUILD_DIR); aclocal && autoconf && automake )
 	$(call Build/Configure/Default)

--- a/net/uucp/Makefile
+++ b/net/uucp/Makefile
@@ -1,5 +1,5 @@
-# 
-# Copyright (C) 2008 OpenWrt.org
+#
+# Copyright (C) 2008-2010 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -9,10 +9,13 @@
 
 PKG_NAME:=uucp
 PKG_VERSION:=1.07
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).orig.tar.gz
 PKG_SOURCE_URL:=http://ftp.debian.org/debian/pool/main/u/uucp/
 PKG_MD5SUM:=
+
+PKG_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -33,14 +36,6 @@
 	--enable-static \
 	--enable-shared
 
-define Build/Compile
-	$(MAKE) -C $(PKG_BUILD_DIR) \
-		CFLAGS="$(TARGET_CFLAGS)" \
-		DESTDIR="$(PKG_INSTALL_DIR)" \
-		all install
-endef
-
-
 define Package/uucp/install
 	$(INSTALL_DIR) $(1)/usr/bin/
 	$(CP) $(PKG_BUILD_DIR)/{cu,tstuu,uu{chk,cico,conv,cp,log,name,pick,sched,stat,to,x,xqt}} $(1)/usr/bin/

--- a/net/vgp/Makefile
+++ b/net/vgp/Makefile
@@ -14,6 +14,8 @@
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://vgpd.freaknet.org/files/
 PKG_MD5SUM:=b8c25b5dfcb944f78bbc584be9c230c7
+
+PKG_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -34,12 +36,6 @@
 
 # uses GNU configure
 
-define Build/Compile
-	$(MAKE) -C $(PKG_BUILD_DIR) \
-		DESTDIR="$(PKG_INSTALL_DIR)" \
-		all install
-endef
-
 define Package/vgp/install
 	$(INSTALL_DIR) $(1)/usr/bin
 	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/vgpd $(1)/usr/bin/

--- a/net/wccpd/Makefile
+++ b/net/wccpd/Makefile
@@ -15,6 +15,8 @@
 PKG_SOURCE_URL:=@SF/wccpd
 PKG_MD5SUM:=5f15c274de61dfb88e0dbfc1ccbe6b67
 
+PKG_INSTALL:=1
+
 include $(INCLUDE_DIR)/package.mk
 
 define Package/wccpd
@@ -31,16 +33,6 @@
 	protocol.
 endef
 
-define Build/Configure
-	$(call Build/Configure/Default)
-endef
-
-define Build/Compile
-	$(MAKE) -C $(PKG_BUILD_DIR) \
-		DESTDIR="$(PKG_INSTALL_DIR)" \
-		all install 
-endef
-
 define Package/wccpd/install
 	$(INSTALL_DIR) $(1)/usr/sbin
 	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/wccpd $(1)/usr/sbin/

--- a/net/wifidog/Makefile
+++ b/net/wifidog/Makefile
@@ -15,7 +15,8 @@
 PKG_SOURCE_URL:= @SF/$(PKG_NAME)
 PKG_MD5SUM:=e3ecacba67a91b6ea3c1072ba6c5a0b4
 
-PKG_FIXUP = libtool
+PKG_FIXUP:=libtool
+PKG_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -39,10 +40,6 @@
 /etc/wifidog.conf
 endef
 
-MAKE_FLAGS += \
-	DESTDIR="$(PKG_INSTALL_DIR)" \
-	all install
-	
 define Package/wifidog/install
 	$(INSTALL_DIR) $(1)/usr/bin
 	$(INSTALL_BIN) $(PKG_BUILD_DIR)/scripts/init.d/wifidog $(1)/usr/bin/wifidog-init

--- a/net/xsupplicant/Makefile
+++ b/net/xsupplicant/Makefile
@@ -16,6 +16,7 @@
 PKG_MD5SUM:=75f89731b905eb8d36a52621661e1226
 
 PKG_BUILD_DEPENDS:=PACKAGE_kmod-madwifi:madwifi
+PKG_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -55,13 +56,7 @@
 	);
 endef
 
-define Build/Compile	
-	$(MAKE) -C $(PKG_BUILD_DIR) \
-		DESTDIR="$(PKG_INSTALL_DIR)" \
-		all install
-endef
-
-define Package/xsupplicant/install	
+define Package/xsupplicant/install
 	$(INSTALL_DIR) $(1)/etc
 	$(INSTALL_DATA) $(PKG_BUILD_DIR)/etc/xsupplicant.conf $(1)/etc/
 	$(INSTALL_DIR) $(1)/usr/bin

--- a/sound/flite/Makefile
+++ b/sound/flite/Makefile
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2006 OpenWrt.org
+# Copyright (C) 2006-2010 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -8,12 +8,14 @@
 
 PKG_NAME:=flite
 PKG_VERSION:=1.3-release
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://www.speech.cs.cmu.edu/flite/packed/flite-1.3/
 PKG_MD5SUM:=ae0aca1cb7b4801f4372f3a75a9e52b5
- 
+
+PKG_INSTALL:=1
+
 include $(INCLUDE_DIR)/package.mk
 
 define Package/flite
@@ -41,14 +43,6 @@
 	)
 endef
 
-define Build/Compile
-	rm -rf $(PKG_INSTALL_DIR)
-	mkdir -p $(PKG_INSTALL_DIR)
-	$(MAKE) -C $(PKG_BUILD_DIR) \
-		DESTDIR="$(PKG_INSTALL_DIR)" \
-		all install
-endef
-
 define Build/InstallDev
 	$(INSTALL_DIR) $(1)/usr/include/flite
 	$(CP) $(PKG_INSTALL_DIR)/usr/include/flite/{cst,flite}*.h $(1)/usr/include/flite/

--- a/sound/madplay/Makefile
+++ b/sound/madplay/Makefile
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2006 OpenWrt.org
+# Copyright (C) 2006-2010 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -9,12 +9,14 @@
 
 PKG_NAME:=madplay
 PKG_VERSION:=0.15.2b
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=@SF/mad \
 	ftp://ftp.mars.org/pub/mpeg/
 PKG_MD5SUM:=6814b47ceaa99880c754c5195aa1aac1
+
+PKG_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -49,13 +51,7 @@
 	)
 endef
 
-define Build/Compile
-	$(MAKE) -C $(PKG_BUILD_DIR) \
-		DESTDIR="$(PKG_INSTALL_DIR)" \
-		all install
-endef
-
-define Package/madplay/install	
+define Package/madplay/install
 	$(INSTALL_DIR) $(1)/usr/bin
 	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/madplay $(1)/usr/bin/
 endef

--- a/sound/mpd/Makefile
+++ b/sound/mpd/Makefile
@@ -1,5 +1,5 @@
-# 
-# Copyright (C) 2007-2009 OpenWrt.org
+#
+# Copyright (C) 2007-2010 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -8,12 +8,14 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=mpd
-PKG_VERSION:=0.15.5
+PKG_VERSION:=0.15.8
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=@SF/musicpd
-PKG_MD5SUM:=078bd45c8266ac577e4a96fa38d1e534
+PKG_MD5SUM:=
+
+PKG_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -54,6 +56,8 @@
 	CONFIGURE_ARGS+= --disable-alsa
 endif
 
+TARGET_CFLAGS+=-std=gnu99
+
 CONFIGURE_VARS += \
 	CURL_LIBS="-L$(STAGING_DIR)/usr/lib -lssl -lcrypto -lcurl" \
 	CURL_CFLAGS="-I$(STAGING_DIR)/usr/include" \
@@ -68,12 +72,6 @@
 	GLIB_CFLAGS="-I$(STAGING_DIR)/usr/include/glib-2.0 -I$(STAGING_DIR)/usr/lib/glib-2.0/include" \
 	GLIB_LIBS="$(TARGET_LDLFAGS) -L$(STAGING_DIR)/usr/lib/libintl/lib -lintl -L$(STAGING_DIR)/usr/lib/libiconv/lib -liconv -lglib-2.0 -lgthread-2.0 -pthread"
 
-define Build/Compile
-	$(MAKE) -C $(PKG_BUILD_DIR) \
-		DESTDIR="$(PKG_INSTALL_DIR)" \
-		all install
-endef
-
 define Package/mpd/install
 	$(INSTALL_DIR) $(1)/etc
 	$(CP) $(PKG_BUILD_DIR)/doc/mpdconf.example $(1)/etc/mpd.conf

--- a/sound/mt-daapd/Makefile
+++ b/sound/mt-daapd/Makefile
@@ -14,6 +14,8 @@
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=@SF/$(PKG_NAME)
 PKG_MD5SUM:=67bef9fb14d487693b0dfb792c3f1b05
+
+PKG_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -44,12 +46,6 @@
 	--with-howl-libs="$(STAGING_DIR)/usr/lib" \
 	--without-static-libs \
 
-define Build/Compile
-	$(MAKE) -C $(PKG_BUILD_DIR) \
-		DESTDIR="$(PKG_INSTALL_DIR)" \
-		all install
-endef
-
 define Package/mt-daapd/install
 	$(INSTALL_DIR) $(1)/etc
 	$(INSTALL_DATA) $(PKG_BUILD_DIR)/contrib/mt-daapd.conf $(1)/etc/

--- a/utils/bluez-hcidump/Makefile
+++ b/utils/bluez-hcidump/Makefile
@@ -1,5 +1,5 @@
-# 
-# Copyright (C) 2006 OpenWrt.org
+#
+# Copyright (C) 2006-2010 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -9,11 +9,13 @@
 
 PKG_NAME:=bluez-hcidump
 PKG_VERSION:=1.42
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://bluez.sourceforge.net/download
 PKG_MD5SUM:=5704737aaf72104eeaf77335218a1827
+
+PKG_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -31,12 +33,6 @@
 	)
 endef
 
-define Build/Compile
-	$(MAKE) -C $(PKG_BUILD_DIR) \
-		DESTDIR="$(PKG_INSTALL_DIR)" \
-		all install
-endef
-
 define Package/bluez-hcidump/install
 	$(INSTALL_DIR) $(1)/usr/sbin
 	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/hcidump $(1)/usr/sbin/

--- a/utils/ccid/Makefile
+++ b/utils/ccid/Makefile
@@ -14,6 +14,8 @@
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=http://alioth.debian.org/frs/download.php/3080
 PKG_MD5SUM:=727dc7eb4d560f81fe70a766a96de970
+
+PKG_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -37,12 +39,6 @@
 	)
 endef
 
-define Build/Compile
-	$(MAKE) -C $(PKG_BUILD_DIR) \
-	DESTDIR="$(PKG_INSTALL_DIR)" \
-		all install
-endef
-
 define Package/ccid/install
 	$(INSTALL_DIR) $(1)/usr/lib/pcsc/
 	$(CP) $(PKG_INSTALL_DIR)/usr/lib/pcsc/drivers $(1)/usr/lib/pcsc/

--- a/utils/cifsmount/Makefile
+++ b/utils/cifsmount/Makefile
@@ -27,7 +27,6 @@
 endef
 
 define Build/Prepare
-	mkdir -p $(PKG_BUILD_DIR)
 endef
 
 define Build/Compile

--- a/utils/event_test/Makefile
+++ b/utils/event_test/Makefile
@@ -26,7 +26,6 @@
 endef
 
 define Build/Prepare
-	mkdir -p $(PKG_BUILD_DIR)
 	$(CP) ./src/* $(PKG_BUILD_DIR)/
 endef
 

--- a/utils/gnokii/Makefile
+++ b/utils/gnokii/Makefile
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2006 OpenWrt.org
+# Copyright (C) 2006-2010 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -9,11 +9,13 @@
 
 PKG_NAME:=gnokii
 PKG_VERSION:=0.6.21
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://gnokii.org/download/gnokii/0.6.x
 PKG_MD5SUM:=bbf0aabe2436d8e927f3e2edb4efcac8
+
+PKG_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -45,13 +47,7 @@
 		)
 endef
 
-define Build/Compile	
-	$(MAKE) -C $(PKG_BUILD_DIR) \
-		DESTDIR="$(PKG_INSTALL_DIR)" \
-		all install
-endef
-
-define Package/gnokii/install	
+define Package/gnokii/install
 	$(INSTALL_DIR) $(1)/usr/bin
 	$(INSTALL_DIR) $(1)/usr/sbin
 	$(INSTALL_DIR) $(1)/usr/lib

--- a/utils/gzip/Makefile
+++ b/utils/gzip/Makefile
@@ -1,5 +1,5 @@
-# 
-# Copyright (C) 2006-2009 OpenWrt.org
+#
+# Copyright (C) 2006-2010 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -9,11 +9,13 @@
 
 PKG_NAME:=gzip
 PKG_VERSION:=1.3.13
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=@GNU/gzip/
 PKG_MD5SUM:=c54a31b93e865f6a4410b2dc64662706
+
+PKG_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -33,14 +35,8 @@
 CONFIGURE_VARS += \
 	gl_cv_func_getopt_gnu=yes \
 
-define Build/Compile
-	$(MAKE) -C $(PKG_BUILD_DIR) \
-		DESTDIR="$(PKG_INSTALL_DIR)" \
-		all install
+define Package/gzip/install
 	$(SED) 's,/bin/bash,/bin/sh,g' $(PKG_INSTALL_DIR)/usr/bin/{gunzip,zcat}
-endef
-
-define Package/gzip/install
 	$(INSTALL_DIR) $(1)/usr/bin
 	$(CP) $(PKG_INSTALL_DIR)/usr/bin/{gunzip,gzip,zcat} $(1)/usr/bin/
 endef

--- a/utils/input-utils/Makefile
+++ b/utils/input-utils/Makefile
@@ -27,8 +27,6 @@
 endef
 
 define Build/Compile
-	rm -rf $(PKG_INSTALL_DIR)
-	mkdir -p $(PKG_INSTALL_DIR)
 	$(MAKE) -C "$(PKG_BUILD_DIR)" \
 		$(TARGET_CONFIGURE_OPTS) \
 		CFLAGS="$(TARGET_CFLAGS)" \

--- a/utils/io/Makefile
+++ b/utils/io/Makefile
@@ -27,7 +27,7 @@
 endef
 
 define Build/Prepare
-	mkdir -p $(PKG_BUILD_DIR)
+	$(INSTALL_DIR) $(PKG_BUILD_DIR)
 	$(CP) ./src/* $(PKG_BUILD_DIR)/
 endef
 

--- a/utils/lcd4linux/Makefile
+++ b/utils/lcd4linux/Makefile
@@ -18,7 +18,8 @@
 PKG_SOURCE_VERSION:=$(PKG_REV)
 PKG_SOURCE_PROTO:=svn
 
-PKG_FIXUP = libtool
+PKG_FIXUP:=libtool
+PKG_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -222,10 +223,6 @@
 	--with-plugins="$(strip $(LCD4LINUX_CONFIGURE_PLUGINS))" \
 
 
-define Build/Compile
-	$(MAKE) -C $(PKG_BUILD_DIR) DESTDIR="$(PKG_INSTALL_DIR)" all install
-endef
-
 define Package/lcd4linux/install
 	$(INSTALL_DIR) $(1)/usr/bin
 	$(INSTALL_BIN) $(PKG_BUILD_DIR)/$(PKG_NAME) $(1)/usr/bin/

--- a/utils/lrzsz/Makefile
+++ b/utils/lrzsz/Makefile
@@ -14,6 +14,8 @@
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://www.ohse.de/uwe/releases/
 PKG_MD5SUM:=b5ce6a74abc9b9eb2af94dffdfd372a4
+
+PKG_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -33,13 +35,7 @@
 
 # uses GNU configure
 
-define Build/Compile	
-	$(MAKE) -C $(PKG_BUILD_DIR) \
-		DESTDIR="$(PKG_INSTALL_DIR)" \
-		all install
-endef
-
-define Package/lrzsz/install	
+define Package/lrzsz/install
 	$(INSTALL_DIR) $(1)/usr/bin
 	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/lrz $(1)/usr/bin/
 	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/lsz $(1)/usr/bin/

--- a/utils/macchanger/Makefile
+++ b/utils/macchanger/Makefile
@@ -15,6 +15,8 @@
 PKG_SOURCE_URL:=@GNU/macchanger
 PKG_MD5SUM:=79b7cdaeca3d8ebafa764c4b0dd03ab7
 
+PKG_INSTALL:=1
+
 include $(INCLUDE_DIR)/package.mk
 
 define Package/macchanger
@@ -29,13 +31,7 @@
 	of network interfaces.
 endef
 
-define Build/Compile	
-	$(MAKE) -C $(PKG_BUILD_DIR) \
-		DESTDIR="$(PKG_INSTALL_DIR)" \
-		all install
-endef
-
-define Package/macchanger/install	
+define Package/macchanger/install
 	$(INSTALL_DIR) $(1)/usr/bin
 	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/macchanger $(1)/usr/bin/
 	$(INSTALL_DIR) $(1)/usr/share

--- a/utils/owfs/Makefile
+++ b/utils/owfs/Makefile
@@ -13,7 +13,9 @@
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=@SF/$(PKG_NAME)
 PKG_MD5SUM:=8aea6f3bb0dc9fdb52ed3f0e9d84fa79
-PKG_FIXUP = libtool
+
+PKG_FIXUP:=libtool
+PKG_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -194,25 +196,19 @@
 		$(TARGET_CONFIGURE_OPTS) \
 		CFLAGS="$(TARGET_CFLAGS)" \
 		CPPFLAGS="$(TARGET_CPPFLAGS)" \
-		LDFLAGS="$(TARGET_LDFLAGS)" \
-		lt_sys_lib_dlsearch_path_spec="$(STAGING_DIR)/lib $(STAGING_DIR)/usr/lib" \
-		lt_sys_lib_search_path_spec="$(STAGING_DIR)/lib $(STAGING_DIR)/usr/lib" \
+		LDFLAGS="$(TARGET_LDFLAGS) -Wl,-rpath-link=$(STAGING_DIR)/usr/lib -Wl,-rpath-link=$(TOOLCHAIN_DIR)/usr/lib" \
+		lt_cv_sys_lib_dlsearch_path_spec="$(STAGING_DIR)/lib $(STAGING_DIR)/usr/lib" \
+		lt_cv_sys_lib_search_path_spec="$(STAGING_DIR)/lib $(STAGING_DIR)/usr/lib" \
 		shrext_cmds=".so" \
 		./configure \
 			$(CONFIGURE_ARGS) \
 	);
 endef
 
-define Build/Compile
-	$(MAKE) -C $(PKG_BUILD_DIR) \
-		DESTDIR="$(PKG_INSTALL_DIR)" \
-		all install
-endef
-
 define Build/InstallDev
-	mkdir -p $(STAGING_DIR)/usr/include
+	$(INSTALL_DIR) $(STAGING_DIR)/usr/include
 	$(CP)	$(PKG_INSTALL_DIR)/usr/include/{owcapi,owfs_config}.h $(STAGING_DIR)/usr/include/
-	mkdir -p $(STAGING_DIR)/usr/lib
+	$(INSTALL_DIR) $(STAGING_DIR)/usr/lib
 	$(CP)	$(PKG_INSTALL_DIR)/usr/lib/libow-*.so* $(PKG_INSTALL_DIR)/usr/lib/libowcapi-*.so* $(STAGING_DIR)/usr/lib/
 endef
 

--- a/utils/pcmciautils/Makefile
+++ b/utils/pcmciautils/Makefile
@@ -26,8 +26,6 @@
 endef
 
 define Build/Compile
-	rm -rf "$(PKG_INSTALL_DIR)"
-	mkdir -p "$(PKG_INSTALL_DIR)"
 	$(call Build/Compile/Default, \
 		LD="$(TARGET_CC)" UDEV=false \
 		CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS) \

--- a/utils/pipacs/Makefile
+++ b/utils/pipacs/Makefile
@@ -20,19 +20,18 @@
   TITLE:=UNIX socket accounting/wiewer program
 endef
 
-define Build/Prepare	
-	mkdir -p $(PKG_BUILD_DIR)
+define Build/Prepare
 	$(CP) ./src/* $(PKG_BUILD_DIR)
 endef
 
-define Build/Compile	
+define Build/Compile
 	$(MAKE) -C $(PKG_BUILD_DIR) \
 		$(TARGET_CONFIGURE_OPTS) \
 		CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" \
 		all
 endef
 
-define Package/pipacs/install	
+define Package/pipacs/install
 	$(INSTALL_DIR) $(1)/usr/bin
 	$(INSTALL_BIN) $(PKG_BUILD_DIR)/pipacs $(1)/usr/bin/
 endef

--- a/utils/reiserfsprogs/Makefile
+++ b/utils/reiserfsprogs/Makefile
@@ -16,6 +16,7 @@
 PKG_MD5SUM:=bc00c7c4e047902575dc4e1c64ab3ba4
 
 PKG_FIXUP:=libtool
+PKG_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -32,12 +33,6 @@
 	resize, and debug ReiserFS filesystems.
 endef
 
-define Build/Compile
-	$(MAKE) -C $(PKG_BUILD_DIR) \
-		DESTDIR="$(PKG_INSTALL_DIR)" \
-		all install
-endef
-
 define Package/reiserfsprogs/install
 	$(INSTALL_DIR) $(1)/usr/sbin
 	$(INSTALL_BIN) $(foreach bin,debugreiserfs mkreiserfs reiserfsck reiserfstune resize_reiserfs,$(PKG_INSTALL_DIR)/usr/sbin/$(bin)) $(1)/usr/sbin/

--- a/utils/rrdcollect/Makefile
+++ b/utils/rrdcollect/Makefile
@@ -14,6 +14,8 @@
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=@SF/rrdcollect
 PKG_MD5SUM:=fd7ac95195e3e5cbab0677629505d9be
+
+PKG_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -72,18 +74,12 @@
 CONFIGURE_VARS+= \
 	CFLAGS="$(TARGET_CFLAGS) -DSOCKET_COMM" \
 
-define Build/Compile	
-	$(MAKE) -C $(PKG_BUILD_DIR) \
-		DESTDIR="$(PKG_INSTALL_DIR)" \
-		all install
-endef
-
-define Package/rrdcollect/install	
+define Package/rrdcollect/install
 	$(INSTALL_DIR) $(1)/usr/sbin
 	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/rrdcollect $(1)/usr/sbin/
 endef
 
-define Package/rrdcollect-example/install	
+define Package/rrdcollect-example/install
 	$(INSTALL_DIR) $(1)/etc
 	$(INSTALL_DATA) ./files/rrd.conf $(1)/etc/
 	$(INSTALL_DATA) ./files/rrdcollect.conf $(1)/etc/

--- a/utils/rrdtool/Makefile
+++ b/utils/rrdtool/Makefile
@@ -21,7 +21,8 @@
 	CONFIG_PACKAGE_python-rrd \
 	CONFIG_PACKAGE_rrdcgi \
 
-PKG_FIXUP = libtool
+PKG_FIXUP:=libtool
+PKG_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
 -include $(if $(DUMP),,$(STAGING_DIR)/mk/python-package.mk)
@@ -96,7 +97,7 @@
 
 define Build/Compile
 	$(if $(Build/Compile/PyMod),,@echo Python packaging code not found.; false)
-	$(MAKE) -C $(PKG_BUILD_DIR) DESTDIR="$(PKG_INSTALL_DIR)" all install
+	$(call Build/Compile/Default)
 endef
 
 define Build/InstallDev

--- a/utils/sane-backends/Makefile
+++ b/utils/sane-backends/Makefile
@@ -14,6 +14,8 @@
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=ftp://ftp.sane-project.org/pub/sane/$(PKG_NAME)-$(PKG_VERSION)/
 PKG_MD5SUM:=a0cfdfdebca2feb4f2ba5d3418b15a42
+
+PKG_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -81,12 +83,6 @@
 	$(Build/Configure/Default)
 endef
 
-define Build/Compile
-	$(MAKE) -C $(PKG_BUILD_DIR) \
-		DESTDIR="$(PKG_INSTALL_DIR)" \
-		all install
-endef
-
 define Package/sane-backends/conffiles
 /etc/sane.d/saned.conf
 endef

--- a/utils/sysfsutils/Makefile
+++ b/utils/sysfsutils/Makefile
@@ -15,6 +15,8 @@
 PKG_SOURCE_URL:=@SF/linux-diag
 PKG_MD5SUM:=14e7dcd0436d2f49aa403f67e1ef7ddc
 
+PKG_INSTALL:=1
+
 include $(INCLUDE_DIR)/package.mk
 
 define Package/sysfsutils
@@ -24,18 +26,6 @@
   DEPENDS:=@LINUX_2_6
   TITLE:=sysfs Utilities
   URL:=http://linux-diag.sourceforge.net/Sysfsutils.html
-endef
-
-define Build/Configure
-	$(call Build/Configure/Default)
-endef
-
-define Build/Compile
-	$(MAKE) -C "$(PKG_BUILD_DIR)" \
-		$(TARGET_CONFIGURE_OPTS) \
-		CFLAGS="$(TARGET_CFLAGS)" \
-		DESTDIR="$(PKG_INSTALL_DIR)" \
-		all install
 endef
 
 define Build/InstallDev

--- a/utils/testusb/Makefile
+++ b/utils/testusb/Makefile
@@ -28,7 +28,6 @@
 endef
 
 define Build/Prepare
-	mkdir -p $(PKG_BUILD_DIR)
 	$(CP) ./src/* $(PKG_BUILD_DIR)/
 endef
 

--- a/utils/ucmb-tools/Makefile
+++ b/utils/ucmb-tools/Makefile
@@ -24,7 +24,6 @@
 endef
 
 define Build/Prepare
-	mkdir -p $(PKG_BUILD_DIR)
 	$(CP) ./tools/* $(PKG_BUILD_DIR)/
 endef
 

--- a/utils/ucmb/Makefile
+++ b/utils/ucmb/Makefile
@@ -42,7 +42,6 @@
 endef
 
 define Build/Prepare
-	mkdir -p $(PKG_BUILD_DIR)
 	$(CP) ./driver/* $(PKG_BUILD_DIR)/
 endef
 

--- a/utils/usbutils/Makefile
+++ b/utils/usbutils/Makefile
@@ -14,6 +14,8 @@
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=@SF/linux-usb
 PKG_MD5SUM:=34979f675d2bcb3e1b45012fa830a53f
+
+PKG_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -33,12 +35,6 @@
 
 # uses GNU configure
 
-define Build/Compile
-	$(MAKE) -C $(PKG_BUILD_DIR) \
-		DESTDIR="$(PKG_INSTALL_DIR)" \
-		all install
-endef
-
 define Package/usbutils/install
 	$(INSTALL_DIR) $(1)/usr/bin
 	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/usb-devices $(1)/usr/bin/

--- a/utils/wx200d/Makefile
+++ b/utils/wx200d/Makefile
@@ -14,6 +14,8 @@
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=@SF/wx200d
 PKG_MD5SUM:=0f90c099dddcdd46ac568d707822ec4c
+
+PKG_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -33,13 +35,7 @@
 
 # uses GNU configure
 
-define Build/Compile
-	$(MAKE) -C $(PKG_BUILD_DIR) \
-		DESTDIR="$(PKG_INSTALL_DIR)" \
-		all install
-endef
-
-define Package/wx200d/install	
+define Package/wx200d/install
 	$(INSTALL_DIR) $(1)/usr/bin
 	$(CP)	$(PKG_INSTALL_DIR)/usr/bin/wx200 \
 		$(PKG_INSTALL_DIR)/usr/bin/wxstdout \

comments