From 50f8b80f2abf4e7fd0572500af064cb5ce25fba6 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Wed, 1 Sep 2010 17:04:32 +0200 Subject: [PATCH 01/74] bind: remove old-style hook usage and step override Signed-off-by: Thomas Petazzoni --- package/bind/bind.mk | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/package/bind/bind.mk b/package/bind/bind.mk index e57f26707b..8e4867a504 100644 --- a/package/bind/bind.mk +++ b/package/bind/bind.mk @@ -27,21 +27,26 @@ BIND_CONF_OPT = \ --disable-epoll \ --disable-threads -$(eval $(call AUTOTARGETS,package,bind)) - -$(BIND_HOOK_POST_INSTALL): +define BIND_TARGET_INSTALL_FIXES rm -f $(TARGET_DIR)/usr/bin/isc-config.sh -ifneq ($(BR2_PACKAGE_BIND_TOOLS),y) - rm -rf $(addprefix $(TARGET_DIR)/usr/bin/, $(BIND_TARGET_BINS)) -endif $(INSTALL) -m 0755 -D package/bind/bind.sysvinit $(TARGET_DIR)/etc/init.d/S81named - touch $@ +endef -$(BIND_TARGET_UNINSTALL): - $(call MESSAGE,"Uninstalling") +BIND_POST_INSTALL_TARGET_HOOKS += BIND_TARGET_INSTALL_FIXES + +define BIND_TARGET_REMOVE_TOOLS + rm -rf $(addprefix $(TARGET_DIR)/usr/bin/, $(BIND_TARGET_BINS)) +endef + +ifneq ($(BR2_PACKAGE_BIND_TOOLS),y) +BIND_POST_INSTALL_TARGET_HOOKS += BIND_TARGET_REMOVE_TOOLS +endif + +define BIND_UNINSTALL_TARGET_CMDS rm -rf $(addprefix $(TARGET_DIR)/usr/sbin/, $(BIND_TARGET_SBINS)) rm -rf $(addprefix $(TARGET_DIR)/usr/bin/, $(BIND_TARGET_BINS)) rm -rf $(addprefix $(TARGET_DIR)/usr/lib/, $(BIND_TARGET_LIBS)) rm -f $(TARGET_DIR)/etc/init.d/S81named - rm -f $(BIND_TARGET_INSTALL_TARGET) $(BIND_HOOK_POST_INSTALL) +endef +$(eval $(call AUTOTARGETS,package,bind)) From 428b533655e3f134b5cfeb40948360eab968d50c Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Wed, 1 Sep 2010 17:05:29 +0200 Subject: [PATCH 02/74] libglade: convert old-style hook to new-style hook Signed-off-by: Thomas Petazzoni --- package/libglade/libglade.mk | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/package/libglade/libglade.mk b/package/libglade/libglade.mk index 31a579e0dc..67e621b346 100644 --- a/package/libglade/libglade.mk +++ b/package/libglade/libglade.mk @@ -9,9 +9,11 @@ LIBGLADE_SITE = http://ftp.gnome.org/pub/GNOME/sources/libglade/2.6/ LIBGLADE_INSTALL_STAGING = YES LIBGLADE_DEPENDENCIES = host-pkg-config libglib2 libgtk2 atk libxml2 -$(eval $(call AUTOTARGETS,package,libglade)) - -$(LIBGLADE_HOOK_POST_INSTALL): +define LIBGLADE_INSTALL_FIX rm -rf $(TARGET_DIR)/usr/share/xml/libglade \ $(TARGET_DIR)/usr/bin/libglade-convert - touch $@ +endef + +LIBGLADE_POST_INSTALL_TARGET_HOOKS += LIBGLADE_INSTALL_FIX + +$(eval $(call AUTOTARGETS,package,libglade)) From d1b11c16f0620d426a36bf4e10f5bc8ce4d33040 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Wed, 1 Sep 2010 17:06:45 +0200 Subject: [PATCH 03/74] tn5250: remove old-style hook usage and step override Signed-off-by: Thomas Petazzoni --- package/tn5250/tn5250.mk | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/package/tn5250/tn5250.mk b/package/tn5250/tn5250.mk index ac9c1f1fba..63c6c6c76c 100644 --- a/package/tn5250/tn5250.mk +++ b/package/tn5250/tn5250.mk @@ -16,16 +16,17 @@ else TN5250_CONF_OPT += --without-ssl endif -$(eval $(call AUTOTARGETS,package,tn5250)) - -$(TN5250_HOOK_POST_INSTALL): +define TN5250_INSTALL_FIXES rm -f $(TARGET_DIR)/usr/bin/5250keys rm -f $(TARGET_DIR)/usr/bin/xt5250 - touch $@ +endef -$(TN5250_TARGET_UNINSTALL): - $(call MESSAGE,"Uninstalling") +TN5250_POST_INSTALL_TARGET_HOOKS += TN5250_INSTALL_FIXES + +define TN5250_UNINSTALL_TARGET_CMDS $(MAKE) DESTDIR=$(TARGET_DIR) uninstall -C $(TN5250_DIR) rm -f $(TARGET_DIR)/usr/lib/lib5250.* rm -rf $(TARGET_DIR)/usr/share/tn5250 - rm -f $(TN5250_TARGET_INSTALL_TARGET) $(TN5250_HOOK_POST_INSTALL) +endef + +$(eval $(call AUTOTARGETS,package,tn5250)) From 28025091919e3e0dfb99a39e9f6afde46764b8ab Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Wed, 1 Sep 2010 17:10:57 +0200 Subject: [PATCH 04/74] avahi: convert old-style hook to new-style hook Signed-off-by: Thomas Petazzoni --- package/avahi/avahi.mk | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/package/avahi/avahi.mk b/package/avahi/avahi.mk index 8e2d14f6e0..e1bebd9149 100644 --- a/package/avahi/avahi.mk +++ b/package/avahi/avahi.mk @@ -137,19 +137,31 @@ AVAHI_DEPENDENCIES += libintl AVAHI_MAKE_OPT = LIBS=-lintl endif -$(eval $(call AUTOTARGETS,package,avahi)) - -$(AVAHI_HOOK_POST_INSTALL): +define AVAHI_REMOVE_INITSCRIPT rm -rf $(TARGET_DIR)/etc/init.d/avahi-* -ifeq ($(BR2_PACKAGE_AVAHI_AUTOIPD),y) +endef + +AVAHI_POST_INSTALL_TARGET_HOOKS += AVAHI_REMOVE_INITSCRIPT + +define AVAHI_INSTALL_AUTOIPD rm -rf $(TARGET_DIR)/etc/dhcp3/ $(INSTALL) -D -m 0755 package/avahi/busybox-udhcpc-default.script $(TARGET_DIR)/usr/share/udhcpc/default.script $(INSTALL) -m 0755 package/avahi/S05avahi-setup.sh $(TARGET_DIR)/etc/init.d/ rm -f $(TARGET_DIR)/var/lib/avahi-autoipd $(INSTALL) -d -m 0755 $(TARGET_DIR)/var/lib ln -sf /tmp/avahi-autoipd $(TARGET_DIR)/var/lib/avahi-autoipd +endef + +ifeq ($(BR2_PACKAGE_AVAHI_AUTOIPD),y) +AVAHI_POST_INSTALL_TARGET_HOOKS += AVAHI_INSTALL_AUTOIPD endif -ifeq ($(BR2_PACKAGE_AVAHI_DAEMON),y) + +define AVAHI_INSTALL_DAEMON_INITSCRIPT $(INSTALL) -m 0755 package/avahi/S50avahi-daemon $(TARGET_DIR)/etc/init.d/ +endef + +ifeq ($(BR2_PACKAGE_AVAHI_DAEMON),y) +AVAHI_POST_INSTALL_TARGET_HOOKS += AVAHI_INSTALL_DAEMON_INITSCRIPT endif - touch $@ + +$(eval $(call AUTOTARGETS,package,avahi)) From 90710e0c228c29a9e871db331dd84524c9e510ea Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Wed, 1 Sep 2010 17:11:51 +0200 Subject: [PATCH 05/74] libungif: convert old-style hook to new-style hook Signed-off-by: Thomas Petazzoni --- package/libungif/libungif.mk | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/package/libungif/libungif.mk b/package/libungif/libungif.mk index 466a72c23d..d8dc814e4e 100644 --- a/package/libungif/libungif.mk +++ b/package/libungif/libungif.mk @@ -17,8 +17,10 @@ LIBUNGIF_BINS = gif2epsn gif2ps gif2rgb gif2x11 gifasm gifbg gifburst gifclip \ gifrsize gifspnge giftext gifwedge icon2gif raw2gif rgb2gif \ text2gif -$(eval $(call AUTOTARGETS,package,libungif)) - -$(LIBUNGIF_HOOK_POST_INSTALL): +define LIBUNGIF_BINS_CLEANUP rm -f $(addprefix $(TARGET_DIR)/usr/bin/,$(LIBUNGIF_BINS)) - touch $@ +endef + +LIBUNGIF_POST_INSTALL_TARGET_HOOKS += LIBUNGIF_BINS_CLEANUP + +$(eval $(call AUTOTARGETS,package,libungif)) From 1c8e89f4ce9a13fb1050426e3f31a3e23598b125 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Wed, 1 Sep 2010 17:12:49 +0200 Subject: [PATCH 06/74] libxslt: convert old-style hook to new-style hook Signed-off-by: Thomas Petazzoni --- package/libxslt/libxslt.mk | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/package/libxslt/libxslt.mk b/package/libxslt/libxslt.mk index e77663df20..5437e2988e 100644 --- a/package/libxslt/libxslt.mk +++ b/package/libxslt/libxslt.mk @@ -32,12 +32,13 @@ HOST_LIBXSLT_CONF_OPT = --enable-shared \ HOST_LIBXSLT_DEPENDENCIES = host-libxml2 -$(eval $(call AUTOTARGETS,package,libxslt)) -$(eval $(call AUTOTARGETS,package,libxslt,host)) - -$(LIBXSLT_HOOK_POST_INSTALL): +define LIBXSLT_XSLT_CONFIG_FIXUP $(SED) "s,^prefix=.*,prefix=\'$(STAGING_DIR)/usr\',g" $(STAGING_DIR)/usr/bin/xslt-config $(SED) "s,^exec_prefix=.*,exec_prefix=\'$(STAGING_DIR)/usr\',g" $(STAGING_DIR)/usr/bin/xslt-config $(SED) "s,^includedir=.*,includedir=\'$(STAGING_DIR)/usr/include\',g" $(STAGING_DIR)/usr/bin/xslt-config - touch $@ +endef +LIBXSLT_POST_INSTALL_STAGING_HOOKS += LIBXSLT_XSLT_CONFIG_FIXUP + +$(eval $(call AUTOTARGETS,package,libxslt)) +$(eval $(call AUTOTARGETS,package,libxslt,host)) From 3c6985d309a37217196877bc87a84967ad2dd213 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Wed, 1 Sep 2010 17:13:56 +0200 Subject: [PATCH 07/74] libevent: convert old-style hook to new-style hook Signed-off-by: Thomas Petazzoni --- package/libevent/libevent.mk | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/package/libevent/libevent.mk b/package/libevent/libevent.mk index f71bf9a113..4df6270875 100644 --- a/package/libevent/libevent.mk +++ b/package/libevent/libevent.mk @@ -12,12 +12,14 @@ LIBEVENT_LIBTOOL_PATCH = NO LIBEVENT_INSTALL_STAGING = YES LIBEVENT_INSTALL_TARGET = YES -$(eval $(call AUTOTARGETS,package,libevent)) - -ifneq ($(BR2_PACKAGE_PYTHON),y) -# libevent installs a python script to target - get rid of it if -# we don't have python support enabled -$(LIBEVENT_HOOK_POST_INSTALL): +define LIBEVENT_REMOVE_PYSCRIPT rm $(TARGET_DIR)/usr/bin/event_rpcgen.py - touch $@ +endef + +# libevent installs a python script to target - get rid of it if we +# don't have python support enabled +ifneq ($(BR2_PACKAGE_PYTHON),y) +LIBEVENT_POST_INSTALL_TARGET_HOOKS += LIBEVENT_REMOVE_PYSCRIPT endif + +$(eval $(call AUTOTARGETS,package,libevent)) From e3077bc8225ef10361f1b81b93d3eafc35bd2e55 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Wed, 1 Sep 2010 17:16:19 +0200 Subject: [PATCH 08/74] taglib: convert old-style hook to new-style hook Signed-off-by: Thomas Petazzoni --- package/multimedia/taglib/taglib.mk | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/package/multimedia/taglib/taglib.mk b/package/multimedia/taglib/taglib.mk index 2620b971a4..e5433a42bb 100644 --- a/package/multimedia/taglib/taglib.mk +++ b/package/multimedia/taglib/taglib.mk @@ -16,10 +16,12 @@ TAGLIB_CONF_ENV = \ TAGLIB_CONF_OPT = --disable-libsuffix --program-prefix='' -$(eval $(call AUTOTARGETS,package/multimedia,taglib)) +define TAGLIB_REMOVE_DEVFILE + rm -f $(TARGET_DIR)/usr/bin/taglib-config +endef ifneq ($(BR2_HAVE_DEVFILES),y) -$(TAGLIB_HOOK_POST_INSTALL): - rm -f $(TARGET_DIR)/usr/bin/taglib-config - touch $@ +TAGLIB_POST_INSTALL_TARGET_HOOKS += TAGLIB_REMOVE_DEVFILE endif + +$(eval $(call AUTOTARGETS,package/multimedia,taglib)) From 918978d4ad82f9c4caaad30ec8fbcd8db0171f57 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Wed, 1 Sep 2010 17:17:04 +0200 Subject: [PATCH 09/74] pango: convert old-style hook to new-style hook Signed-off-by: Thomas Petazzoni --- package/pango/pango.mk | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/package/pango/pango.mk b/package/pango/pango.mk index 875c0bc4f9..dc04b5553f 100644 --- a/package/pango/pango.mk +++ b/package/pango/pango.mk @@ -54,8 +54,10 @@ else PANGO_CONF_OPT += --without-x endif -$(eval $(call AUTOTARGETS,package,pango)) - -$(PANGO_HOOK_POST_INSTALL): +define PANGO_INSTALL_INITSCRIPT $(INSTALL) -m 755 package/pango/S25pango $(TARGET_DIR)/etc/init.d/ - touch $@ +endef + +PANGO_POST_INSTALL_TARGET_HOOKS += PANGO_INSTALL_INITSCRIPT + +$(eval $(call AUTOTARGETS,package,pango)) From e8ba6a5119ce025c351380a942f3a399d78fb9a7 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Wed, 1 Sep 2010 17:20:28 +0200 Subject: [PATCH 10/74] samba: convert old-style hooks to new-style hooks Signed-off-by: Thomas Petazzoni --- package/samba/samba.mk | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/package/samba/samba.mk b/package/samba/samba.mk index 44f7fdeff1..141c690bac 100644 --- a/package/samba/samba.mk +++ b/package/samba/samba.mk @@ -85,9 +85,6 @@ SAMBA_UNINSTALL_TARGET_OPT = \ $(if $(BR2_PACKAGE_SAMBA_SWAT),uninstallswat) -$(eval $(call AUTOTARGETS,package,samba)) - - # binaries to keep SAMBA_BINTARGETS_y = \ usr/sbin/smbd \ @@ -155,14 +152,14 @@ SAMBA_TXTTARGETS_ = \ SAMBA_TXTTARGETS_$(BR2_PACKAGE_SAMBA_FINDSMB) += usr/bin/findsmb SAMBA_TXTTARGETS_$(BR2_PACKAGE_SAMBA_SMBTAR) += usr/bin/smbtar - -$(SAMBA_HOOK_POST_INSTALL): - $(call MESSAGE,"Post installing") - # remove unneeded +define SAMBA_REMOVE_UNNEEDED_BINARIES rm -f $(addprefix $(TARGET_DIR)/, $(SAMBA_BINTARGETS_)) rm -f $(addprefix $(TARGET_DIR)/, $(SAMBA_TXTTARGETS_)) -ifeq ($(BR2_PACKAGE_SAMBA_SWAT),y) -ifneq ($(BR2_HAVE_DOCUMENTATION),y) +endef + +SAMBA_POST_INSTALL_TARGET_HOOKS += SAMBA_REMOVE_UNNEEDED_BINARIES + +define SAMBA_REMOVE_SWAT_DOCUMENTATION # Remove the documentation rm -rf $(TARGET_DIR)/usr/swat/help/manpages rm -rf $(TARGET_DIR)/usr/swat/help/Samba3* @@ -170,10 +167,15 @@ ifneq ($(BR2_HAVE_DOCUMENTATION),y) # Removing the welcome.html file will make swat default to # welcome-no-samba-doc.html rm -rf $(TARGET_DIR)/usr/swat/help/welcome.html +endef + +ifeq ($(BR2_PACKAGE_SAMBA_SWAT),y) +ifneq ($(BR2_HAVE_DOCUMENTATION),y) +SAMBA_POST_INSTALL_TARGET_HOOKS += SAMBA_REMOVE_SWAT_DOCUMENTATION endif endif - # strip binaries - $(STRIPCMD) $(STRIP_STRIP_ALL) $(addprefix $(TARGET_DIR)/, $(SAMBA_BINTARGETS_y)) + +define SAMBA_INSTALL_INITSCRIPTS_CONFIG # install start/stop script @if [ ! -f $(TARGET_DIR)/etc/init.d/S91smb ]; then \ $(INSTALL) -m 0755 -D package/samba/S91smb $(TARGET_DIR)/etc/init.d/S91smb; \ @@ -182,5 +184,8 @@ endif @if [ ! -f $(TARGET_DIR)/etc/samba/smb.conf ]; then \ $(INSTALL) -m 0755 -D package/samba/simple.conf $(TARGET_DIR)/etc/samba/smb.conf; \ fi - $(Q)touch $@ +endef +SAMBA_POST_INSTALL_TARGET_HOOKS += SAMBA_INSTALL_INITSCRIPTS_CONFIG + +$(eval $(call AUTOTARGETS,package,samba)) From c692a3e44348b70153210733bd7d0c82028f8973 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Wed, 1 Sep 2010 17:21:27 +0200 Subject: [PATCH 11/74] php: convert old-style hooks to new-style hooks Signed-off-by: Thomas Petazzoni --- package/php/php.mk | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/package/php/php.mk b/package/php/php.mk index 9396311ef5..68b0b5fc9f 100644 --- a/package/php/php.mk +++ b/package/php/php.mk @@ -166,23 +166,26 @@ ifeq ($(BR2_PACKAGE_PHP_EXT_PDO_MYSQL),y) endif endif -$(eval $(call AUTOTARGETS,package,php)) - -$(PHP_HOOK_POST_INSTALL): +define PHP_INSTALL_FIXUP rm -rf $(TARGET_DIR)/usr/lib/php rm -f $(TARGET_DIR)/usr/bin/phpize rm -f $(TARGET_DIR)/usr/bin/php-config if [ ! -f $(TARGET_DIR)/etc/php.ini ]; then \ $(INSTALL) -m 0755 $(BR2_PACKAGE_PHP_CONFIG) $(TARGET_DIR)/etc/php.ini; fi - touch $@ +endef -$(PHP_TARGET_UNINSTALL): - $(call MESSAGE,"Uninstalling") +PHP_POST_INSTALL_TARGET_HOOKS += PHP_INSTALL_FIXUP + +define PHP_UNINSTALL_STAGING_CMDS rm -rf $(STAGING_DIR)/usr/include/php rm -rf $(STAGING_DIR)/usr/lib/php rm -f $(STAGING_DIR)/usr/bin/php* rm -f $(STAGING_DIR)/usr/share/man/man1/php*.1 +endef + +define PHP_UNINSTALL_TARGET_CMDS rm -f $(TARGET_DIR)/etc/php.ini rm -f $(TARGET_DIR)/usr/bin/php* - rm -f $(PHP_TARGET_INSTALL_TARGET) $(PHP_HOOK_POST_INSTALL) +endef +$(eval $(call AUTOTARGETS,package,php)) From 26d0bb8b11ecef1273a2cc95f0197f65dc7b3a62 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Wed, 1 Sep 2010 17:23:36 +0200 Subject: [PATCH 12/74] libidn: convert old-style hooks to new-style hooks Signed-off-by: Thomas Petazzoni --- package/libidn/libidn.mk | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/package/libidn/libidn.mk b/package/libidn/libidn.mk index 79e03211db..1627c96ecc 100644 --- a/package/libidn/libidn.mk +++ b/package/libidn/libidn.mk @@ -13,17 +13,23 @@ LIBIDN_CONF_OPT = --enable-shared --disable-java --enable-csharp=no LIBIDN_LIBTOOL_PATCH = NO LIBIDN_DEPENDENCIES = host-pkg-config $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext) $(if $(BR2_PACKAGE_LIBICONV),libiconv) -$(eval $(call AUTOTARGETS,package,libidn)) - -$(LIBIDN_HOOK_POST_INSTALL): -ifneq ($(BR2_PACKAGE_LIBIDN_BINARY),y) +define LIBIDN_REMOVE_BINARY rm -f $(TARGET_DIR)/usr/bin/idn -endif - rm -rf $(TARGET_DIR)/usr/share/emacs - touch $@ +endef -$(LIBIDN_TARGET_UNINSTALL): - $(call MESSAGE,"Uninstalling") +ifneq ($(BR2_PACKAGE_LIBIDN_BINARY),y) +LIBIDN_POST_INSTALL_TARGET_HOOKS += LIBIDN_REMOVE_BINARY +endif + +define LIBIDN_REMOVE_EMACS_STUFF + rm -rf $(TARGET_DIR)/usr/share/emacs +endef + +LIBIDN_POST_INSTALL_TARGET_HOOKS += LIBIDN_REMOVE_EMACS_STUFF + +define LIBIDN_UNINSTALL_TARGET_CMDS rm -f $(TARGET_DIR)/usr/lib/libidn* rm -f $(TARGET_DIR)/usr/bin/idn - rm -f $(LIBIDN_TARGET_INSTALL_TARGET) $(LIBIDN_HOOK_POST_INSTALL) +endef + +$(eval $(call AUTOTARGETS,package,libidn)) From 0f5fae2a69b399a81bbef3d8467468f466f2c0ef Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Wed, 1 Sep 2010 17:27:01 +0200 Subject: [PATCH 13/74] jpeg: convert old-style hooks to new-style hooks Signed-off-by: Thomas Petazzoni --- package/jpeg/jpeg.mk | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/package/jpeg/jpeg.mk b/package/jpeg/jpeg.mk index c3754d4b63..9a4512cd2a 100644 --- a/package/jpeg/jpeg.mk +++ b/package/jpeg/jpeg.mk @@ -29,8 +29,10 @@ JPEG_INSTALL_TARGET_OPT = DESTDIR=$(TARGET_DIR) install JPEG_LIBTOOL_PATCH = NO JPEG_CONF_OPT = --without-x --enable-shared --enable-static -$(eval $(call AUTOTARGETS,package,jpeg)) - -$(JPEG_HOOK_POST_INSTALL): +define JPEG_REMOVE_USELESS_TOOLS rm -f $(addprefix $(TARGET_DIR)/usr/bin/,cjpeg djpeg jpegtrans rdjpgcom wrjpgcom) - touch $@ +endef + +JPEG_POST_INSTALL_TARGET_HOOKS += JPEG_REMOVE_USELESS_TOOLS + +$(eval $(call AUTOTARGETS,package,jpeg)) From 3d595a601606534bac4db9dd8ff0e9ca22beeafd Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Wed, 1 Sep 2010 17:28:37 +0200 Subject: [PATCH 14/74] sdl_sound: convert old-style hooks to new-style hooks Signed-off-by: Thomas Petazzoni --- package/sdl_sound/sdl_sound.mk | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/package/sdl_sound/sdl_sound.mk b/package/sdl_sound/sdl_sound.mk index 3a6b7e7420..9234ab6905 100644 --- a/package/sdl_sound/sdl_sound.mk +++ b/package/sdl_sound/sdl_sound.mk @@ -41,20 +41,23 @@ else SDL_SOUND_CONF_OPT += --disable-mmx endif -$(eval $(call AUTOTARGETS,package,sdl_sound)) +define SDL_SOUND_REMOVE_PLAYSOUND + rm $(addprefix $(TARGET_DIR)/usr/bin/,playsound playsound_simple) +endef ifneq ($(BR2_PACKAGE_SDL_SOUND_PLAYSOUND),y) -$(SDL_SOUND_HOOK_POST_INSTALL): - rm $(addprefix $(TARGET_DIR)/usr/bin/,playsound playsound_simple) - touch $@ +SDL_SOUND_POST_INSTALL_TARGET_HOOKS += SDL_SOUND_REMOVE_PLAYSOUND endif -# target shared libs doesn't get removed by make uninstall if the .la files -# are removed (E.G. if BR2_HAVE_DEVFILES isn't set) -$(SDL_SOUND_TARGET_UNINSTALL): - $(call MESSAGE,"Uninstalling") +define SDL_SOUND_UNINSTALL_STAGING_CMDS $(MAKE) DESTDIR=$(STAGING_DIR) uninstall -C $(@D)/$(SDL_SOUND_SUBDIR) - rm -f $(@D)/.stamp_staging_installed +endef + +# target shared libs doesn't get removed by make uninstall if the .la +# files are removed (E.G. if BR2_HAVE_DEVFILES isn't set) +define SDL_SOUND_UNINSTALL_TARGET_CMDS $(MAKE) DESTDIR=$(TARGET_DIR) uninstall -C $(@D)/$(SDL_SOUND_SUBDIR) rm -f $(TARGET_DIR)/usr/lib/libSDL_sound*so* - rm -f $(SDL_SOUND_TARGET_INSTALL_TARGET) $(SDL_SOUND_HOOK_POST_INSTALL) +endef + +$(eval $(call AUTOTARGETS,package,sdl_sound)) From da07989b17cbdd4f12576e8ac982c4f7d8540d7b Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Wed, 1 Sep 2010 17:30:37 +0200 Subject: [PATCH 15/74] freetype: convert old-style hooks to new-style hooks The strip of the library is also removed, since this is done globally. Signed-off-by: Thomas Petazzoni --- package/freetype/freetype.mk | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/package/freetype/freetype.mk b/package/freetype/freetype.mk index f19b854866..5a88cca7a5 100644 --- a/package/freetype/freetype.mk +++ b/package/freetype/freetype.mk @@ -15,17 +15,23 @@ FREETYPE_DEPENDENCIES = host-pkg-config $(if $(BR2_PACKAGE_ZLIB),zlib) HOST_FREETYPE_DEPENDENCIES = host-pkg-config -$(eval $(call AUTOTARGETS,package,freetype)) -$(eval $(call AUTOTARGETS,package,freetype,host)) - -$(FREETYPE_HOOK_POST_INSTALL): +define FREETYPE_FREETYPE_CONFIG_STAGING_FIXUP $(SED) "s,^prefix=.*,prefix=\'$(STAGING_DIR)/usr\',g" \ -e "s,^exec_prefix=.*,exec_prefix=\'$(STAGING_DIR)/usr\',g" \ -e "s,^includedir=.*,includedir=\'$(STAGING_DIR)/usr/include/freetype2\',g" \ -e "s,^libdir=.*,libdir=\'$(STAGING_DIR)/usr/lib\',g" \ $(STAGING_DIR)/usr/bin/freetype-config - $(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $(TARGET_DIR)/usr/lib/libfreetype.so -ifneq ($(BR2_HAVE_DEVFILES),y) +endef + +FREETYPE_POST_INSTALL_STAGING_HOOKS += FREETYPE_FREETYPE_CONFIG_STAGING_FIXUP + +define FREETYPE_FREETYPE_CONFIG_TARGET_REMOVE rm -f $(TARGET_DIR)/usr/bin/freetype-config +endef + +ifneq ($(BR2_HAVE_DEVFILES),y) +FREETYPE_POST_INSTALL_TARGET_HOOKS += FREETYPE_FREETYPE_CONFIG_TARGET_REMOVE endif - touch $@ + +$(eval $(call AUTOTARGETS,package,freetype)) +$(eval $(call AUTOTARGETS,package,freetype,host)) From b4cb198b9710531e0a4ccf5d3f835427daeecaad Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Wed, 1 Sep 2010 17:32:03 +0200 Subject: [PATCH 16/74] shared-mime-info: convert old-style hook to new-style hook We don't want to use 'make DESTDIR=$(TARGET_DIR) install' as we only want the MIME database to be installed on the target. So we simply override the target installation command. Signed-off-by: Thomas Petazzoni --- package/shared-mime-info/shared-mime-info.mk | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/package/shared-mime-info/shared-mime-info.mk b/package/shared-mime-info/shared-mime-info.mk index 487d4b2322..6abfa7531e 100644 --- a/package/shared-mime-info/shared-mime-info.mk +++ b/package/shared-mime-info/shared-mime-info.mk @@ -8,7 +8,7 @@ SHARED_MIME_INFO_SOURCE = shared-mime-info-$(SHARED_MIME_INFO_VERSION).tar.bz2 SHARED_MIME_INFO_SITE = http://freedesktop.org/~hadess SHARED_MIME_INFO_INSTALL_STAGING = YES -SHARED_MIME_INFO_INSTALL_TARGET = NO +SHARED_MIME_INFO_INSTALL_TARGET = YES SHARED_MIME_INFO_AUTORECONF = NO SHARED_MIME_INFO_CONF_ENV = XMLLINT=$(HOST_DIR)/usr/bin/xmllint @@ -21,14 +21,13 @@ HOST_SHARED_MIME_INFO_DEPENDENCIES = host-pkg-config host-intltool HOST_SHARED_MIME_INFO_CONF_OPT = \ --disable-update-mimedb +define SHARED_MIME_INFO_INSTALL_TARGET_CMDS + $(HOST_MAKE_ENV) $(SHARED_MIME_INFO_HOST_BINARY) $(STAGING_DIR)/usr/share/mime + $(INSTALL) -D $(STAGING_DIR)/usr/share/mime/mime.cache $(TARGET_DIR)/usr/share/mime/mime.cache +endef + $(eval $(call AUTOTARGETS,package,shared-mime-info)) $(eval $(call AUTOTARGETS,package,shared-mime-info,host)) # shared-mime-info for the host SHARED_MIME_INFO_HOST_BINARY:=$(HOST_DIR)/usr/bin/update-mime-database - -# update the shared-mime-info database in the target -$(SHARED_MIME_INFO_HOOK_POST_INSTALL): - $(HOST_MAKE_ENV) $(SHARED_MIME_INFO_HOST_BINARY) $(STAGING_DIR)/usr/share/mime - $(INSTALL) -D $(STAGING_DIR)/usr/share/mime/mime.cache $(TARGET_DIR)/usr/share/mime/mime.cache - touch $@ From d31100d7e80278f673f74ed36c16a65f4fd27e9e Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Wed, 1 Sep 2010 20:50:52 +0200 Subject: [PATCH 17/74] mysql_client: convert old-style hook to new-style hook Signed-off-by: Thomas Petazzoni --- package/mysql_client/mysql_client.mk | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/package/mysql_client/mysql_client.mk b/package/mysql_client/mysql_client.mk index 377df89d89..6a89a52d8a 100644 --- a/package/mysql_client/mysql_client.mk +++ b/package/mysql_client/mysql_client.mk @@ -32,8 +32,10 @@ MYSQL_CLIENT_CONF_OPT = \ --enable-thread-safe-client \ $(ENABLE_DEBUG) -$(eval $(call AUTOTARGETS,package,mysql_client)) - -$(MYSQL_CLIENT_HOOK_POST_INSTALL): +define MYSQL_CLIENT_REMOVE_TEST_PROGS rm -rf $(TARGET_DIR)/usr/mysql-test $(TARGET_DIR)/usr/sql-bench - touch $@ +endef + +MYSQL_CLIENT_POST_INSTALL_TARGET_HOOKS += MYSQL_CLIENT_REMOVE_TEST_PROGS + +$(eval $(call AUTOTARGETS,package,mysql_client)) From fcab98c31bd05bfa294fd9705275832e4256dcb1 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Wed, 1 Sep 2010 20:53:48 +0200 Subject: [PATCH 18/74] usbutils: convert old-style hook to new-style hook Signed-off-by: Thomas Petazzoni --- package/usbutils/usbutils.mk | 30 +++++++++++++++++++++++------- 1 file changed, 23 insertions(+), 7 deletions(-) diff --git a/package/usbutils/usbutils.mk b/package/usbutils/usbutils.mk index 0f821281e6..508ca0d3a8 100644 --- a/package/usbutils/usbutils.mk +++ b/package/usbutils/usbutils.mk @@ -14,18 +14,34 @@ else USBUTILS_CONF_OPT = --disable-zlib endif -$(eval $(call AUTOTARGETS,package,usbutils)) - -$(USBUTILS_HOOK_POST_INSTALL): +define USBUTILS_TARGET_CLEANUP rm -f $(TARGET_DIR)/usr/bin/usb-devices rm -f $(TARGET_DIR)/usr/sbin/update-usbids.sh rm -f $(TARGET_DIR)/usr/share/pkgconfig/usbutils.pc -ifeq ($(BR2_PACKAGE_USBUTILS_ZLIB),y) +endef + +USBUTILS_POST_INSTALL_TARGET_HOOKS += USBUTILS_TARGET_CLEANUP + +define USBUTILS_REMOVE_UNCOMPRESSED_IDS rm -f $(TARGET_DIR)/usr/share/usb.ids -else +endef + +define USBUTILS_REMOVE_COMPRESSED_IDS rm -f $(TARGET_DIR)/usr/share/usb.ids.gz +endef + +ifeq ($(BR2_PACKAGE_USBUTILS_ZLIB),y) +USBUTILS_POST_INSTALL_TARGET_HOOKS += USBUTILS_REMOVE_UNCOMPRESSED_IDS +else +USBUTILS_POST_INSTALL_TARGET_HOOKS += USBUTILS_REMOVE_COMPRESSED_IDS endif -ifneq ($(BR2_HAVE_DEVFILES),y) + +define USBUTILS_REMOVE_DEVFILES rm -f $(TARGET_DIR)/usr/bin/libusb-config +endef + +ifneq ($(BR2_HAVE_DEVFILES),y) +USBUTILS_POST_INSTALL_TARGET_HOOKS += USBUTILS_REMOVE_DEVFILES endif - touch $@ + +$(eval $(call AUTOTARGETS,package,usbutils)) From f80d06457279c27689fddcb7ef110f30547f4d7b Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Wed, 1 Sep 2010 22:38:40 +0200 Subject: [PATCH 19/74] liboil: convert old-style hook to new-style hook Signed-off-by: Thomas Petazzoni --- package/liboil/liboil.mk | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/package/liboil/liboil.mk b/package/liboil/liboil.mk index 1bb412fc56..4681282878 100644 --- a/package/liboil/liboil.mk +++ b/package/liboil/liboil.mk @@ -35,9 +35,10 @@ endif LIBOIL_DEPENDENCIES = $(LIBOIL_GLIB_DEP) -$(eval $(call AUTOTARGETS,package,liboil)) - -$(LIBOIL_HOOK_POST_INSTALL): - # Remove useless bugreport program from the target +define LIBOIL_TARGET_CLEANUP rm -f $(TARGET_DIR)/usr/bin/oil-bugreport - touch $@ +endef + +LIBOIL_POST_INSTALL_TARGET_HOOKS += LIBOIL_TARGET_CLEANUP + +$(eval $(call AUTOTARGETS,package,liboil)) From fa6c7989acb94e4df7ab42cec252d946e8fb0c43 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Wed, 1 Sep 2010 22:39:37 +0200 Subject: [PATCH 20/74] libcurl: convert old-style hook to new-style Signed-off-by: Thomas Petazzoni --- package/libcurl/libcurl.mk | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/package/libcurl/libcurl.mk b/package/libcurl/libcurl.mk index 488df0455b..782bfb3ed3 100644 --- a/package/libcurl/libcurl.mk +++ b/package/libcurl/libcurl.mk @@ -23,12 +23,14 @@ else LIBCURL_CONF_OPT += --without-ssl endif -$(eval $(call AUTOTARGETS,package,libcurl)) - -$(LIBCURL_HOOK_POST_INSTALL): +define LIBCURL_TARGET_CLEANUP rm -rf $(TARGET_DIR)/usr/bin/curl-config \ $(if $(BR2_PACKAGE_CURL),,$(TARGET_DIR)/usr/bin/curl) - touch $@ +endef + +LIBCURL_POST_INSTALL_TARGET_HOOKS += LIBCURL_TARGET_CLEANUP + +$(eval $(call AUTOTARGETS,package,libcurl)) curl: libcurl curl-clean: libcurl-clean From 39c781f33a7cf486c4872181cce8451913d06407 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Wed, 1 Sep 2010 22:40:38 +0200 Subject: [PATCH 21/74] libgtk2: convert old-style hook to new-style Signed-off-by: Thomas Petazzoni --- package/libgtk2/libgtk2.mk | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/package/libgtk2/libgtk2.mk b/package/libgtk2/libgtk2.mk index 1e732d08d6..d669622a80 100644 --- a/package/libgtk2/libgtk2.mk +++ b/package/libgtk2/libgtk2.mk @@ -119,6 +119,13 @@ else LIBGTK2_CONF_OPT += --disable-cups endif +define LIBGTK2_POST_INSTALL_TWEAKS + $(INSTALL) -m 755 package/libgtk2/S26libgtk2 $(TARGET_DIR)/etc/init.d/ + rm -rf $(TARGET_DIR)/usr/share/gtk-2.0/demo $(TARGET_DIR)/usr/bin/gtk-demo +endef + +LIBGTK2_POST_INSTALL_TARGET_HOOKS += LIBGTK_POST_INSTALL_TWEAKS + # We do not build a full version of libgtk2 for the host, because that # requires compiling Cairo, Pango, ATK and X.org for the # host. Therefore, we patch it to remove dependencies, and we hack the @@ -155,8 +162,3 @@ endef $(eval $(call AUTOTARGETS,package,libgtk2)) $(eval $(call AUTOTARGETS,package,libgtk2,host)) - -$(LIBGTK2_HOOK_POST_INSTALL): - $(INSTALL) -m 755 package/libgtk2/S26libgtk2 $(TARGET_DIR)/etc/init.d/ - rm -rf $(TARGET_DIR)/usr/share/gtk-2.0/demo $(TARGET_DIR)/usr/bin/gtk-demo - touch $@ From dbcec2b28e0ac732e81569f7d0237a9b866dfed8 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Wed, 1 Sep 2010 22:42:27 +0200 Subject: [PATCH 22/74] dropbear: convert old-style hook and commands to new-style Signed-off-by: Thomas Petazzoni --- package/dropbear/dropbear.mk | 38 ++++++++++++++++++------------------ 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/package/dropbear/dropbear.mk b/package/dropbear/dropbear.mk index ec678d7e95..0b0d4c7322 100644 --- a/package/dropbear/dropbear.mk +++ b/package/dropbear/dropbear.mk @@ -17,34 +17,34 @@ DROPBEAR_CONF_ENV = ac_cv_type_struct_sockaddr_storage=yes DROPBEAR_MAKE = $(MAKE) MULTI=1 SCPPROGRESS=1 \ PROGRAMS="dropbear dbclient dropbearkey dropbearconvert scp" -$(eval $(call AUTOTARGETS,package,dropbear)) +define DROPBEAR_DISABLE_XAUTH + $(SED) 's,^#define XAUTH_COMMAND.*/xauth,#define XAUTH_COMMAND "/usr/bin/xauth,g' $(@D)/options.h +endef + +DROPBEAR_POST_EXTRACT_HOOKS += DROPBEAR_ADJUST_OPTIONS + +define DROPBEAR_DISABLE_REVERSE_DNS + $(SED) 's,^#define DO_HOST_LOOKUP.*,/* #define DO_HOST_LOOKUP */,' $(@D)/options.h +endef -$(DROPBEAR_HOOK_POST_EXTRACT): - $(SED) 's,^#define XAUTH_COMMAND.*/xauth,#define XAUTH_COMMAND "/usr/bin/xauth,g' $(DROPBEAR_DIR)/options.h ifeq ($(BR2_PACKAGE_DROPBEAR_DISABLE_REVERSEDNS),y) - $(SED) 's,^#define DO_HOST_LOOKUP.*,/* #define DO_HOST_LOOKUP */,' \ - $(DROPBEAR_DIR)/options.h +DROPBEAR_POST_EXTRACT_HOOKS += DROPBEAR_DISABLE_REVERSE_DNS endif - touch $@ -$(DROPBEAR_TARGET_INSTALL_TARGET): - $(call MESSAGE,"Installing to target") - $(INSTALL) -m 755 $(DROPBEAR_DIR)/dropbearmulti \ - $(TARGET_DIR)/usr/sbin/dropbear - ln -snf ../sbin/dropbear $(TARGET_DIR)/usr/bin/dbclient - ln -snf ../sbin/dropbear $(TARGET_DIR)/usr/bin/dropbearkey - ln -snf ../sbin/dropbear $(TARGET_DIR)/usr/bin/dropbearconvert - ln -snf ../sbin/dropbear $(TARGET_DIR)/usr/bin/scp - ln -snf ../sbin/dropbear $(TARGET_DIR)/usr/bin/ssh +define DROPBEAR_INSTALL_TARGET_CMDS + $(INSTALL) -m 755 $(@D)/dropbearmulti $(TARGET_DIR)/usr/sbin/dropbear + for f in $(DROPBEAR_TARGET_BINS); do \ + ln -snf ../sbin/dropbear $(TARGET_DIR)/usr/bin/$$f ; \ + done if [ ! -f $(TARGET_DIR)/etc/init.d/S50dropbear ]; then \ $(INSTALL) -m 0755 -D package/dropbear/S50dropbear $(TARGET_DIR)/etc/init.d/S50dropbear; \ fi - touch $@ +endef -$(DROPBEAR_TARGET_UNINSTALL): - $(call MESSAGE,"Uninstalling") +define DROPBEAR_UNINSTALL_TARGET_CMDS rm -f $(TARGET_DIR)/usr/sbin/dropbear rm -f $(addprefix $(TARGET_DIR)/usr/bin/, $(DROPBEAR_TARGET_BINS)) rm -f $(TARGET_DIR)/etc/init.d/S50dropbear - rm -f $(DROPBEAR_TARGET_INSTALL_TARGET) $(DROPBEAR_HOOK_POST_INSTALL) +endef +$(eval $(call AUTOTARGETS,package,dropbear)) From c42d2a3afe5e988d5cb2eab7581ed5fb66cb3f29 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Wed, 1 Sep 2010 22:43:20 +0200 Subject: [PATCH 23/74] lite: convert old-style hook to new-style hook Signed-off-by: Thomas Petazzoni --- package/lite/lite.mk | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/package/lite/lite.mk b/package/lite/lite.mk index 881c43bce4..678be865cd 100644 --- a/package/lite/lite.mk +++ b/package/lite/lite.mk @@ -12,12 +12,14 @@ LITE_INSTALL_STAGING_OPT = DESTDIR=$(STAGING_DIR) LDFLAGS=-L$(STAGING_DIR)/usr/l LITE_CONF_ENV = DFB_CFLAGS=-I$(STAGING_DIR)/usr/include/directfb LITE_DEPENDENCIES = directfb -$(eval $(call AUTOTARGETS,package,lite)) - -$(LITE_HOOK_POST_INSTALL): +define LITE_FINALIZE_INSTALL $(INSTALL) -d $(TARGET_DIR)/usr/share/LiTE/examples/ $(INSTALL) -d $(TARGET_DIR)/usr/share/fonts/truetype/ - $(INSTALL) -m0644 $(LITE_DIR)/data/*.png $(TARGET_DIR)/usr/share/LiTE/ - $(INSTALL) -m0644 $(LITE_DIR)/examples/*.png $(TARGET_DIR)/usr/share/LiTE/examples/ - $(INSTALL) -m0644 $(LITE_DIR)/fonts/*.ttf $(TARGET_DIR)/usr/share/fonts/truetype/ - touch $@ + $(INSTALL) -m0644 $(@D)/data/*.png $(TARGET_DIR)/usr/share/LiTE/ + $(INSTALL) -m0644 $(@D)/examples/*.png $(TARGET_DIR)/usr/share/LiTE/examples/ + $(INSTALL) -m0644 $(@D)/fonts/*.ttf $(TARGET_DIR)/usr/share/fonts/truetype/ +endef + +LITE_POST_INSTALL_TARGET_HOOKS += LITE_FINALIZE_INSTALL + +$(eval $(call AUTOTARGETS,package,lite)) From 375b14fbeb876aaa550f0bfee013a15ca4191202 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Wed, 1 Sep 2010 22:45:13 +0200 Subject: [PATCH 24/74] libiconv: convert old-style hook to new-style hook In addition to that, remove useless stripping since it is done globally. Signed-off-by: Thomas Petazzoni --- package/libiconv/libiconv.mk | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/package/libiconv/libiconv.mk b/package/libiconv/libiconv.mk index a3f762ab6f..c56a98615a 100644 --- a/package/libiconv/libiconv.mk +++ b/package/libiconv/libiconv.mk @@ -12,17 +12,19 @@ LIBICONV_INSTALL_TARGET = YES LIBICONV_INSTALL_TARGET_OPT = DESTDIR=$(TARGET_DIR) install -$(eval $(call AUTOTARGETS,package,libiconv)) - -$(LIBICONV_HOOK_POST_INSTALL): - # Remove not used preloadable libiconv.so - rm -f $(STAGING_DIR)/usr/lib/preloadable_libiconv.so +# Remove not used preloadable libiconv.so +define LIBICONV_TARGET_REMOVE_PRELOADABLE_LIBS rm -f $(TARGET_DIR)/usr/lib/preloadable_libiconv.so -ifneq ($(BR2_ENABLE_DEBUG),y) - $(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $(TARGET_DIR)/usr/lib/libiconv.so.* - $(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $(TARGET_DIR)/usr/lib/libcharset.so.* -endif - touch $@ +endef + +define LIBICONV_STAGING_REMOVE_PRELOADABLE_LIBS + rm -f $(STAGING_DIR)/usr/lib/preloadable_libiconv.so +endef + +LIBICONV_POST_INSTALL_TARGET_HOOKS += LIBICONV_TARGET_REMOVE_PRELOADABLE_LIBS +LIBICONV_POST_INSTALL_STAGING_HOOKS += LIBICONV_STAGING_REMOVE_PRELOADABLE_LIBS + +$(eval $(call AUTOTARGETS,package,libiconv)) # Configurations where the toolchain supports locales and the libiconv # package is enabled are incorrect, because the toolchain already From 20528a8449c85f5eb7e1ec829c50c6b23fda2c61 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Wed, 1 Sep 2010 22:45:57 +0200 Subject: [PATCH 25/74] libpng: convert old-style hook to new-style hook Signed-off-by: Thomas Petazzoni --- package/libpng/libpng.mk | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/package/libpng/libpng.mk b/package/libpng/libpng.mk index a81d9513c5..5608f4fce1 100644 --- a/package/libpng/libpng.mk +++ b/package/libpng/libpng.mk @@ -14,14 +14,15 @@ LIBPNG_DEPENDENCIES = host-pkg-config zlib HOST_LIBPNG_CONF_OPT = --without-libpng-compat HOST_LIBPNG_DEPENDENCIES = host-pkg-config host-zlib -$(eval $(call AUTOTARGETS,package,libpng)) -$(eval $(call AUTOTARGETS,package,libpng,host)) - -$(LIBPNG_HOOK_POST_INSTALL): +define LIBPNG_STAGING_LIBPNG12_CONFIG_FIXUP $(SED) "s,^prefix=.*,prefix=\'$(STAGING_DIR)/usr\',g" \ -e "s,^exec_prefix=.*,exec_prefix=\'$(STAGING_DIR)/usr\',g" \ -e "s,^includedir=.*,includedir=\'$(STAGING_DIR)/usr/include/libpng12\',g" \ -e "s,^libdir=.*,libdir=\'$(STAGING_DIR)/usr/lib\',g" \ $(STAGING_DIR)/usr/bin/libpng12-config - touch $@ +endef +LIBPNG_POST_INSTALL_STAGING_HOOKS += LIBPNG_STAGING_LIBPNG12_CONFIG_FIXUP + +$(eval $(call AUTOTARGETS,package,libpng)) +$(eval $(call AUTOTARGETS,package,libpng,host)) From 84d37d15e3edc028ff6f1d2b5e2071024d6e1ef5 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Wed, 1 Sep 2010 22:46:54 +0200 Subject: [PATCH 26/74] libdnet: convert old-style hook to new-style hook Signed-off-by: Thomas Petazzoni --- package/libdnet/libdnet.mk | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/package/libdnet/libdnet.mk b/package/libdnet/libdnet.mk index 28304befb9..eb67b055a5 100644 --- a/package/libdnet/libdnet.mk +++ b/package/libdnet/libdnet.mk @@ -24,9 +24,11 @@ LIBDNET_INSTALL_TARGET_OPT = $(LIBDNET_MAKE_OPT) DESTDIR=$(TARGET_DIR) INSTALL_S LIBDNET_INSTALL_STAGING_OPT = $(LIBDNET_MAKE_OPT) DESTDIR=$(STAGING_DIR) install endif +# Needed for autoreconf to work properly +define LIBDNET_FIXUP_ACINCLUDE_M4 + ln -sf config/acinclude.m4 $(@D) +endef + +LIBDNET_POST_EXTRACT_HOOKS += LIBDNET_FIXUP_ACINCLUDE_M4 + $(eval $(call AUTOTARGETS,package,libdnet)) - -$(LIBDNET_HOOK_POST_EXTRACT): - ln -sf config/acinclude.m4 $(LIBDNET_DIR) - touch $@ - From c648785b933fe86531906832b81e21e54ddd10ca Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Wed, 1 Sep 2010 22:47:44 +0200 Subject: [PATCH 27/74] libxml2: convert old-style hook to new-style hook Signed-off-by: Thomas Petazzoni --- package/libxml2/libxml2.mk | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/package/libxml2/libxml2.mk b/package/libxml2/libxml2.mk index 8f2513684c..820f4656dc 100644 --- a/package/libxml2/libxml2.mk +++ b/package/libxml2/libxml2.mk @@ -22,6 +22,13 @@ LIBXML2_CONF_OPT = --with-gnu-ld --enable-shared \ --without-debugging --without-python \ --without-threads +define LIBXML2_STAGING_LIBXML2_CONFIG_FIXUP + $(SED) "s,^prefix=.*,prefix=\'$(STAGING_DIR)/usr\',g" $(STAGING_DIR)/usr/bin/xml2-config + $(SED) "s,^exec_prefix=.*,exec_prefix=\'$(STAGING_DIR)/usr\',g" $(STAGING_DIR)/usr/bin/xml2-config +endef + +LIBXML2_POST_INSTALL_STAGING_HOOKS += LIBXML2_STAGING_LIBXML2_CONFIG_FIXUP + HOST_LIBXML2_DEPENDENCIES = host-pkg-config HOST_LIBXML2_CONF_OPT = \ @@ -31,10 +38,5 @@ HOST_LIBXML2_CONF_OPT = \ $(eval $(call AUTOTARGETS,package,libxml2)) $(eval $(call AUTOTARGETS,package,libxml2,host)) -$(LIBXML2_HOOK_POST_INSTALL): - $(SED) "s,^prefix=.*,prefix=\'$(STAGING_DIR)/usr\',g" $(STAGING_DIR)/usr/bin/xml2-config - $(SED) "s,^exec_prefix=.*,exec_prefix=\'$(STAGING_DIR)/usr\',g" $(STAGING_DIR)/usr/bin/xml2-config - touch $@ - # libxml2 for the host LIBXML2_HOST_BINARY:=$(HOST_DIR)/usr/bin/xmllint From 2a784080ad8efcdff981bca54574c3b7a09c532b Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Wed, 1 Sep 2010 22:48:22 +0200 Subject: [PATCH 28/74] openssh: convert old-style hook to new-style hook Signed-off-by: Thomas Petazzoni --- package/openssh/openssh.mk | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/package/openssh/openssh.mk b/package/openssh/openssh.mk index 64274e5a18..17044ccb5c 100644 --- a/package/openssh/openssh.mk +++ b/package/openssh/openssh.mk @@ -14,8 +14,10 @@ OPENSSH_INSTALL_TARGET_OPT = DESTDIR=$(TARGET_DIR) install OPENSSH_DEPENDENCIES = zlib openssl -$(eval $(call AUTOTARGETS,package,openssh)) - -$(OPENSSH_HOOK_POST_INSTALL): +define OPENSSH_INSTALL_INITSCRIPT $(INSTALL) -D -m 755 package/openssh/S50sshd $(TARGET_DIR)/etc/init.d/S50sshd - touch $@ +endef + +OPENSSH_POST_INSTALL_TARGET_HOOKS += OPENSSH_INSTALL_INITSCRIPT + +$(eval $(call AUTOTARGETS,package,openssh)) From cfe2c192d17c44291490c120d8bb33eeed2662e8 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Wed, 1 Sep 2010 22:52:48 +0200 Subject: [PATCH 29/74] e2fsprogs: convert old-style hooks to new-style hook Signed-off-by: Thomas Petazzoni --- package/e2fsprogs/e2fsprogs.mk | 81 ++++++++++++++++++++++------------ 1 file changed, 52 insertions(+), 29 deletions(-) diff --git a/package/e2fsprogs/e2fsprogs.mk b/package/e2fsprogs/e2fsprogs.mk index 78bf21c476..f5258044df 100644 --- a/package/e2fsprogs/e2fsprogs.mk +++ b/package/e2fsprogs/e2fsprogs.mk @@ -30,9 +30,6 @@ define HOST_E2FSPROGS_INSTALL_CMDS $(HOST_MAKE_ENV) $(MAKE) -C $(@D) install install-libs endef -$(eval $(call AUTOTARGETS,package,e2fsprogs)) -$(eval $(call AUTOTARGETS,package,e2fsprogs,host)) - # binaries to keep or remove E2FSPROGS_BINTARGETS_$(BR2_PACKAGE_E2FSPROGS_BADBLOCKS) += usr/sbin/badblocks E2FSPROGS_BINTARGETS_$(BR2_PACKAGE_E2FSPROGS_BLKID) += usr/sbin/blkid @@ -68,32 +65,58 @@ E2FSPROGS_TXTTARGETS_ = \ usr/sbin/findfs \ usr/sbin/tune2fs -$(E2FSPROGS_HOOK_POST_INSTALL): - $(call MESSAGE,"Post installing") - # remove unneeded +define E2FSPROGS_TARGET_REMOVE_UNNEEDED rm -f $(addprefix $(TARGET_DIR)/, $(E2FSPROGS_BINTARGETS_)) rm -f $(addprefix $(TARGET_DIR)/, $(E2FSPROGS_TXTTARGETS_)) - # make symlinks -ifeq ($(BR2_PACKAGE_E2FSPROGS_MKE2FS),y) - ln -sf mke2fs ${TARGET_DIR}/usr/sbin/mkfs.ext2 - ln -sf mke2fs ${TARGET_DIR}/usr/sbin/mkfs.ext3 - ln -sf mke2fs ${TARGET_DIR}/usr/sbin/mkfs.ext4 - ln -sf mke2fs ${TARGET_DIR}/usr/sbin/mkfs.ext4dev -endif -ifeq ($(BR2_PACKAGE_E2FSPROGS_E2FSCK),y) - ln -sf e2fsck ${TARGET_DIR}/usr/sbin/fsck.ext2 - ln -sf e2fsck ${TARGET_DIR}/usr/sbin/fsck.ext3 - ln -sf e2fsck ${TARGET_DIR}/usr/sbin/fsck.ext4 - ln -sf e2fsck ${TARGET_DIR}/usr/sbin/fsck.ext4dev -endif -ifeq ($(BR2_PACKAGE_E2FSPROGS_TUNE2FS),y) - ln -sf e2label ${TARGET_DIR}/usr/sbin/tune2fs -endif -ifeq ($(BR2_PACKAGE_E2FSPROGS_FINDFS),y) - ln -sf e2label ${TARGET_DIR}/usr/sbin/findfs -endif -ifeq ($(BR2_PACKAGE_E2FSPROGS_LIBUUID),y) - install -D ${E2FSPROGS_SRCDIR}/lib/uuid/uuid.h ${STAGING_DIR}/usr/include/uuid/uuid.h -endif - touch $@ +endef +E2FSPROGS_POST_INSTALL_TARGET_HOOKS += E2FSPROGS_TARGET_REMOVE_UNNEEDED + +define E2FSPROGS_TARGET_MKE2FS_SYMLINKS + ln -sf mke2fs $(TARGET_DIR)/usr/sbin/mkfs.ext2 + ln -sf mke2fs $(TARGET_DIR)/usr/sbin/mkfs.ext3 + ln -sf mke2fs $(TARGET_DIR)/usr/sbin/mkfs.ext4 + ln -sf mke2fs $(TARGET_DIR)/usr/sbin/mkfs.ext4dev +endef + +ifeq ($(BR2_PACKAGE_E2FSPROGS_MKE2FS),y) +E2FSPROGS_POST_INSTALL_TARGET_HOOKS += E2FSPROGS_TARGET_MKE2FS_SYMLINKS +endif + +define E2FSPROGS_TARGET_E2FSCK_SYMLINKS + ln -sf e2fsck $(TARGET_DIR)/usr/sbin/fsck.ext2 + ln -sf e2fsck $(TARGET_DIR)/usr/sbin/fsck.ext3 + ln -sf e2fsck $(TARGET_DIR)/usr/sbin/fsck.ext4 + ln -sf e2fsck $(TARGET_DIR)/usr/sbin/fsck.ext4dev +endef + +ifeq ($(BR2_PACKAGE_E2FSPROGS_E2FSCK),y) +E2FSPROGS_POST_INSTALL_TARGET_HOOKS += E2FSPROGS_TARGET_E2FSCK_SYMLINKS +endif + +define E2FSPROGS_TARGET_TUNE2FS_SYMLINK + ln -sf e2label $(TARGET_DIR)/usr/sbin/tune2fs +endef + +ifeq ($(BR2_PACKAGE_E2FSPROGS_TUNE2FS),y) +E2FSPROGS_POST_INSTALL_TARGET_HOOKS += E2FSPROGS_TARGET_TUNE2FS_SYMLINK +endif + +define E2FSPROGS_TARGET_FINDFS_SYMLINK + ln -sf e2label $(TARGET_DIR)/usr/sbin/findfs +endef + +ifeq ($(BR2_PACKAGE_E2FSPROGS_FINDFS),y) +E2FSPROGS_POST_INSTALL_TARGET_HOOKS += E2FSPROGS_TARGET_FINDFS_SYMLINK +endif + +define E2FSPROGS_STAGING_LIBUUID_INSTALL + install -D $(@D)/lib/uuid/uuid.h $(STAGING_DIR)/usr/include/uuid/uuid.h +endef + +ifeq ($(BR2_PACKAGE_E2FSPROGS_LIBUUID),y) +E2FSPROGS_POST_INSTALL_STAGING_HOOKS += E2FSPROGS_STAGING_LIBUUID_INSTALL +endif + +$(eval $(call AUTOTARGETS,package,e2fsprogs)) +$(eval $(call AUTOTARGETS,package,e2fsprogs,host)) From 1976fc5f244cd04027b3a6f0d6b7ab1a29306f7d Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Wed, 1 Sep 2010 22:55:03 +0200 Subject: [PATCH 30/74] xlib_libX11: convert old-style hooks to new-style hooks Signed-off-by: Thomas Petazzoni --- package/x11r7/xlib_libX11/xlib_libX11.mk | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/package/x11r7/xlib_libX11/xlib_libX11.mk b/package/x11r7/xlib_libX11/xlib_libX11.mk index 575aa67472..c95d654e8d 100644 --- a/package/x11r7/xlib_libX11/xlib_libX11.mk +++ b/package/x11r7/xlib_libX11/xlib_libX11.mk @@ -20,20 +20,24 @@ XLIB_LIBX11_CONF_OPT = \ HOST_XLIB_LIBX11_DEPENDENCIES = host-xproto_xextproto host-libxcb host-xutil_util-macros host-xlib_xtrans host-xlib_libXau host-xlib_libXdmcp host-xproto_kbproto host-xproto_xproto host-xproto_xextproto host-xproto_inputproto host-xproto_xf86bigfontproto xproto_bigreqsproto host-xproto_xcmiscproto -$(eval $(call AUTOTARGETS,package/x11r7,xlib_libX11)) -$(eval $(call AUTOTARGETS,package/x11r7,xlib_libX11,host)) - # src/util/makekeys is executed at build time to generate ks_tables.h, so # it should get compiled for the host. The libX11 makefile unfortunately # doesn't know about cross compilation so this doesn't work. # Long term, we should probably teach it about HOSTCC / HOST_CFLAGS, but for # now simply disable the src/util Makefile and build makekeys by hand in # advance -$(XLIB_LIBX11_HOOK_POST_EXTRACT): +define XLIB_LIBX11_DISABLE_MAKEKEYS_BUILD echo '' > $(@D)/src/util/Makefile.am - touch $@ +endef -$(XLIB_LIBX11_HOOK_POST_CONFIGURE): +XLIB_LIBX11_POST_EXTRACT_HOOKS += XLIB_LIBX11_DISABLE_MAKEKEYS_BUILD + +define XLIB_LIBX11_BUILD_MAKEKEYS_FOR_HOST cd $(@D)/src/util && $(HOSTCC) $(HOSTCFLAGS) \ -I$(STAGING_DIR)/usr/include -o makekeys makekeys.c - touch $@ +endef + +XLIB_LIBX11_POST_CONFIGURE_HOOKS += XLIB_LIBX11_BUILD_MAKEKEYS_FOR_HOST + +$(eval $(call AUTOTARGETS,package/x11r7,xlib_libX11)) +$(eval $(call AUTOTARGETS,package/x11r7,xlib_libX11,host)) From 1c99b35528d469bb55574977b07607756746fbfe Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Wed, 1 Sep 2010 23:07:55 +0200 Subject: [PATCH 31/74] wpa_supplicant: convert old-style hooks to new-style hooks Signed-off-by: Thomas Petazzoni --- package/wpa_supplicant/wpa_supplicant.mk | 86 ++++++++++++++---------- 1 file changed, 52 insertions(+), 34 deletions(-) diff --git a/package/wpa_supplicant/wpa_supplicant.mk b/package/wpa_supplicant/wpa_supplicant.mk index c6bb0585b9..a01ac4b6ca 100644 --- a/package/wpa_supplicant/wpa_supplicant.mk +++ b/package/wpa_supplicant/wpa_supplicant.mk @@ -16,66 +16,84 @@ WPA_SUPPLICANT_DBUS_SERVICE = fi.epitest.hostap.WPASupplicant ifeq ($(BR2_PACKAGE_LIBNL),y) WPA_SUPPLICANT_DEPENDENCIES += libnl +define WPA_SUPPLICANT_LIBNL_CONFIG + echo "CONFIG_DRIVER_NL80211=y" >>$(WPA_SUPPLICANT_CONFIG) +endef endif +ifneq ($(BR2_PACKAGE_WPA_SUPPLICANT_EAP),y) +define WPA_SUPPLICANT_CRYPTO_CONFIG + $(SED) "s/^CONFIG_EAP_*/#CONFIG_EAP_/g" $(WPA_SUPPLICANT_CONFIG) \ + echo "CONFIG_TLS=none" >>$(WPA_SUPPLICANT_CONFIG) +endef +else ifeq ($(BR2_PACKAGE_WPA_SUPPLICANT_OPENSSL),y) WPA_SUPPLICANT_DEPENDENCIES += openssl +define WPA_SUPPLICANT_CRYPTO_CONFIG + echo "CONFIG_TLS=openssl" >>$(WPA_SUPPLICANT_CONFIG) +endef +else +define WPA_SUPPLICANT_CRYPTO_CONFIG + echo "CONFIG_TLS=internal" >>$(WPA_SUPPLICANT_CONFIG) \ + echo "CONFIG_INTERNAL_LIBTOMMATH=y" >>$(WPA_SUPPLICANT_CONFIG) +endef endif +endif + ifeq ($(BR2_PACKAGE_DBUS),y) WPA_SUPPLICANT_DEPENDENCIES += host-pkg-config dbus WPA_SUPPLICANT_MAKE_ENV = \ PKG_CONFIG_SYSROOT_DIR="$(STAGING_DIR)" \ PKG_CONFIG_PATH="$(STAGING_DIR)/usr/lib/pkgconfig" +define WPA_SUPPLICANT_DBUS_CONFIG + echo "CONFIG_CTRL_IFACE_DBUS=y" >>$(WPA_SUPPLICANT_CONFIG) +endef endif -$(eval $(call AUTOTARGETS,package,wpa_supplicant)) - -$(WPA_SUPPLICANT_TARGET_CONFIGURE): - cp $(WPA_SUPPLICANT_DIR)/wpa_supplicant/defconfig $(WPA_SUPPLICANT_CONFIG) +define WPA_SUPPLICANT_CONFIGURE_CMDS + cp $(@D)/wpa_supplicant/defconfig $(WPA_SUPPLICANT_CONFIG) echo "CFLAGS += $(TARGET_CFLAGS)" >>$(WPA_SUPPLICANT_CONFIG) echo "LDFLAGS += $(TARGET_LDFLAGS)" >>$(WPA_SUPPLICANT_CONFIG) echo "CC = $(TARGET_CC)" >>$(WPA_SUPPLICANT_CONFIG) - $(SED) "s/\/local//" $(WPA_SUPPLICANT_DIR)/wpa_supplicant/Makefile -ifneq ($(BR2_PACKAGE_WPA_SUPPLICANT_EAP),y) - $(SED) "s/^CONFIG_EAP_*/#CONFIG_EAP_/g" $(WPA_SUPPLICANT_CONFIG) - echo "CONFIG_TLS=none" >>$(WPA_SUPPLICANT_CONFIG) -else -ifeq ($(BR2_PACKAGE_WPA_SUPPLICANT_OPENSSL),y) - echo "CONFIG_TLS=openssl" >>$(WPA_SUPPLICANT_CONFIG) -else - echo "CONFIG_TLS=internal" >>$(WPA_SUPPLICANT_CONFIG) - echo "CONFIG_INTERNAL_LIBTOMMATH=y" >>$(WPA_SUPPLICANT_CONFIG) -endif -endif -ifeq ($(BR2_PACKAGE_DBUS),y) - echo "CONFIG_CTRL_IFACE_DBUS=y" >>$(WPA_SUPPLICANT_CONFIG) -endif -ifeq ($(BR2_PACKAGE_LIBNL),y) - echo "CONFIG_DRIVER_NL80211=y" >>$(WPA_SUPPLICANT_CONFIG) -endif - touch $@ + $(SED) "s/\/local//" $(@D)/wpa_supplicant/Makefile + $(WPA_SUPPLICANT_CRYPTO_CONFIG) + $(WPA_SUPPLICANT_LIBNL_CONFIG) + $(WPA_SUPPLICANT_DBUS_CONFIG) +endef -$(WPA_SUPPLICANT_HOOK_POST_INSTALL): -ifneq ($(BR2_PACKAGE_WPA_SUPPLICANT_CLI),y) +define WPA_SUPPLICANT_REMOVE_CLI rm -f $(TARGET_DIR)/usr/sbin/wpa_cli +endef + +ifneq ($(BR2_PACKAGE_WPA_SUPPLICANT_CLI),y) +WPA_SUPPLICANT_POST_INSTALL_TARGET_HOOKS += WPA_SUPPLICANT_REMOVE_CLI endif -ifneq ($(BR2_PACKAGE_WPA_SUPPLICANT_PASSPHRASE),y) + +define WPA_SUPPLICANT_REMOVE_PASSPHRASE rm -f $(TARGET_DIR)/usr/sbin/wpa_passphrase +endef + +ifneq ($(BR2_PACKAGE_WPA_SUPPLICANT_PASSPHRASE),y) +WPA_SUPPLICANT_POST_INSTALL_TARGET_HOOKS += WPA_SUPPLICANT_REMOVE_PASSPHRASE endif -ifeq ($(BR2_PACKAGE_DBUS),y) + +define WPA_SUPPLICANT_INSTALL_DBUS $(INSTALL) -D \ - $(WPA_SUPPLICANT_DIR)/wpa_supplicant/dbus-wpa_supplicant.conf \ + $(@D)/wpa_supplicant/dbus-wpa_supplicant.conf \ $(TARGET_DIR)/etc/dbus-1/system.d/wpa_supplicant.conf $(INSTALL) -D \ - $(WPA_SUPPLICANT_DIR)/wpa_supplicant/dbus-wpa_supplicant.service \ + $(@D)/wpa_supplicant/dbus-wpa_supplicant.service \ $(TARGET_DIR)/usr/share/dbus-1/system-services/$(WPA_SUPPLICANT_DBUS_SERVICE).service -endif - touch $@ +endef -$(WPA_SUPPLICANT_TARGET_UNINSTALL): - $(call MESSAGE,"Uninstalling") +ifeq ($(BR2_PACKAGE_DBUS),y) +WPA_SUPPLICANT_POST_INSTALL_TARGET_HOOKS += WPA_SUPPLICANT_INSTALL_DBUS +endif + +define WPA_SUPPLICANT_UNINSTALL_TARGET_CMDS rm -f $(addprefix $(TARGET_DIR)/usr/sbin/, $(WPA_SUPPLICANT_TARGET_BINS)) rm -f $(TARGET_DIR)/etc/dbus-1/system.d/wpa_supplicant.conf rm -f $(TARGET_DIR)/usr/share/dbus-1/system-services/$(WPA_SUPPLICANT_DBUS_SERVICE).service - rm -f $(WPA_SUPPLICANT_TARGET_INSTALL_TARGET) $(WPA_SUPPLICANT_HOOK_POST_INSTALL) +endef +$(eval $(call AUTOTARGETS,package,wpa_supplicant)) From 62df009e47bb0f850989aaba24b08d06d5b03305 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Wed, 1 Sep 2010 23:08:46 +0200 Subject: [PATCH 32/74] squid: convert old-style hook to new-style hook Signed-off-by: Thomas Petazzoni --- package/squid/squid.mk | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/package/squid/squid.mk b/package/squid/squid.mk index 6e94d5011c..6254b843cc 100644 --- a/package/squid/squid.mk +++ b/package/squid/squid.mk @@ -23,13 +23,15 @@ ifeq ($(BR2_PACKAGE_OPENSSL),y) SQUID_DEPENDENCIES += openssl endif -$(eval $(call AUTOTARGETS,package,squid)) - -$(SQUID_HOOK_POST_INSTALL): +define SQUID_CLEANUP_TARGET rm -f $(addprefix $(TARGET_DIR)/usr/bin/, \ RunCache RunAccel) rm -f $(addprefix $(TARGET_DIR)/etc/, \ cachemgr.conf mime.conf.default squid.conf.default) rm -f $(TARGET_DIR)/usr/libexec/cachemgr.cgi rm -f $(TARGET_DIR)/usr/share/mib.txt - touch $@ +endef + +SQUID_POST_INSTALL_TARGET_HOOKS += SQUID_CLEANUP_TARGET + +$(eval $(call AUTOTARGETS,package,squid)) From 0958e6109c9ed8c82342d17a1205e3c4b8baa3f0 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Wed, 1 Sep 2010 23:10:28 +0200 Subject: [PATCH 33/74] tiff: use correct construct to override target installation We also remove the stripping, as it is already done globally. Signed-off-by: Thomas Petazzoni --- package/tiff/tiff.mk | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/package/tiff/tiff.mk b/package/tiff/tiff.mk index 8db215ee5f..ca6f562af9 100644 --- a/package/tiff/tiff.mk +++ b/package/tiff/tiff.mk @@ -17,10 +17,8 @@ TIFF_CONF_OPT = \ TIFF_DEPENDENCIES = host-pkg-config zlib jpeg +define TIFF_INSTALL_TARGET_CMDS + -cp -a $(@D)/libtiff/.libs/libtiff.so* $(TARGET_DIR)/usr/lib/ +endef + $(eval $(call AUTOTARGETS,package,tiff)) - -$(TIFF_TARGET_INSTALL_TARGET): - -cp -a $(TIFF_DIR)/libtiff/.libs/libtiff.so* $(TARGET_DIR)/usr/lib/ - $(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $(TARGET_DIR)/usr/lib/libtiff.so - touch $@ - From 9785f71c7a7a0eebf496d45e516b83c8019f6468 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Wed, 1 Sep 2010 23:11:21 +0200 Subject: [PATCH 34/74] bridge: remove useless strip and use correct definition for uninstall Signed-off-by: Thomas Petazzoni --- package/bridge-utils/bridge.mk | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/package/bridge-utils/bridge.mk b/package/bridge-utils/bridge.mk index 925de06494..1d633ddab8 100644 --- a/package/bridge-utils/bridge.mk +++ b/package/bridge-utils/bridge.mk @@ -13,18 +13,9 @@ BRIDGE_INSTALL_TARGET:=YES BRIDGE_INSTALL_TARGET_OPT:=DESTDIR=$(TARGET_DIR) install BRIDGE_CONF_OPT:=--with-linux-headers=$(LINUX_HEADERS_DIR) -$(eval $(call AUTOTARGETS,package,bridge)) - -ifeq ($(BR2_ENABLE_DEBUG),) -# bridge has no install-strip target -$(BRIDGE_HOOK_POST_INSTALL): $(BRIDGE_TARGET_INSTALL_TARGET) - $(STRIPCMD) $(STRIP_STRIP_ALL) $(TARGET_DIR)/usr/sbin/brctl - touch $@ -endif - -# bridge has no uninstall target -$(BRIDGE_TARGET_UNINSTALL): - $(call MESSAGE,"Uninstalling") +define BRIDGE_UNINSTALL_TARGET_CMDS rm -f $(addprefix $(TARGET_DIR)/usr/,lib/libbridge.a \ include/libbridge.h man/man8/brctl.8 sbin/brctl) - rm -f $(BRIDGE_TARGET_INSTALL_TARGET) $(BRIDGE_HOOK_POST_INSTALL) +endef + +$(eval $(call AUTOTARGETS,package,bridge)) From 0fe621d1ded3611958b29f8a7a7ffd7ba9fdf685 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Wed, 1 Sep 2010 23:12:35 +0200 Subject: [PATCH 35/74] at: convert old-style hook to new-style hook Signed-off-by: Thomas Petazzoni --- package/at/at.mk | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/package/at/at.mk b/package/at/at.mk index 57b7847ac7..3799790480 100644 --- a/package/at/at.mk +++ b/package/at/at.mk @@ -21,14 +21,13 @@ AT_CONF_OPT = \ --with-daemon_groupname=root \ SENDMAIL=/usr/sbin/sendmail -$(eval $(call AUTOTARGETS,package,at)) - -$(AT_HOOK_POST_INSTALL): $(AT_TARGET_INSTALL_TARGET) +define AT_INSTALL_INITSCRIPT $(INSTALL) -m 0755 package/at/S99at $(TARGET_DIR)/etc/init.d/S99at - touch $@ +endef -$(AT_TARGET_UNINSTALL): - $(call MESSAGE,"Uninstalling") +AT_POST_INSTALL_TARGET_HOOKS += AT_INSTALL_INITSCRIPT + +define AT_UNINSTALL_TARGET_CMDS rm -rf $(addprefix $(TARGET_DIR),/usr/lib/atspool \ /usr/lib/atjobs \ /etc/at.deny \ @@ -40,4 +39,6 @@ $(AT_TARGET_UNINSTALL): /usr/sbin/atrun) rm -f $(addprefix $(TARGET_DIR)/usr/man/man*/, \ at.1 atq.1 atrm.1 batch.1 at_allow.5 at_deny.5 atd.8 atrun.8) - rm -f $(AT_TARGET_INSTALL_TARGET) $(AT_HOOK_POST_INSTALL) +endef + +$(eval $(call AUTOTARGETS,package,at)) From d073318876c92f9d0729d8d775a3a1eada3eeff1 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Wed, 1 Sep 2010 23:13:58 +0200 Subject: [PATCH 36/74] oprofile: use correct way of overriding steps Signed-off-by: Thomas Petazzoni --- package/oprofile/oprofile.mk | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/package/oprofile/oprofile.mk b/package/oprofile/oprofile.mk index 215e85b65b..3be50f28bb 100644 --- a/package/oprofile/oprofile.mk +++ b/package/oprofile/oprofile.mk @@ -26,22 +26,19 @@ endif OPROFILE_DEPENDENCIES := popt binutils_target -$(eval $(call AUTOTARGETS,package,oprofile)) - -$(OPROFILE_TARGET_INSTALL_TARGET): +define OPROFILE_INSTALL_TARGET_CMDS $(INSTALL) -d -m 755 $(TARGET_DIR)/usr/bin $(INSTALL) -d -m 755 $(TARGET_DIR)/usr/share/oprofile - cp -dpfr $(OPROFILE_DIR)/events/$(OPROFILE_ARCH) $(TARGET_DIR)/usr/share/oprofile - $(INSTALL) -m 644 $(OPROFILE_DIR)/libregex/stl.pat $(TARGET_DIR)/usr/share/oprofile - $(INSTALL) -m 755 $(OPROFILE_DIR)/utils/opcontrol $(TARGET_DIR)/usr/bin - $(INSTALL) -m 755 $(addprefix $(OPROFILE_DIR)/, $(OPROFILE_BINARIES)) $(TARGET_DIR)/usr/bin - $(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $(addprefix $(TARGET_DIR)/usr/bin/, $(notdir $(OPROFILE_BINARIES))) - touch $@ + cp -dpfr $(@D)/events/$(OPROFILE_ARCH) $(TARGET_DIR)/usr/share/oprofile + $(INSTALL) -m 644 $(@D)/libregex/stl.pat $(TARGET_DIR)/usr/share/oprofile + $(INSTALL) -m 755 $(@D)/utils/opcontrol $(TARGET_DIR)/usr/bin + $(INSTALL) -m 755 $(addprefix $(@D)/, $(OPROFILE_BINARIES)) $(TARGET_DIR)/usr/bin +endef -$(OPROFILE_TARGET_CLEAN): +define OPROFILE_UNINSTALL_TARGET_CMDS rm -f $(addprefix $(TARGET_DIR)/usr/bin/, $(notdir $(OPROFILE_BINARIES))) rm -f $(TARGET_DIR)/usr/bin/opcontrol rm -rf $(TARGET_DIR)/usr/share/oprofile - -$(MAKE) -C $(OPROFILE_DIR) clean - touch $@ +endef +$(eval $(call AUTOTARGETS,package,oprofile)) From 0de10bf4915ba1efe482486705adc36cfa52cfa8 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Wed, 1 Sep 2010 23:15:59 +0200 Subject: [PATCH 37/74] ncftp: use correct way of overriding steps Signed-off-by: Thomas Petazzoni --- package/ncftp/ncftp.mk | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/package/ncftp/ncftp.mk b/package/ncftp/ncftp.mk index 757cc6e5be..f3f47805f2 100644 --- a/package/ncftp/ncftp.mk +++ b/package/ncftp/ncftp.mk @@ -23,6 +23,8 @@ endif ifeq ($(BR2_PACKAGE_NCFTP_BATCH),y) NCFTP_TARGET_BINS+=ncftpbatch +NCFTP_INSTALL_NCFTP_BATCH = \ + ln -s /usr/bin/ncftpbatch $(TARGET_DIR)/usr/bin/ncftpspooler endif ifeq ($(BR2_PACKAGE_NCFTP_BOOKMARKS),y) @@ -30,20 +32,13 @@ NCFTP_TARGET_BINS+=ncftpbookmarks NCFTP_DEPENDENCIES:=ncurses endif -$(eval $(call AUTOTARGETS,package,ncftp)) - -$(NCFTP_TARGET_INSTALL_TARGET): - $(call MESSAGE,"Installing to target") +define NCFTP_INSTALL_TARGET_CMDS $(INSTALL) -m 0755 $(addprefix $(NCFTP_DIR)/bin/, $(NCFTP_TARGET_BINS)) $(TARGET_DIR)/usr/bin -ifeq ($(BR2_PACKAGE_NCFTP_BATCH),y) - ln -s /usr/bin/ncftpbatch $(TARGET_DIR)/usr/bin/ncftpspooler -endif -ifeq ($(BR2_ENABLE_DEBUG),) - $(STRIPCMD) $(STRIP_STRIP_ALL) $(addprefix $(TARGET_DIR)/usr/bin/, $(NCFTP_TARGET_BINS)) -endif - touch $@ + $(NCFTP_INSTALL_NCFTP_BATCH) +endef -$(NCFTP_TARGET_UNINSTALL): - $(call MESSAGE,"Uninstalling") +define NCFTP_UNINSTALL_TARGET_CMDS rm -f $(addprefix $(TARGET_DIR)/usr/bin/, $(NCFTP_TARGET_BINS) ncftpspooler) - rm -f $(NCFTP_TARGET_INSTALL_TARGET) +endef + +$(eval $(call AUTOTARGETS,package,ncftp)) From 166631bdfbd5bc063a88126c5b91227701b48745 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Wed, 1 Sep 2010 23:16:30 +0200 Subject: [PATCH 38/74] bmon: use correct way of overriding steps Signed-off-by: Thomas Petazzoni --- package/bmon/bmon.mk | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/package/bmon/bmon.mk b/package/bmon/bmon.mk index 759b08416d..5036185d7d 100644 --- a/package/bmon/bmon.mk +++ b/package/bmon/bmon.mk @@ -10,9 +10,8 @@ BMON_SITE = http://distfiles.gentoo.org/distfiles BMON_DEPENDENCIES = ncurses BMON_INSTALL_TARGET_OPT = DESTDIR=$(TARGET_DIR) install -$(eval $(call AUTOTARGETS,package,bmon)) - -$(BMON_TARGET_UNINSTALL): - $(call MESSAGE,"Uninstalling") +define BMON_UNINSTALL_TARGET_CMDS rm -f $(TARGET_DIR)/usr/bin/bmon - rm -f $(BMON_TARGET_INSTALL_TARGET) $(BMON_HOOK_POST_INSTALL) +endef + +$(eval $(call AUTOTARGETS,package,bmon)) From 4dfe998b3252ac55e2c56e106e9f090b951191c6 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Wed, 1 Sep 2010 23:17:07 +0200 Subject: [PATCH 39/74] libnl: remove useless strip and use correct step override Signed-off-by: Thomas Petazzoni --- package/libnl/libnl.mk | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/package/libnl/libnl.mk b/package/libnl/libnl.mk index 1a667468d7..ccedd2207e 100644 --- a/package/libnl/libnl.mk +++ b/package/libnl/libnl.mk @@ -10,13 +10,8 @@ LIBNL_SITE = http://distfiles.gentoo.org/distfiles LIBNL_INSTALL_STAGING = YES LIBNL_INSTALL_TARGET_OPT = DESTDIR=$(TARGET_DIR) install -$(eval $(call AUTOTARGETS,package,libnl)) - -$(LIBNL_HOOK_POST_INSTALL): $(LIBNL_TARGET_INSTALL_TARGET) - $(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $(TARGET_DIR)/usr/lib/libnl.so* - touch $@ - -$(LIBNL_TARGET_UNINSTALL): - $(call MESSAGE,"Uninstalling") +define LIBNL_UNINSTALL_TARGET_CMDS rm -f $(TARGET_DIR)/usr/lib/libnl.so* - rm -f $(LIBNL_TARGET_INSTALL_TARGET) $(LIBNL_HOOK_POST_INSTALL) +endef + +$(eval $(call AUTOTARGETS,package,libnl)) From 020e028108d53c14ae257c8a643aa2d22ac00f4a Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Wed, 1 Sep 2010 23:18:30 +0200 Subject: [PATCH 40/74] dmraid: remove useless strip and use correct step override method For the target installation step, do not rely on the package being installed in the staging directory, as it may not be true. So the dmraid binary is directly taken from the build directory. Signed-off-by: Thomas Petazzoni --- package/dmraid/dmraid.mk | 24 +++++++----------------- 1 file changed, 7 insertions(+), 17 deletions(-) diff --git a/package/dmraid/dmraid.mk b/package/dmraid/dmraid.mk index 93d6561f64..ccd6a36268 100644 --- a/package/dmraid/dmraid.mk +++ b/package/dmraid/dmraid.mk @@ -12,23 +12,13 @@ DMRAID_MAKE = $(MAKE1) DMRAID_DEPENDENCIES:=lvm2 DMRAID_INSTALL_STAGING:=yes -$(eval $(call AUTOTARGETS,package,dmraid)) - -$(DMRAID_TARGET_INSTALL_TARGET): $(DMRAID_TARGET_INSTALL_STAGING) - $(call MESSAGE,"Installing to target") - $(INSTALL) -m 0755 $(STAGING_DIR)/usr/sbin/dmraid $(TARGET_DIR)/usr/sbin +define DMRAID_INSTALL_TARGET_CMDS + $(INSTALL) -m 0755 $(@D)/$(DMRAID_SUBDIR)/tools/dmraid $(TARGET_DIR)/usr/sbin $(INSTALL) -m 0755 package/dmraid/dmraid.init $(TARGET_DIR)/etc/init.d/dmraid - touch $@ +endef -ifeq ($(BR2_ENABLE_DEBUG),) -$(DMRAID_HOOK_POST_INSTALL): $(DMRAID_TARGET_INSTALL_TARGET) - $(STRIPCMD) $(STRIP_STRIP_ALL) $(TARGET_DIR)/usr/sbin/dmraid - touch $@ -endif - -$(DMRAID_TARGET_UNINSTALL): - $(call MESSAGE,"Uninstalling") -# makefile has no uninstall target.. -# $(MAKE) DESTDIR=$(STAGING_DIR) -C $(DMRAID_DIR) uninstall +define DMRAID_UNINSTALL_TARGET_CMDS rm -f $(TARGET_DIR)/usr/sbin/dmraid $(TARGET_DIR)/etc/init.d/dmraid - rm -f $(DMRAID_TARGET_INSTALL_TARGET) $(DMRAID_HOOK_POST_INSTALL) +endef + +$(eval $(call AUTOTARGETS,package,dmraid)) From 879465e040214d77238c7d42fcbad148a6580f8b Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Wed, 1 Sep 2010 23:19:39 +0200 Subject: [PATCH 41/74] alsa-lib: use correct step override method Signed-off-by: Thomas Petazzoni --- package/multimedia/alsa-lib/alsa-lib.mk | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/package/multimedia/alsa-lib/alsa-lib.mk b/package/multimedia/alsa-lib/alsa-lib.mk index 6e4c5754f9..c1a2b1a5d1 100644 --- a/package/multimedia/alsa-lib/alsa-lib.mk +++ b/package/multimedia/alsa-lib/alsa-lib.mk @@ -72,15 +72,16 @@ ALSA_LIB_CONF_ENV = CFLAGS="$(ALSA_LIB_CFLAGS)" \ # the above doesn't work with shared config.cache ALSA_LIB_USE_CONFIG_CACHE = NO -$(eval $(call AUTOTARGETS,package/multimedia,alsa-lib)) - -$(ALSA_LIB_TARGET_UNINSTALL): +define ALSA_LIB_UNINSTALL_TARGET_CMDS -rm -f $(TARGET_DIR)/usr/lib/libasound.so* -rm -rf $(TARGET_DIR)/usr/lib/alsa-lib -rm -rf $(TARGET_DIR)/usr/share/alsa +endef -$(ALSA_LIB_TARGET_CLEAN): +define ALSA_LIB_UNINSTALL_STAGING_CMDS -rm -f $(STAGING_DIR)/usr/lib/libasound.* -rm -rf $(STAGING_DIR)/usr/lib/alsa-lib -rm -rf $(STAGING_DIR)/usr/share/alsa +endef +$(eval $(call AUTOTARGETS,package/multimedia,alsa-lib)) From 5c421dde681467f10bc70c0d7a3863e63152ff60 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Wed, 1 Sep 2010 23:22:39 +0200 Subject: [PATCH 42/74] kismet: use correct step override method --- package/kismet/kismet.mk | 44 ++++++++++++++++++++++++++-------------- 1 file changed, 29 insertions(+), 15 deletions(-) diff --git a/package/kismet/kismet.mk b/package/kismet/kismet.mk index de66ee6019..482c7dbec5 100644 --- a/package/kismet/kismet.mk +++ b/package/kismet/kismet.mk @@ -29,24 +29,38 @@ ifeq ($(BR2_PACKAGE_KISMET_DRONE),y) KISMET_TARGET_CONFIGS += kismet_drone.conf endif -$(eval $(call AUTOTARGETS,package,kismet)) - -$(KISMET_TARGET_INSTALL_TARGET): - $(call MESSAGE,"Installing") ifdef KISMET_TARGET_BINARIES +define KISMET_INSTALL_TARGET_BINARIES $(INSTALL) -m 755 $(addprefix $(KISMET_DIR)/, $(KISMET_TARGET_BINARIES)) $(TARGET_DIR)/usr/bin +endef endif -ifdef KISMET_TARGET_CONFIGS - $(INSTALL) -m 644 $(addprefix $(KISMET_DIR)/conf/, $(KISMET_TARGET_CONFIGS)) $(TARGET_DIR)/etc -endif - touch $@ -$(KISMET_TARGET_UNINSTALL): - $(call MESSAGE,"Uninstalling") -ifdef KISMET_TARGET_BINARIES - rm -f $(addprefix $(TARGET_DIR)/usr/bin/, $(KISMET_TARGET_BINARIES)) -endif ifdef KISMET_TARGET_CONFIGS - rm -f $(addprefix $(TARGET_DIR)/etc/, $(KISMET_TARGET_CONFIGS)) +define KISMET_INSTALL_TARGET_CONFIGS + $(INSTALL) -m 644 $(addprefix $(KISMET_DIR)/conf/, $(KISMET_TARGET_CONFIGS)) $(TARGET_DIR)/etc +endef endif - rm -f $(KISMET_TARGET_INSTALL_TARGET) $(KISMET_HOOK_POST_INSTALL) + +define KISMET_INSTALL_TARGET_CMDS + $(KISMET_INSTALL_TARGET_BINARIES) + $(KISMET_INSTALL_TARGET_CONFIGS) +endef + +ifdef KISMET_TARGET_BINARIES +define KISMET_UNINSTALL_TARGET_BINARIES + rm -f $(addprefix $(TARGET_DIR)/usr/bin/, $(KISMET_TARGET_BINARIES)) +endef +endif + +ifdef KISMET_TARGET_CONFIGS +define KISMET_UNINSTALL_TARGET_CONFIGS + rm -f $(addprefix $(TARGET_DIR)/etc/, $(KISMET_TARGET_CONFIGS)) +endef +endif + +define KISMET_UNINSTALL_TARGET_CMDS + $(KISMET_UNINSTALL_TARGET_BINARIES) + $(KISMET_UNINSTALL_TARGET_CONFIGS) +endef + +$(eval $(call AUTOTARGETS,package,kismet)) From 2d30d8f4ebd4a8f4a259e214a96aab0f7124501f Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Wed, 1 Sep 2010 23:23:40 +0200 Subject: [PATCH 43/74] gawk: convert old-style hook to new-style hook Signed-off-by: Thomas Petazzoni --- package/gawk/gawk.mk | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/package/gawk/gawk.mk b/package/gawk/gawk.mk index 7ed7f9ddb0..8a544d8804 100644 --- a/package/gawk/gawk.mk +++ b/package/gawk/gawk.mk @@ -8,18 +8,19 @@ GAWK_VERSION = 3.1.8 GAWK_SITE = $(BR2_GNU_MIRROR)/gawk GAWK_TARGET_BINS = awk gawk igawk pgawk -$(eval $(call AUTOTARGETS,package,gawk)) -$(eval $(call AUTOTARGETS,package,gawk,host)) - -$(GAWK_HOOK_POST_INSTALL): $(GAWK_TARGET_INSTALL_TARGET) +define GAWK_CREATE_SYMLINK ln -sf /usr/bin/gawk $(TARGET_DIR)/usr/bin/awk - touch $@ +endef -$(GAWK_TARGET_UNINSTALL): - $(call MESSAGE,"Uninstalling") +GAWK_POST_INSTALL_TARGET_HOOKS += GAWK_CREATE_SYMLINK + +define GAWK_UNINSTALL_TARGET_CMDS rm -f $(addprefix $(TARGET_DIR)/usr/bin/, $(GAWK_TARGET_BINS)) rm -f $(TARGET_DIR)/usr/share/info/gawk*.info rm -f $(TARGET_DIR)/usr/share/man/man*/*gawk.1 rm -rf $(TARGET_DIR)/usr/libexec/awk rm -rf $(TARGET_DIR)/usr/share/awk - rm -f $(GAWK_TARGET_INSTALL_TARGET) $(GAWK_HOOK_POST_INSTALL) +endef + +$(eval $(call AUTOTARGETS,package,gawk)) +$(eval $(call AUTOTARGETS,package,gawk,host)) From 7d6e7bcc26d84846838a493d3c10e254ae824552 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Wed, 1 Sep 2010 23:24:17 +0200 Subject: [PATCH 44/74] lighttpd: use correct step override method Signed-off-by: Thomas Petazzoni --- package/lighttpd/lighttpd.mk | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/package/lighttpd/lighttpd.mk b/package/lighttpd/lighttpd.mk index 3ac1f07ad1..e6f913cbcb 100644 --- a/package/lighttpd/lighttpd.mk +++ b/package/lighttpd/lighttpd.mk @@ -44,11 +44,10 @@ else LIGHTTPD_CONF_OPT += --without-pcre endif -$(eval $(call AUTOTARGETS,package,lighttpd)) - -$(LIGHTTPD_TARGET_UNINSTALL): - $(call MESSAGE,"Uninstalling") +define LIGHTTPD_UNINSTALL_TARGET_CMDS rm -f $(TARGET_DIR)/usr/sbin/lighttpd rm -f $(TARGET_DIR)/usr/sbin/lighttpd-angel rm -rf $(TARGET_DIR)/usr/lib/lighttpd - rm -f $(LIGHTTPD_TARGET_INSTALL_TARGET) $(LIGHTTPD_HOOK_POST_INSTALL) +endef + +$(eval $(call AUTOTARGETS,package,lighttpd)) From b88c394685f3c77219da743d6e0c434312712cf4 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Wed, 1 Sep 2010 23:25:02 +0200 Subject: [PATCH 45/74] netperf: use correct step override method Signed-off-by: Thomas Petazzoni --- package/netperf/netperf.mk | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/package/netperf/netperf.mk b/package/netperf/netperf.mk index d198eee520..6bf9b5c172 100644 --- a/package/netperf/netperf.mk +++ b/package/netperf/netperf.mk @@ -8,18 +8,16 @@ NETPERF_VERSION = 2.4.5 NETPERF_SITE = ftp://ftp.netperf.org/netperf NETPERF_CONF_ENV = ac_cv_func_setpgrp_void=set -$(eval $(call AUTOTARGETS,package,netperf)) - -$(NETPERF_TARGET_INSTALL_TARGET): - $(call MESSAGE,"Installing to target") - $(INSTALL) -m 0755 $(NETPERF_DIR)/src/netperf \ +define NETPERF_INSTALL_TARGET_CMDS + $(INSTALL) -m 0755 $(@D)/src/netperf \ $(TARGET_DIR)/usr/bin/netperf - $(INSTALL) -m 0755 $(NETPERF_DIR)/src/netserver \ + $(INSTALL) -m 0755 $(@D)/src/netserver \ $(TARGET_DIR)/usr/bin/netserver - touch $@ +endef -$(NETPERF_TARGET_UNINSTALL): - $(call MESSAGE,"Uninstalling") +define NETPERF_UNINSTALL_TARGET_CMDS rm -f $(TARGET_DIR)/usr/bin/netperf rm -f $(TARGET_DIR)/usr/bin/netserver - rm -f $(NETPERF_TARGET_INSTALL_TARGET) $(NETPERF_HOOK_POST_INSTALL) +endef + +$(eval $(call AUTOTARGETS,package,netperf)) From f129a680fafc48d329d551590d7e0fa6208e49a0 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Wed, 1 Sep 2010 23:44:24 +0200 Subject: [PATCH 46/74] hostapd: use correct step override method Signed-off-by: Thomas Petazzoni --- package/hostapd/hostapd.mk | 78 +++++++++++++++++++++----------------- 1 file changed, 43 insertions(+), 35 deletions(-) diff --git a/package/hostapd/hostapd.mk b/package/hostapd/hostapd.mk index bde3766d77..d826030312 100644 --- a/package/hostapd/hostapd.mk +++ b/package/hostapd/hostapd.mk @@ -12,20 +12,43 @@ HOSTAPD_DEPENDENCIES = libnl ifeq ($(BR2_PACKAGE_OPENSSL),y) HOSTAPD_DEPENDENCIES += openssl + # OpenSSL is required for EXTRA_EAP and/or WPS + # We take care of that in Config.in +define HOSTAPD_OPENSSL_CONF + echo "CONFIG_CRYPTO=internal" >>$(HOSTAPD_CONFIG) + echo "CONFIG_INTERNAL_LIBTOMMATH=y" >>$(HOSTAPD_CONFIG) + echo "CONFIG_TLS=internal" >>$(HOSTAPD_CONFIG) +endef endif -$(eval $(call AUTOTARGETS,package,hostapd)) +ifneq ($(BR2_INET_IPV6),y) +define HOSTAPD_IPV6_CONF + $(SED) "s/CONFIG_IPV6=y//" $(HOSTAPD_CONFIG) +endef +endif -$(HOSTAPD_TARGET_CONFIGURE): - cp $(HOSTAPD_DIR)/$(HOSTAPD_SUBDIR)/defconfig $(HOSTAPD_CONFIG) - $(SED) "s/\/local//" $(HOSTAPD_DIR)/$(HOSTAPD_SUBDIR)/Makefile +ifneq ($(BR2_PACKAGE_HOSTAPD_EXTRA_EAP),y) +define HOSTAPD_EXTRA_EAP_CONF + $(SED) "s/CONFIG_EAP_MSCHAPV2=y//" $(HOSTAPD_CONFIG) + $(SED) "s/CONFIG_EAP_PEAP=y//" $(HOSTAPD_CONFIG) + $(SED) "s/CONFIG_EAP_TLS=y//" $(HOSTAPD_CONFIG) + $(SED) "s/CONFIG_EAP_TTLS=y//" $(HOSTAPD_CONFIG) +endef +endif + +ifeq ($(BR2_PACKAGE_HOSTAPD_WPS),y) +define HOSTAPD_WPS_CONF + echo "CONFIG_WPS=y" >>$(HOSTAPD_CONFIG) + echo "CONFIG_WPS_UPNP=y" >>$(HOSTAPD_CONFIG) +endef +endif + +define HOSTAPD_CONFIGURE_CMDS + cp $(@D)/$(HOSTAPD_SUBDIR)/defconfig $(HOSTAPD_CONFIG) + $(SED) "s/\/local//" $(@D)/$(HOSTAPD_SUBDIR)/Makefile echo "CFLAGS += $(TARGET_CFLAGS)" >>$(HOSTAPD_CONFIG) echo "LDFLAGS += $(TARGET_LDFLAGS)" >>$(HOSTAPD_CONFIG) echo "CC = $(TARGET_CC)" >>$(HOSTAPD_CONFIG) -# IPv6 -ifneq ($(BR2_INET_IPV6),y) - $(SED) "s/CONFIG_IPV6=y//" $(HOSTAPD_CONFIG) -endif # EAP echo "CONFIG_EAP_AKA=y" >>$(HOSTAPD_CONFIG) echo "CONFIG_EAP_AKA_PRIME=y" >>$(HOSTAPD_CONFIG) @@ -35,24 +58,6 @@ endif echo "CONFIG_EAP_PSK=y" >>$(HOSTAPD_CONFIG) echo "CONFIG_EAP_SAKE=y" >>$(HOSTAPD_CONFIG) echo "CONFIG_EAP_SIM=y" >>$(HOSTAPD_CONFIG) -ifneq ($(BR2_PACKAGE_HOSTAPD_EXTRA_EAP),y) - $(SED) "s/CONFIG_EAP_MSCHAPV2=y//" $(HOSTAPD_CONFIG) - $(SED) "s/CONFIG_EAP_PEAP=y//" $(HOSTAPD_CONFIG) - $(SED) "s/CONFIG_EAP_TLS=y//" $(HOSTAPD_CONFIG) - $(SED) "s/CONFIG_EAP_TTLS=y//" $(HOSTAPD_CONFIG) -endif -# OpenSSL is required for EXTRA_EAP and/or WPS -# We take care of that in Config.in -ifneq ($(BR2_PACKAGE_OPENSSL),y) - echo "CONFIG_CRYPTO=internal" >>$(HOSTAPD_CONFIG) - echo "CONFIG_INTERNAL_LIBTOMMATH=y" >>$(HOSTAPD_CONFIG) - echo "CONFIG_TLS=internal" >>$(HOSTAPD_CONFIG) -endif -# WPS -ifeq ($(BR2_PACKAGE_HOSTAPD_WPS),y) - echo "CONFIG_WPS=y" >>$(HOSTAPD_CONFIG) - echo "CONFIG_WPS_UPNP=y" >>$(HOSTAPD_CONFIG) -endif # Drivers echo "CONFIG_DRIVER_WIRED=y" >>$(HOSTAPD_CONFIG) echo "CONFIG_DRIVER_PRISM54=y" >>$(HOSTAPD_CONFIG) @@ -62,19 +67,22 @@ endif echo "CONFIG_IEEE80211R=y" >>$(HOSTAPD_CONFIG) echo "CONFIG_IEEE80211W=y" >>$(HOSTAPD_CONFIG) echo "CONFIG_RADIUS_SERVER=y" >>$(HOSTAPD_CONFIG) - touch $@ + $(HOSTAPD_OPENSSL_CONF) + $(HOSTAPD_IPV6_CONF) + $(HOSTAPD_EXTRA_EAP_CONF) + $(HOSTAPD_WPS_CONF) +endef -$(HOSTAPD_TARGET_INSTALL_TARGET): - $(call MESSAGE,"Installing to target") - $(INSTALL) -m 0755 $(HOSTAPD_DIR)/$(HOSTAPD_SUBDIR)/hostapd \ +define HOSTAPD_INSTALL_TARGET_CMDS + $(INSTALL) -m 0755 $(@D)/$(HOSTAPD_SUBDIR)/hostapd \ $(TARGET_DIR)/usr/sbin - $(INSTALL) -m 0755 $(HOSTAPD_DIR)/$(HOSTAPD_SUBDIR)/hostapd_cli \ + $(INSTALL) -m 0755 $(@D)/$(HOSTAPD_SUBDIR)/hostapd_cli \ $(TARGET_DIR)/usr/bin - touch $@ +endef -$(HOSTAPD_TARGET_UNINSTALL): - $(call MESSAGE,"Uninstalling") +define HOSTAPD_UNINSTALL_TARGET_CMDS rm -f $(TARGET_DIR)/usr/sbin/hostapd rm -f $(TARGET_DIR)/usr/bin/hostapd - rm -f $(HOSTAPD_TARGET_INSTALL_TARGET) $(HOSTAPD_HOOK_POST_INSTALL) +endef +$(eval $(call AUTOTARGETS,package,hostapd)) From bcffe7a77e59fd5c89e33c1128b0aa241c00558c Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Wed, 1 Sep 2010 23:45:05 +0200 Subject: [PATCH 47/74] sqlite: use correct step override method Signed-off-by: Thomas Petazzoni --- package/sqlite/sqlite.mk | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/package/sqlite/sqlite.mk b/package/sqlite/sqlite.mk index 1d336f6597..c7d07317f6 100644 --- a/package/sqlite/sqlite.mk +++ b/package/sqlite/sqlite.mk @@ -35,15 +35,16 @@ else SQLITE_CONF_OPT += --disable-readline endif -$(eval $(call AUTOTARGETS,package,sqlite)) - -$(SQLITE_TARGET_UNINSTALL): - $(call MESSAGE,"Uninstalling") +define SQLITE_UNINSTALL_TARGET_CMDS rm -f $(TARGET_DIR)/usr/bin/sqlite3 rm -f $(TARGET_DIR)/usr/lib/libsqlite3* +endef + +define SQLITE_UNINSTALL_STAGING_CMDS rm -f $(STAGING_DIR)/usr/bin/sqlite3 rm -f $(STAGING_DIR)/usr/lib/libsqlite3* rm -f $(STAGING_DIR)/usr/lib/pkgconfig/sqlite3.pc rm -f $(STAGING_DIR)/usr/include/sqlite3*.h - rm -f $(SQLITE_TARGET_INSTALL_TARGET) $(SQLITE_HOOK_POST_INSTALL) +endef +$(eval $(call AUTOTARGETS,package,sqlite)) From 3396401dad1aa6324a9ecddfbf6aa8e2ca5e2072 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Wed, 1 Sep 2010 23:45:56 +0200 Subject: [PATCH 48/74] nano: use correct step override method Signed-off-by: Thomas Petazzoni --- package/nano/nano.mk | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/package/nano/nano.mk b/package/nano/nano.mk index 3e8ba5066a..47355a359c 100644 --- a/package/nano/nano.mk +++ b/package/nano/nano.mk @@ -10,15 +10,12 @@ NANO_MAKE_ENV = CURSES_LIB="-lncurses" NANO_CONF_OPT = --without-slang --enable-tiny NANO_DEPENDENCIES = ncurses -$(eval $(call AUTOTARGETS,package,nano)) +define NANO_INSTALL_TARGET_CMDS + $(INSTALL) -m 0755 $(@D)/src/nano $(TARGET_DIR)/usr/bin/nano +endef -$(NANO_TARGET_INSTALL_TARGET): - $(call MESSAGE,"Installing to target") - $(INSTALL) -m 0755 $(NANO_DIR)/src/nano \ - $(TARGET_DIR)/usr/bin/nano - touch $@ - -$(NANO_TARGET_UNINSTALL): - $(call MESSAGE,"Uninstalling") +define NANO_UNINSTALL_TARGET_CMDS rm -f $(TARGET_DIR)/usr/bin/nano - rm -f $(NANO_TARGET_INSTALL_TARGET) $(NANO_HOOK_POST_INSTALL) +endef + +$(eval $(call AUTOTARGETS,package,nano)) From 3ec45c80b18b15233344125ab8bc12472cfd3dc6 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Wed, 1 Sep 2010 23:46:24 +0200 Subject: [PATCH 49/74] openntpd: use correct step override method Signed-off-by: Thomas Petazzoni --- package/openntpd/openntpd.mk | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/package/openntpd/openntpd.mk b/package/openntpd/openntpd.mk index c42ed9c54a..81b268b1bd 100644 --- a/package/openntpd/openntpd.mk +++ b/package/openntpd/openntpd.mk @@ -9,11 +9,10 @@ OPENNTPD_SITE = ftp://ftp.openbsd.org/pub/OpenBSD/OpenNTPD OPENNTPD_CONF_OPT = --with-builtin-arc4random --disable-strip OPENNTPD_INSTALL_TARGET_OPT = DESTDIR=$(TARGET_DIR) install -$(eval $(call AUTOTARGETS,package,openntpd)) - -$(OPENNTPD_TARGET_UNINSTALL): - $(call MESSAGE,"Uninstalling") +define OPENNTPD_UNINSTALL_TARGET_CMDS rm -f $(TARGET_DIR)/usr/sbin/ntpd rm -f $(TARGET_DIR)/etc/ntpd.conf rm -f $(TARGET_DIR)/usr/share/man/man?/ntpd* - rm -f $(OPENNTPD_TARGET_INSTALL_TARGET) $(OPENNTPD_HOOK_POST_INSTALL) +endef + +$(eval $(call AUTOTARGETS,package,openntpd)) From dfe97a1ed459bc078c5fa8f55ebc0ec541b76eb4 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Wed, 1 Sep 2010 23:48:53 +0200 Subject: [PATCH 50/74] prboom: use correctly the autotargets infrastructrure Signed-off-by: Thomas Petazzoni --- package/games/prboom/prboom.mk | 49 +++++++++++++--------------------- 1 file changed, 18 insertions(+), 31 deletions(-) diff --git a/package/games/prboom/prboom.mk b/package/games/prboom/prboom.mk index 5da82f2aac..228c78886d 100644 --- a/package/games/prboom/prboom.mk +++ b/package/games/prboom/prboom.mk @@ -3,49 +3,36 @@ # PrBoom # ############################################################# -PRBOOM_VERSION:=2.4.7 - +PRBOOM_VERSION = 2.4.7 PRBOOM_DEPENDENCIES = sdl SDL_net sdl_mixer -$(eval $(call AUTOTARGETS,package/games,prboom)) - -$(PRBOOM_TARGET_EXTRACT): - $(ZCAT) $(DL_DIR)/$(PRBOOM_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) - - $(CONFIG_UPDATE) $(PRBOOM_DIR)/autotools - touch $@ - -$(PRBOOM_TARGET_CONFIGURE): - (cd $(PRBOOM_DIR); \ - $(TARGET_CONFIGURE_ARGS) \ - $(TARGET_CONFIGURE_OPTS) \ - ./configure $(QUIET) \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --prefix=/usr \ +PRBOOM_CONF_OPT = \ --oldincludedir=$(STAGING_DIR)/usr/include \ --with-sdl-prefix=$(STAGING_DIR)/usr \ --with-sdl-exec-prefix=$(STAGING_DIR)/usr \ --disable-cpu-opt \ --disable-sdltest \ --disable-gl \ - --without-x \ - ) -ifeq ($(BR2_ENDIAN),"BIG") + --without-x + +define PRBOOM_BIG_ENDIAN_FIXUP $(SED) 's,.*#undef WORDS_BIGENDIAN.*,#define WORDS_BIGENDIAN 1,g' $(PRBOOM_DIR)/config.h +endef + +ifeq ($(BR2_ENDIAN),"BIG") +PRBOOM_POST_CONFIGURE_HOOKS += PRBOOM_BIG_ENDIAN_FIXUP endif - touch $@ -$(PRBOOM_TARGET_INSTALL_TARGET): - $(INSTALL) -D $(PRBOOM_DIR)/src/prboom $(TARGET_DIR)/usr/games/prboom - $(INSTALL) -D $(PRBOOM_DIR)/src/prboom-game-server $(TARGET_DIR)/usr/games/prboom-game-server - $(INSTALL) -D $(PRBOOM_DIR)/data/prboom.wad $(TARGET_DIR)/usr/share/games/doom/prboom.wad - $(STRIPCMD) $(STRIP_STRIP_ALL) $(TARGET_DIR)/usr/games/prboom - $(STRIPCMD) $(STRIP_STRIP_ALL) $(TARGET_DIR)/usr/games/prboom-game-server - touch $@ +define PRBOOM_INSTALL_TARGET_CMDS + $(INSTALL) -D $(@D)/src/prboom $(TARGET_DIR)/usr/games/prboom + $(INSTALL) -D $(@D)/src/prboom-game-server $(TARGET_DIR)/usr/games/prboom-game-server + $(INSTALL) -D $(@D)/data/prboom.wad $(TARGET_DIR)/usr/share/games/doom/prboom.wad +endef -$(PRBOOM_TARGET_CLEAN): +define PRBOOM_UINSTALL_TARGET_CMDS rm -rf $(TARGET_DIR)/usr/share/games/doom/prboom.wad \ $(TARGET_DIR)/usr/games/prboom-game-server \ $(TARGET_DIR)/usr/games/prboom - -$(MAKE) -C $(PRBOOM_DIR) clean +endef + +$(eval $(call AUTOTARGETS,package/games,prboom)) From edf47fc62c129b5c45c443ae058f290d7cb7a013 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Wed, 1 Sep 2010 23:49:33 +0200 Subject: [PATCH 51/74] mdadm: use correct step override method Signed-off-by: Thomas Petazzoni --- package/mdadm/mdadm.mk | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/package/mdadm/mdadm.mk b/package/mdadm/mdadm.mk index 1368a1e593..3b71724323 100644 --- a/package/mdadm/mdadm.mk +++ b/package/mdadm/mdadm.mk @@ -22,8 +22,8 @@ MDADM_INSTALL_TARGET_OPT = \ MDADM_UNINSTALL_TARGET_OPT = \ DESTDIR=$(TARGET_DIR)/usr -C $(MDADM_DIR) uninstall -$(eval $(call AUTOTARGETS,package,mdadm)) +define MDADM_CONFIGURE_CMDS + # Do nothing +endef -$(MDADM_TARGET_CONFIGURE): - $(call MESSAGE,"Configuring") - $(Q)touch $@ +$(eval $(call AUTOTARGETS,package,mdadm)) From 0d5cf75df62825209e134841f0e82f205a0a8c87 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Wed, 1 Sep 2010 23:50:19 +0200 Subject: [PATCH 52/74] less: use correct step override method Signed-off-by: Thomas Petazzoni --- package/less/less.mk | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/package/less/less.mk b/package/less/less.mk index bae1cf6546..6f985ed94a 100644 --- a/package/less/less.mk +++ b/package/less/less.mk @@ -8,15 +8,12 @@ LESS_VERSION = 436 LESS_SITE = http://www.greenwoodsoftware.com/less LESS_DEPENDENCIES = ncurses -$(eval $(call AUTOTARGETS,package,less)) +define LESS_INSTALL_TARGET_CMDS + $(INSTALL) -m 0755 $(@D)/less $(TARGET_DIR)/usr/bin/less +endef -$(LESS_TARGET_INSTALL_TARGET): - $(call MESSAGE,"Installing to target") - $(INSTALL) -m 0755 $(LESS_DIR)/less \ - $(TARGET_DIR)/usr/bin/less - touch $@ - -$(LESS_TARGET_UNINSTALL): - $(call MESSAGE,"Uninstalling") +define LESS_UNINSTALL_TARGET_CMDS rm -f $(TARGET_DIR)/usr/bin/less - rm -f $(LESS_TARGET_INSTALL_TARGET) $(LESS_HOOK_POST_INSTALL) +endef + +$(eval $(call AUTOTARGETS,package,less)) From 56993a53805dafa1dbd3a11d450c3a5c8ae39e6c Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Wed, 1 Sep 2010 23:52:52 +0200 Subject: [PATCH 53/74] iptables: convert old-style hook to new-style hook Signed-off-by: Thomas Petazzoni --- package/iptables/iptables.mk | 32 +++++++++++++++++++++----------- 1 file changed, 21 insertions(+), 11 deletions(-) diff --git a/package/iptables/iptables.mk b/package/iptables/iptables.mk index 0b7dae181a..21146bce69 100644 --- a/package/iptables/iptables.mk +++ b/package/iptables/iptables.mk @@ -16,24 +16,34 @@ endif IPTABLES_AUTORECONF = YES IPTABLES_LIBTOOL_PATCH = NO -$(eval $(call AUTOTARGETS,package,iptables)) - -$(IPTABLES_HOOK_POST_INSTALL): $(IPTABLES_TARGET_INSTALL_TARGET) +define IPTABLES_TARGET_SYMLINK_CREATE ln -sf iptables-multi $(TARGET_DIR)/usr/sbin/iptables ln -sf iptables-multi $(TARGET_DIR)/usr/sbin/iptables-save ln -sf iptables-multi $(TARGET_DIR)/usr/sbin/iptables-restore -ifeq ($(BR2_INET_IPV6),y) +endef + +define IPTABLES_TARGET_IPV6_SYMLINK_CREATE ln -sf ip6tables-multi $(TARGET_DIR)/usr/sbin/ip6tables ln -sf ip6tables-multi $(TARGET_DIR)/usr/sbin/ip6tables-save ln -sf ip6tables-multi $(TARGET_DIR)/usr/sbin/ip6tables-restore -else - rm -f $(TARGET_DIR)/usr/lib/libip6tc.* -endif - touch $@ +endef -$(IPTABLES_TARGET_UNINSTALL): - $(call MESSAGE,"Uninstalling") +define IPTABLES_TARGET_IPV6_REMOVE + rm -f $(TARGET_DIR)/usr/lib/libip6tc.* +endef + +IPTABLES_POST_INSTALL_TARGET_HOOKS += IPTABLES_TARGET_SYMLINK_CREATE + +ifeq ($(BR2_INET_IPV6),y) +IPTABLES_POST_INSTALL_TARGET_HOOKS += IPTABLES_TARGET_IPV6_SYMLINK_CREATE +else +IPTABLES_POST_INSTALL_TARGET_HOOKS += IPTABLES_TARGET_IPV6_REMOVE +endif + +define IPTABLES_UNINSTALL_TARGET_CMDS rm -f $(TARGET_DIR)/usr/bin/iptables-xml rm -f $(TARGET_DIR)/usr/sbin/iptables* $(TARGET_DIR)/usr/sbin/ip6tables* rm -rf $(TARGET_DIR)/usr/lib/xtables - rm -f $(IPTABLES_TARGET_INSTALL_TARGET) $(IPTABLES_HOOK_POST_INSTALL) +endef + +$(eval $(call AUTOTARGETS,package,iptables)) From 138212a1046fb4a63d28a88bf6f53b71e35a281b Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Wed, 1 Sep 2010 23:53:35 +0200 Subject: [PATCH 54/74] openvpn: use correct step override method Signed-off-by: Thomas Petazzoni --- package/openvpn/openvpn.mk | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/package/openvpn/openvpn.mk b/package/openvpn/openvpn.mk index 714938b4b5..8d99cab212 100644 --- a/package/openvpn/openvpn.mk +++ b/package/openvpn/openvpn.mk @@ -26,20 +26,18 @@ else OPENVPN_CONF_OPT += --disable-crypto --disable-ssl endif -$(eval $(call AUTOTARGETS,package,openvpn)) - -$(OPENVPN_TARGET_INSTALL_TARGET): - $(call MESSAGE,"Installing") - $(INSTALL) -m 755 $(OPENVPN_DIR)/openvpn \ +define OPENVPN_INSTALL_TARGET_CMDS + $(INSTALL) -m 755 $(@D)/openvpn \ $(TARGET_DIR)/usr/sbin/openvpn if [ ! -f $(TARGET_DIR)/etc/init.d/openvpn ]; then \ $(INSTALL) -m 755 -D package/openvpn/openvpn.init \ $(TARGET_DIR)/etc/init.d/openvpn; \ fi - touch $@ +endef -$(OPENVPN_TARGET_UNINSTALL): - $(call MESSAGE,"Uninstalling") +define OPENVPN_UNINSTALL_TARGET_CMDS rm -f $(TARGET_DIR)/usr/sbin/openvpn rm -f $(TARGET_DIR)/etc/init.d/openvpn - rm -f $(OPENVPN_TARGET_INSTALL_TARGET) $(OPENVPN_HOOK_POST_INSTALL) +endef + +$(eval $(call AUTOTARGETS,package,openvpn)) From 0bc275192ec181afc6826a4347ebafdaedd02cad Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Wed, 1 Sep 2010 23:55:07 +0200 Subject: [PATCH 55/74] ntfsprogs: use correct step override method The target installation step is removed, as the default 'make install' already does the correct thing. Signed-off-by: Thomas Petazzoni --- package/ntfsprogs/ntfsprogs.mk | 26 ++++---------------------- 1 file changed, 4 insertions(+), 22 deletions(-) diff --git a/package/ntfsprogs/ntfsprogs.mk b/package/ntfsprogs/ntfsprogs.mk index 2046d29a8e..4557747ec7 100644 --- a/package/ntfsprogs/ntfsprogs.mk +++ b/package/ntfsprogs/ntfsprogs.mk @@ -16,29 +16,11 @@ ifeq ($(BR2_PACKAGE_LIBFUSE),y) NTFSPROGS_DEPENDENCIES += libfuse endif -$(eval $(call AUTOTARGETS,package,ntfsprogs)) - -$(NTFSPROGS_TARGET_INSTALL_TARGET): $(NTFSPROGS_TARGET_INSTALL_STAGING) - $(call MESSAGE,"Installing to target") - cp -dpf $(STAGING_DIR)/usr/lib/libntfs.so* $(TARGET_DIR)/usr/lib/ - $(INSTALL) -m 0755 $(addprefix $(STAGING_DIR)/usr/bin/,$(NTFSPROGS_BIN)) $(TARGET_DIR)/usr/bin - $(INSTALL) -m 0755 $(addprefix $(STAGING_DIR)/usr/sbin/,$(NTFSPROGS_SBIN)) $(TARGET_DIR)/usr/sbin - ln -s /usr/sbin/mkntfs $(TARGET_DIR)/sbin/mkfs.ntfs - touch $@ - -ifeq ($(BR2_ENABLE_DEBUG),) -$(NTFSPROGS_HOOK_POST_INSTALL): $(NTFSPROGS_TARGET_INSTALL_TARGET) - $(STRIPCMD) $(STRIP_STRIP_ALL) $(TARGET_DIR)/usr/lib/libntfs.so* - $(STRIPCMD) $(STRIP_STRIP_ALL) $(addprefix $(TARGET_DIR)/usr/bin/,$(NTFSPROGS_BIN)) - $(STRIPCMD) $(STRIP_STRIP_ALL) $(addprefix $(TARGET_DIR)/usr/sbin/,$(NTFSPROGS_SBIN)) - touch $@ -endif - -$(NTFSPROGS_TARGET_UNINSTALL): - $(call MESSAGE,"Uninstalling") - $(MAKE) DESTDIR=$(STAGING_DIR) -C $(NTFSPROGS_DIR) uninstall +define NTFSPROGS_UNINSTALL_TARGET_CMDS rm -f $(TARGET_DIR)/usr/lib/libntfs.so* rm -f $(addprefix $(TARGET_DIR)/usr/bin/,$(NTFSPROGS_BIN)) rm -f $(addprefix $(TARGET_DIR)/usr/sbin/,$(NTFSPROGS_SBIN)) -unlink $(TARGET_DIR)/sbin/mkfs.ntfs - rm -f $(NTFSPROGS_TARGET_INSTALL_STAGING) $(NTFSPROGS_TARGET_INSTALL_TARGET) $(NTFSPROGS_HOOK_POST_INSTALL) +endef + +$(eval $(call AUTOTARGETS,package,ntfsprogs)) From 3dbdbda0b8aca70f5bed1e249b6709a2611160f5 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Wed, 1 Sep 2010 23:58:12 +0200 Subject: [PATCH 56/74] dbus: convert old-style hook to new-style hook Signed-off-by: Thomas Petazzoni --- package/dbus/dbus.mk | 37 +++++++++++++++++++++++-------------- 1 file changed, 23 insertions(+), 14 deletions(-) diff --git a/package/dbus/dbus.mk b/package/dbus/dbus.mk index e93738e35c..141cf69ffc 100644 --- a/package/dbus/dbus.mk +++ b/package/dbus/dbus.mk @@ -49,6 +49,29 @@ else DBUS_CONF_OPT += --without-x endif +# fix rebuild (dbus makefile errors out if /var/lib/dbus is a symlink) +define DBUS_REMOVE_VAR_LIB_DBUS + rm -rf $(TARGET_DIR)/var/lib/dbus +endef + +DBUS_POST_BUILD_HOOKS += DBUS_REMOVE_VAR_LIB_DBUS + +define DBUS_REMOVE_DEVFILES + rm -rf $(TARGET_DIR)/usr/lib/dbus-1.0 +endef + +ifneq ($(BR2_HAVE_DEVFILES),y) +DBUS_POST_INSTALL_TARGET_HOOKS += DBUS_REMOVE_DEVFILES +endif + +define DBUS_INSTALL_TARGET_FIXUP + rm -rf $(TARGET_DIR)/var/lib/dbus + ln -sf /tmp/dbus $(TARGET_DIR)/var/lib/dbus + $(INSTALL) -m 0755 package/dbus/S30dbus $(TARGET_DIR)/etc/init.d +endef + +DBUS_POST_INSTALL_TARGET_HOOKS += DBUS_INSTALL_TARGET_FIXUP + HOST_DBUS_DEPENDENCIES = host-pkg-config host-expat HOST_DBUS_CONF_OPT = \ --with-dbus-user=dbus \ @@ -73,17 +96,3 @@ HOST_DBUS_POST_INSTALL_HOOKS += HOST_DBUS_GEN_INTROSPECT $(eval $(call AUTOTARGETS,package,dbus)) $(eval $(call AUTOTARGETS,package,dbus,host)) - -# fix rebuild (dbus makefile errors out if /var/lib/dbus is a symlink) -$(DBUS_HOOK_POST_BUILD): $(DBUS_TARGET_BUILD) - rm -rf $(TARGET_DIR)/var/lib/dbus - touch $@ - -$(DBUS_HOOK_POST_INSTALL): $(DBUS_TARGET_INSTALL_TARGET) -ifneq ($(BR2_HAVE_DEVFILES),y) - rm -rf $(TARGET_DIR)/usr/lib/dbus-1.0 -endif - rm -rf $(TARGET_DIR)/var/lib/dbus - ln -sf /tmp/dbus $(TARGET_DIR)/var/lib/dbus - $(INSTALL) -m 0755 package/dbus/S30dbus $(TARGET_DIR)/etc/init.d - touch $@ From 523394b782be51ab8490853b2b6e7ec8353d4ca0 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Wed, 1 Sep 2010 23:58:33 +0200 Subject: [PATCH 57/74] docker: remove useless post install stripping hook Signed-off-by: Thomas Petazzoni --- package/docker/docker.mk | 4 ---- 1 file changed, 4 deletions(-) diff --git a/package/docker/docker.mk b/package/docker/docker.mk index 5e38653f86..5b4cd3a341 100644 --- a/package/docker/docker.mk +++ b/package/docker/docker.mk @@ -22,7 +22,3 @@ DOCKER_INSTALL_TARGET_OPT = PREFIX=$(TARGET_DIR)/usr install DOCKER_DEPENDENCIES = host-pkg-config libglib2 xserver_xorg-server $(eval $(call AUTOTARGETS,package,docker)) - -$(DOCKER_HOOK_POST_INSTALL): $(DOCKER_TARGET_INSTALL_TARGET) - $(STRIPCMD) $(STRIP_STRIP_ALL) $(TARGET_DIR)/usr/bin/docker - touch $@ From bf65aad5d96cff92aa679e0349ffb52bf6cd1d4c Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Wed, 1 Sep 2010 23:58:49 +0200 Subject: [PATCH 58/74] expat: remove useless post install stripping hook Signed-off-by: Thomas Petazzoni --- package/expat/expat.mk | 4 ---- 1 file changed, 4 deletions(-) diff --git a/package/expat/expat.mk b/package/expat/expat.mk index 5b4eb97e21..5d68e36642 100644 --- a/package/expat/expat.mk +++ b/package/expat/expat.mk @@ -20,7 +20,3 @@ EXPAT_DEPENDENCIES = host-pkg-config $(eval $(call AUTOTARGETS,package,expat)) $(eval $(call AUTOTARGETS,package,expat,host)) - -$(EXPAT_HOOK_POST_INSTALL): $(EXPAT_TARGET_INSTALL_TARGET) - $(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $(TARGET_DIR)/usr/lib/libexpat.so.* - touch $@ From 7811b05c9be41bfe67068d71c90bb28c54165efd Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Wed, 1 Sep 2010 23:59:35 +0200 Subject: [PATCH 59/74] gvfs: convert to new style hook, remove useless stripping Signed-off-by: Thomas Petazzoni --- package/gvfs/gvfs.mk | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/package/gvfs/gvfs.mk b/package/gvfs/gvfs.mk index 64e6df4766..7638f541ac 100644 --- a/package/gvfs/gvfs.mk +++ b/package/gvfs/gvfs.mk @@ -69,12 +69,10 @@ else GVFS_CONF_OPT += --disable-samba endif -$(eval $(call AUTOTARGETS,package,gvfs)) - -$(GVFS_HOOK_POST_INSTALL): $(GVFS_TARGET_INSTALL_TARGET) +define GVFS_REMOVE_USELESS_BINARY rm $(TARGET_DIR)/usr/bin/gvfs-less -ifneq ($(BR2_ENABLE_DEBUG),y) - $(STRIPCMD) $(STRIP_STRIP_ALL) $(TARGET_DIR)/usr/bin/gvfs* - $(STRIPCMD) $(STRIP_STRIP_ALL) $(TARGET_DIR)/usr/libexec/gvfs* -endif - touch $@ +endef + +GVFS_POST_INSTALL_TARGET_HOOKS += GVFS_REMOVE_USELESS_BINARY + +$(eval $(call AUTOTARGETS,package,gvfs)) From 23ad529cb5426435490a3eb68c4ef5840da8a613 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Thu, 2 Sep 2010 00:04:13 +0200 Subject: [PATCH 60/74] haserl: convert to new style hook Signed-off-by: Thomas Petazzoni --- package/haserl/haserl.mk | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/package/haserl/haserl.mk b/package/haserl/haserl.mk index 257a257ae1..53b5548411 100644 --- a/package/haserl/haserl.mk +++ b/package/haserl/haserl.mk @@ -22,9 +22,10 @@ ifeq ($(BR2_PACKAGE_HASERL_WITH_LUA),y) HASERL_DEPENDENCIES += lua endif -$(eval $(call AUTOTARGETS,package,haserl)) - -# haserl 0.8.0 installs unneeded examples to /usr/share/haserl - remove them -$(HASERL_HOOK_POST_INSTALL): $(HASERL_TARGET_INSTALL_TARGET) +define HASERL_REMOVE_EXAMPLES rm -rf $(TARGET_DIR)/usr/share/haserl - touch $@ +endef + +HASERL_POST_INSTALL_TARGET_HOOKS += HASERL_REMOVE_EXAMPLES + +$(eval $(call AUTOTARGETS,package,haserl)) From 0437f157ba87fcd239a8a5381b53cf23d8f0d7a6 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Thu, 2 Sep 2010 00:05:28 +0200 Subject: [PATCH 61/74] ifplugd: convert to new style hook Signed-off-by: Thomas Petazzoni --- package/ifplugd/ifplugd.mk | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/package/ifplugd/ifplugd.mk b/package/ifplugd/ifplugd.mk index 945d366d97..5e66cea573 100644 --- a/package/ifplugd/ifplugd.mk +++ b/package/ifplugd/ifplugd.mk @@ -16,20 +16,20 @@ IFPLUGD_CONF_OPT = --disable-lynx IFPLUGD_DEPENDENCIES = libdaemon -$(eval $(call AUTOTARGETS,package,ifplugd)) - -$(IFPLUGD_HOOK_POST_INSTALL): $(IFPLUGD_TARGET_INSTALL_TARGET) - $(STRIPCMD) $(STRIP_STRIP_ALL) $(TARGET_DIR)/usr/sbin/ifplugd - $(STRIPCMD) $(STRIP_STRIP_ALL) $(TARGET_DIR)/usr/sbin/ifplugstatus +define IFPLUGD_INSTALL_FIXUP $(INSTALL) -d $(TARGET_DIR)/etc/ifplugd @if [ ! -f $(TARGET_DIR)/etc/ifplugd/ifplugd.conf ]; then \ - $(INSTALL) $(IFPLUGD_DIR)/conf/ifplugd.conf $(TARGET_DIR)/etc/ifplugd/; \ + $(INSTALL) $(@D)/conf/ifplugd.conf $(TARGET_DIR)/etc/ifplugd/; \ $(SED) 's^\(ARGS=.*\)w^\1^' $(TARGET_DIR)/etc/ifplugd/ifplugd.conf; \ fi - $(INSTALL) -m 0755 $(IFPLUGD_DIR)/conf/ifplugd.action \ + $(INSTALL) -m 0755 $(@D)/conf/ifplugd.action \ $(TARGET_DIR)/etc/ifplugd/ - $(INSTALL) -m 0755 $(IFPLUGD_DIR)/conf/ifplugd.init \ + $(INSTALL) -m 0755 $(@D)/conf/ifplugd.init \ $(TARGET_DIR)/etc/init.d/S45ifplugd # don't use bash for init script $(SED) 's^/bin/bash^/bin/sh^g' $(TARGET_DIR)/etc/init.d/S45ifplugd - touch $@ +endef + +IFPLUGD_POST_INSTALL_TARGET_HOOKS += IFPLUGD_INSTALL_FIXUP + +$(eval $(call AUTOTARGETS,package,ifplugd)) From 0355eb522b0ab354df6262c8ef72e56403720d5b Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Thu, 2 Sep 2010 00:06:18 +0200 Subject: [PATCH 62/74] kexec: convert to new style hook Signed-off-by: Thomas Petazzoni --- package/kexec/kexec.mk | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/package/kexec/kexec.mk b/package/kexec/kexec.mk index 4367885171..5081ee81a8 100644 --- a/package/kexec/kexec.mk +++ b/package/kexec/kexec.mk @@ -16,12 +16,10 @@ else KEXEC_CONF_OPT += --without-zlib endif -$(eval $(call AUTOTARGETS,package,kexec)) - -$(KEXEC_HOOK_POST_INSTALL): $(KEXEC_TARGET_INSTALL_TARGET) -ifneq ($(BR2_ENABLE_DEBUG),y) - $(STRIPCMD) $(STRIP_STRIP_ALL) $(TARGET_DIR)/usr/sbin/kexec - $(STRIPCMD) $(STRIP_STRIP_ALL) $(TARGET_DIR)/usr/sbin/kdump -endif +define KEXEC_REMOVE_LIB_TOOLS rm -rf $(TARGET_DIR)/usr/lib/kexec-tools - touch $@ +endef + +KEXEC_POST_INSTALL_TARGET_HOOKS += KEXEC_REMOVE_LIB_TOOLS + +$(eval $(call AUTOTARGETS,package,kexec)) From 6cf3ec38b886f82df5576ce1146931e9eafcb154 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Thu, 2 Sep 2010 00:06:39 +0200 Subject: [PATCH 63/74] libpcap: remove useless stripping Signed-off-by: Thomas Petazzoni --- package/libpcap/libpcap.mk | 7 ------- 1 file changed, 7 deletions(-) diff --git a/package/libpcap/libpcap.mk b/package/libpcap/libpcap.mk index 801b15e08b..b14a6f71b3 100644 --- a/package/libpcap/libpcap.mk +++ b/package/libpcap/libpcap.mk @@ -19,10 +19,3 @@ LIBPCAP_CONF_ENV:=ac_cv_linux_vers=$(firstword $(subst .,$(space),$(firstword $( LIBPCAP_CONF_OPT:=--disable-yydebug --with-pcap=linux $(eval $(call AUTOTARGETS,package,libpcap)) - -$(LIBPCAP_HOOK_POST_INSTALL): $(LIBPCAP_TARGET_INSTALL_TARGET) -ifeq ($(BR2_PREFER_STATIC_LIB),) - $(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $(wildcard $(TARGET_DIR)/usr/lib/libpcap.so*) -endif - touch $@ - From b4271fbba371d1fc4d6ceac08b638bd4664cf0f8 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Thu, 2 Sep 2010 00:07:18 +0200 Subject: [PATCH 64/74] metacity: use new style hook Signed-off-by: Thomas Petazzoni --- package/metacity/metacity.mk | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/package/metacity/metacity.mk b/package/metacity/metacity.mk index 44cde54682..9d91efe6aa 100644 --- a/package/metacity/metacity.mk +++ b/package/metacity/metacity.mk @@ -18,8 +18,10 @@ METACITY_CONF_OPT = --x-includes=$(STAGING_DIR)/usr/include/X11 \ METACITY_DEPENDENCIES = libgtk2 xserver_xorg-server -$(eval $(call AUTOTARGETS,package,metacity)) - -$(METACITY_HOOK_POST_INSTALL): $(METACITY_TARGET_INSTALL_TARGET) +define METACITY_INSTALL_XSESSION install -D package/metacity/Xsession $(TARGET_DIR)/etc/X11/Xsession - touch $@ +endef + +METACITY_POST_INSTALL_TARGET_HOOKS += METACITY_INSTALL_XSESSION + +$(eval $(call AUTOTARGETS,package,metacity)) From bfa1a7fc13f9e1ed4cd4c04700779d246ac31787 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Thu, 2 Sep 2010 00:08:47 +0200 Subject: [PATCH 65/74] speex: convert to new style hook Signed-off-by: Thomas Petazzoni --- package/multimedia/speex/speex.mk | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/package/multimedia/speex/speex.mk b/package/multimedia/speex/speex.mk index e246b2491e..7de3b38305 100644 --- a/package/multimedia/speex/speex.mk +++ b/package/multimedia/speex/speex.mk @@ -12,7 +12,7 @@ SPEEX_INSTALL_TARGET = YES SPEEX_DEPENDENCIES = libogg SPEEX_CONF_OPT = --with-ogg-libraries=$(STAGING_DIR)/usr/lib \ --with-ogg-includes=$(STAGING_DIR)/usr/include \ - --enable-fixed-point + --enable-fixed-point ifeq ($(BR2_PACKAGE_SPEEX_ARM4),y) SPEEX_CONF_OPT += --enable-arm4-asm @@ -22,15 +22,15 @@ ifeq ($(BR2_PACKAGE_SPEEX_ARM5E),y) SPEEX_CONF_OPT += --enable-arm5e-asm endif -$(eval $(call AUTOTARGETS,package/multimedia,speex)) +define SPEEX_LIBTOOL_FIXUP + $(SED) 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' $(@D)/libtool + $(SED) 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' $(@D)/libtool +endef -$(SPEEX_TARGET_BUILD): $(SPEEX_TARGET_CONFIGURE) - $(call MESSAGE,"Building") - $(SED) 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' $(SPEEX_DIR)/libtool - $(SED) 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' $(SPEEX_DIR)/libtool +SPEEX_POST_CONFIGURE_HOOKS += SPEEX_LIBTOOL_FIXUP + +define SPEEX_BUILD_CMDS $($(PKG)_MAKE_ENV) $(MAKE) $($(PKG)_MAKE_OPT) -C $(@D)/$($(PKG)_SUBDIR) - $(Q)touch $@ +endef -$(SPEEX_HOOK_POST_INSTALL): $(SPEEX_TARGET_INSTALL_TARGET) - rm -rf $(TARGET_DIR)/usr/share/doc/speex - touch $@ +$(eval $(call AUTOTARGETS,package/multimedia,speex)) From 3d8ed998de6af8e3baf8ea9889a334f532c3e3eb Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Thu, 2 Sep 2010 00:12:18 +0200 Subject: [PATCH 66/74] nbd: use new style hook Signed-off-by: Thomas Petazzoni --- package/nbd/nbd.mk | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/package/nbd/nbd.mk b/package/nbd/nbd.mk index fa8dd4f30c..a09b10b74a 100644 --- a/package/nbd/nbd.mk +++ b/package/nbd/nbd.mk @@ -10,13 +10,17 @@ NBD_SITE=http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/nbd/ NBD_CONF_OPT = $(if $(BR2_LARGEFILE),--enable-lfs,--disable-lfs) NBD_DEPENDENCIES = libglib2 -$(eval $(call AUTOTARGETS,package,nbd)) - -$(NBD_HOOK_POST_INSTALL): $(NBD_TARGET_INSTALL_TARGET) ifneq ($(BR2_NBD_CLIENT),y) - rm -f $(TARGET_DIR)/usr/sbin/nbd-client + NBD_TOREMOVE += nbd-client endif ifneq ($(BR2_NBD_SERVER),y) - rm -f $(TARGET_DIR)/usr/bin/nbd-server + NBD_TOREMOVE += nbd-server endif - touch $@ + +define NBD_CLEANUP_AFTER_INSTALL + rm -f $(addprefix $(TARGET_DIR)/usr/sbin/, $(NBD_TOREMOVE)) +endef + +NBD_POST_INSTALL_TARGET_HOOKS += NBD_CLEANUP_AFTER_INSTALL + +$(eval $(call AUTOTARGETS,package,nbd)) From ccc6ef6c171c188863f1d5350c8037ea1a2e5fee Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Thu, 2 Sep 2010 00:12:35 +0200 Subject: [PATCH 67/74] neon: remove useless stripping Signed-off-by: Thomas Petazzoni --- package/neon/neon.mk | 7 ------- 1 file changed, 7 deletions(-) diff --git a/package/neon/neon.mk b/package/neon/neon.mk index e942f8763a..285d49f680 100644 --- a/package/neon/neon.mk +++ b/package/neon/neon.mk @@ -47,10 +47,3 @@ NEON_CONF_OPT+=--without-ssl endif $(eval $(call AUTOTARGETS,package,neon)) - -ifeq ($(BR2_ENABLE_DEBUG),) -# neon doesn't have an install-strip target, so do it afterwards -$(NEON_HOOK_POST_INSTALL): $(NEON_TARGET_INSTALL_TARGET) - $(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $(TARGET_DIR)/usr/lib/libneon.so - touch $@ -endif From 8112567cb30a0e7101b59059fdbbc41972c90550 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Thu, 2 Sep 2010 00:14:00 +0200 Subject: [PATCH 68/74] pcre: convert to new style hook Signed-off-by: Thomas Petazzoni --- package/pcre/pcre.mk | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/package/pcre/pcre.mk b/package/pcre/pcre.mk index 290e53431a..d2a13318fc 100644 --- a/package/pcre/pcre.mk +++ b/package/pcre/pcre.mk @@ -13,14 +13,20 @@ ifneq ($(BR2_INSTALL_LIBSTDCPP),y) PCRE_CONF_OPT = --disable-cpp endif -$(eval $(call AUTOTARGETS,package,pcre)) - -$(PCRE_HOOK_POST_INSTALL): $(PCRE_TARGET_INSTALL_TARGET) +define PCRE_STAGING_PCRE_CONFIG_FIXUP $(SED) 's,^prefix=.*,prefix=$(STAGING_DIR)/usr,' \ -e 's,^exec_prefix=.*,exec_prefix=$(STAGING_DIR)/usr,' \ $(STAGING_DIR)/usr/bin/pcre-config - rm -rf $(TARGET_DIR)/usr/share/doc/pcre -ifneq ($(BR2_HAVE_DEVFILES),y) +endef + +PCRE_POST_INSTALL_STAGING_HOOKS += PCRE_STAGING_PCRE_CONFIG_FIXUP + +define PCRE_TARGET_REMOVE_PCRE_CONFIG rm -f $(TARGET_DIR)/usr/bin/pcre-config +endef + +ifneq ($(BR2_HAVE_DEVFILES),y) +PCRE_POST_INSTALL_TARGET_HOOKS += PCRE_TARGET_REMOVE_PCRE_CONFIG endif - touch $@ + +$(eval $(call AUTOTARGETS,package,pcre)) From b7e517e8959ff418363a1964d28a4226b0ae603d Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Thu, 2 Sep 2010 00:14:41 +0200 Subject: [PATCH 69/74] radvd: convert to new style hook Signed-off-by: Thomas Petazzoni --- package/radvd/radvd.mk | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/package/radvd/radvd.mk b/package/radvd/radvd.mk index fdc52acfa9..fe8be5d39c 100644 --- a/package/radvd/radvd.mk +++ b/package/radvd/radvd.mk @@ -9,8 +9,10 @@ RADVD_SITE:=http://www.litech.org/radvd/dist/ RADVD_DEPENDENCIES:=flex host-flex RADVD_CONF_OPT:= --program-prefix='' -$(eval $(call AUTOTARGETS,package,radvd)) - -$(RADVD_HOOK_POST_INSTALL): $(RADVD_TARGET_INSTALL_TARGET) +define RADVD_INSTALL_INITSCRIPT $(INSTALL) -m 0755 package/radvd/S50radvd $(TARGET_DIR)/etc/init.d - touch $@ +endef + +RADVD_POST_INSTALL_TARGET_HOOKS += RADVD_INSTALL_INITSCRIPT + +$(eval $(call AUTOTARGETS,package,radvd)) From d2b7b19a5707def8a03f009ab69d511f99cbe339 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Thu, 2 Sep 2010 00:16:19 +0200 Subject: [PATCH 70/74] strace: convert to new style hook Signed-off-by: Thomas Petazzoni --- package/strace/strace.mk | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/package/strace/strace.mk b/package/strace/strace.mk index 3d50879415..13d1557b17 100644 --- a/package/strace/strace.mk +++ b/package/strace/strace.mk @@ -14,14 +14,20 @@ STRACE_CONF_ENV:= ac_cv_header_linux_if_packet_h=yes \ ac_cv_header_linux_netlink_h=yes \ $(if $(BR2_LARGEFILE),ac_cv_type_stat64=yes,ac_cv_type_stat64=no) -$(eval $(call AUTOTARGETS,package,strace)) - -$(STRACE_HOOK_POST_INSTALL): $(STRACE_TARGET_INSTALL_TARGET) - $(STRIPCMD) $(STRIP_STRIP_ALL) $(TARGET_DIR)/usr/bin/strace +define STRACE_REMOVE_STRACE_GRAPH rm -f $(TARGET_DIR)/usr/bin/strace-graph -ifeq ($(BR2_CROSS_TOOLCHAIN_TARGET_UTILS),y) +endef + +STRACE_POST_INSTALL_TARGET_HOOKS += STRACE_REMOVE_STRACE_GRAPH + +define STRACE_INSTALL_TOOLCHAIN_TARGET_UTILS mkdir -p $(STAGING_DIR)/usr/$(REAL_GNU_TARGET_NAME)/target_utils install -c $(TARGET_DIR)/usr/bin/strace \ $(STAGING_DIR)/usr/$(REAL_GNU_TARGET_NAME)/target_utils/strace +endef + +ifeq ($(BR2_CROSS_TOOLCHAIN_TARGET_UTILS),y) +STRACE_POST_INSTALL_TARGET_HOOKS += STRACE_INSTALL_TOOLCHAIN_TARGET_UTILS endif - touch $@ + +$(eval $(call AUTOTARGETS,package,strace)) From 19f9348bec29779c365645d00c33cc76b83a72b3 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Thu, 2 Sep 2010 00:17:27 +0200 Subject: [PATCH 71/74] tcpdump: remove useless stripping Signed-off-by: Thomas Petazzoni --- package/tcpdump/tcpdump.mk | 5 ----- 1 file changed, 5 deletions(-) diff --git a/package/tcpdump/tcpdump.mk b/package/tcpdump/tcpdump.mk index 183df94c29..0b9236d54f 100644 --- a/package/tcpdump/tcpdump.mk +++ b/package/tcpdump/tcpdump.mk @@ -17,8 +17,3 @@ TCPDUMP_CONF_OPT:=--without-crypto \ TCPDUMP_DEPENDENCIES:=zlib libpcap $(eval $(call AUTOTARGETS,package,tcpdump)) - -$(TCPDUMP_HOOK_POST_INSTALL): $(TCPDUMP_TARGET_INSTALL_TARGET) - $(STRIPCMD) $(STRIP_STRIP_ALL) $(TARGET_DIR)/usr/sbin/tcpdump - touch $@ - From 704d222df1e77dcd01bd7939152bbfe09f8ebec3 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Thu, 2 Sep 2010 00:17:58 +0200 Subject: [PATCH 72/74] udpcast: actually use the hooks Signed-off-by: Thomas Petazzoni --- package/udpcast/udpcast.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package/udpcast/udpcast.mk b/package/udpcast/udpcast.mk index d290cc9be3..d55724c76d 100644 --- a/package/udpcast/udpcast.mk +++ b/package/udpcast/udpcast.mk @@ -15,7 +15,7 @@ define UDPCAST_REMOVE_UDP_SENDER endef ifneq ($(BR2_PACKAGE_UDPCAST_SENDER),y) -UDPCAST_HOOK_POST_INSTALL_TARGET_HOOKS += UDPCAST_REMOVE_UDP_SENDER +UDPCAST_POST_INSTALL_TARGET_HOOKS += UDPCAST_REMOVE_UDP_SENDER endif define UDPCAST_REMOVE_UDP_RECEIVER @@ -24,7 +24,7 @@ define UDPCAST_REMOVE_UDP_RECEIVER endef ifneq ($(BR2_PACKAGE_UDPCAST_RECEIVER),y) -UDPCAST_HOOK_POST_INSTALL_TARGET_HOOKS += UDPCAST_REMOVE_UDP_RECEIVER +UDPCAST_POST_INSTALL_TARGET_HOOKS += UDPCAST_REMOVE_UDP_RECEIVER endif $(eval $(call AUTOTARGETS,package,udpcast)) From 240fa521cfc3fc297e58b8aa9f3d02b86a7be053 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Thu, 2 Sep 2010 00:18:12 +0200 Subject: [PATCH 73/74] which: remove useless stripping Signed-off-by: Thomas Petazzoni --- package/which/which.mk | 4 ---- 1 file changed, 4 deletions(-) diff --git a/package/which/which.mk b/package/which/which.mk index 0eb9d588bb..3bdfaca505 100644 --- a/package/which/which.mk +++ b/package/which/which.mk @@ -11,7 +11,3 @@ WHICH_INSTALL_STAGING:=NO WHICH_INSTALL_TARGET:=YES $(eval $(call AUTOTARGETS,package,which)) - -$(WHICH_HOOK_POST_INSTALL): $(WHICH_TARGET_INSTALL_TARGET) - $(STRIPCMD) $(STRIP_STRIP_ALL) $(TARGET_DIR)/usr/bin/which - touch $@ From ae2be8dbc36293d8243baf2b13ad17a47738d6d3 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Thu, 2 Sep 2010 00:20:28 +0200 Subject: [PATCH 74/74] infrastructure: remove support for old style hooks Now that all old-style hooks occurences have been converted to new-style hooks, let's get rid of the code needed to support old-style hooks from the package infrastructure. Signed-off-by: Thomas Petazzoni --- package/Makefile.package.in | 33 ++++++--------------------------- 1 file changed, 6 insertions(+), 27 deletions(-) diff --git a/package/Makefile.package.in b/package/Makefile.package.in index d76b7913d2..2c667df33b 100644 --- a/package/Makefile.package.in +++ b/package/Makefile.package.in @@ -297,7 +297,7 @@ $(2)_TARGET_UNINSTALL = $$($(2)_DIR)/.stamp_uninstalled $(2)_TARGET_CLEAN = $$($(2)_DIR)/.stamp_cleaned $(2)_TARGET_DIRCLEAN = $$($(2)_DIR)/.stamp_dircleaned -# new-style hooks +# post-steps hooks $(2)_POST_EXTRACT_HOOKS ?= $(2)_POST_PATCH_HOOKS ?= $(2)_POST_CONFIGURE_HOOKS ?= @@ -306,20 +306,13 @@ $(2)_POST_INSTALL_HOOKS ?= $(2)_POST_INSTALL_STAGING_HOOKS ?= $(2)_POST_INSTALL_TARGET_HOOKS ?= -# old-style hooks -$(2)_HOOK_POST_EXTRACT = $$($(2)_DIR)/.stamp_hook_post_extract -$(2)_HOOK_POST_CONFIGURE = $$($(2)_DIR)/.stamp_hook_post_configure -$(2)_HOOK_POST_BUILD = $$($(2)_DIR)/.stamp_hook_post_build -$(2)_HOOK_POST_INSTALL = $$($(2)_DIR)/.stamp_hook_post_install - # human-friendly targets and target sequencing $(1): $(1)-install ifeq ($$($(2)_TYPE),host) -$(1)-install: $(1)-install-host $$($(2)_HOOK_POST_INSTALL) +$(1)-install: $(1)-install-host else -$(1)-install: $(1)-install-staging $(1)-install-target \ - $$($(2)_HOOK_POST_INSTALL) +$(1)-install: $(1)-install-staging $(1)-install-target endif ifeq ($$($(2)_INSTALL_TARGET),YES) @@ -339,18 +332,15 @@ endif $(1)-install-host: $(1)-build $$($(2)_TARGET_INSTALL_HOST) $(1)-build: $(1)-configure \ - $$($(2)_TARGET_BUILD) \ - $$($(2)_HOOK_POST_BUILD) + $$($(2)_TARGET_BUILD) $(1)-configure: $(1)-patch \ - $$($(2)_TARGET_CONFIGURE) \ - $$($(2)_HOOK_POST_CONFIGURE) + $$($(2)_TARGET_CONFIGURE) $(1)-patch: $(1)-extract $$($(2)_TARGET_PATCH) $(1)-extract: $(1)-depends \ - $$($(2)_TARGET_EXTRACT) \ - $$($(2)_HOOK_POST_EXTRACT) + $$($(2)_TARGET_EXTRACT) $(1)-depends: $(1)-source $$($(2)_DEPENDENCIES) @@ -380,17 +370,6 @@ $$($(2)_TARGET_SOURCE): PKG=$(2) $$($(2)_TARGET_UNINSTALL): PKG=$(2) $$($(2)_TARGET_CLEAN): PKG=$(2) $$($(2)_TARGET_DIRCLEAN): PKG=$(2) -$$($(2)_HOOK_POST_EXTRACT): PKG=$(2) -$$($(2)_HOOK_POST_CONFIGURE): PKG=$(2) -$$($(2)_HOOK_POST_BUILD): PKG=$(2) -$$($(2)_HOOK_POST_INSTALL): PKG=$(2) - -# define hook targets -# default hook behaviour: do nothing -$$($(2)_HOOK_POST_EXTRACT): -$$($(2)_HOOK_POST_CONFIGURE): -$$($(2)_HOOK_POST_BUILD): -$$($(2)_HOOK_POST_INSTALL): # add package to the general list of targets if requested by the buildroot # configuration