Merge branch 'for-2010.11/remove-oldstyle-hooks' of git://git.busybox.net/~tpetazzoni/git/buildroot

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
This commit is contained in:
Peter Korsgaard 2010-09-16 13:25:32 +02:00
commit 1860bdae8c
75 changed files with 749 additions and 671 deletions

16
CHANGES
View File

@ -7,8 +7,20 @@
Toolchain: ARM cortex A9 support
Updated/fixed packages: berkeleydb, busybox, dropbear,
iptables, kismet, openvpn, qt, strace, usbutils
Old-style package hooks (*_HOOK_POST_*) removed. Use the more
generic new-style ones instead.
Updated/fixed packages: alsa-lib, at, avahi, berkeleydb, bind,
bmon, bridge-utils, busybox, dbus, dmraid, docker, dropbear,
e2fsprogs, expat, freetype, gawk, gvfs, haserl, hostapd,
ifplugd, iptables, jpeg, kexec, kismet, less, libcurl,
libdnet, libevent, libglade, libgtk2, libiconv, libidn, libnl,
liboil, libpcap, libpng, libungif, libxml2, libxslt, lighttpd,
lite, mdadm, metacity, mysql_client, nano, nbd, ncftp, neon,
netperf, ntfsprogs, openntpd, openssh, openvpn, oprofile,
pango, pcre, php, prboom, radvd, qt, samba, sdl_sound,
shared-mime-info, speex, sqlite, strace, taglib, tcpdump,
tiff, tn5250, udpcast, usbutils, which, xlib_libX11
Removed packages: dillo, libglib12, libgtk12, microwin,
pcmcia

View File

@ -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

View File

@ -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))

View File

@ -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))

View File

@ -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))

View File

@ -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))

View File

@ -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))

View File

@ -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 $@

View File

@ -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))

View File

@ -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 $@

View File

@ -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))

View File

@ -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))

View File

@ -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 $@

View File

@ -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))

View File

@ -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))

View File

@ -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))

View File

@ -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))

View File

@ -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))

View File

@ -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))

View File

@ -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))

View File

@ -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))

View File

@ -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))

View File

@ -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))

View File

@ -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))

View File

@ -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))

View File

@ -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

View File

@ -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 $@

View File

@ -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))

View File

@ -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))

View File

@ -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 $@

View File

@ -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

View File

@ -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))

View File

@ -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))

View File

@ -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))

View File

@ -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 $@

View File

@ -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))

View File

@ -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))

View File

@ -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

View File

@ -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))

View File

@ -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))

View File

@ -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))

View File

@ -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))

View File

@ -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))

View File

@ -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))

View File

@ -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))

View File

@ -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))

View File

@ -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))

View File

@ -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))

View File

@ -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))

View File

@ -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))

View File

@ -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

View File

@ -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))

View File

@ -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))

View File

@ -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))

View File

@ -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))

View File

@ -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))

View File

@ -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))

View File

@ -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))

View File

@ -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))

View File

@ -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))

View File

@ -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))

View File

@ -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))

View File

@ -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))

View File

@ -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 $@

View File

@ -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))

View File

@ -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))

View File

@ -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))

View File

@ -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 $@

View File

@ -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 $@

View File

@ -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))

View File

@ -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))

View File

@ -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))

View File

@ -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 $@

View File

@ -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))

View File

@ -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))