wireless-tools: add option to install shared lib
authorPeter Korsgaard <jacmet@sunsite.dk>
Sun, 7 Nov 2010 19:25:39 +0000 (20:25 +0100)
committerPeter Korsgaard <jacmet@sunsite.dk>
Sun, 7 Nov 2010 19:25:39 +0000 (20:25 +0100)
Closes #2461

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
CHANGES
package/wireless_tools/Config.in
package/wireless_tools/wireless_tools.mk

diff --git a/CHANGES b/CHANGES
index 3c7b32648cf6fa24a25cd69b038bf722ef3dd69a..412fa0081d126037731bb65645c132e8025f5308 100644 (file)
--- a/CHANGES
+++ b/CHANGES
        pkg-config, portmap, pppd, pptp-linux, prboom, proftpd, radvd,
        rdesktop, readline, rp-pppoe, ruby, qt, quagga, samba, sawman,
        sdl_mixer, sdl_sound, sed, setserial, shared-mime-info, slang,
-       speex, sqlite, squashfs, startup-notification, strace, sylpheed,
-       sysstat, taglib, tcpdump, thttpd, tiff, tn5250, torsmo, tslib,
-       udev, udpcast, usbmount, usbutils, vsftpd, vtun, which,
-       wpa_supplicant, xapp_twm, xapp_xbacklight, xapp_xcursorgen,
-       xapp_xinit, xapp_xinput, xapp_xmore,
+       speex, sqlite, squashfs, startup-notification, strace,
+       sylpheed, sysstat, taglib, tcpdump, thttpd, tiff, tn5250,
+       torsmo, tslib, udev, udpcast, usbmount, usbutils, vsftpd,
+       vtun, which, wireless-tools, wpa_supplicant, xapp_twm,
+       xapp_xbacklight, xapp_xcursorgen, xapp_xinit, xapp_xinput,
+       xapp_xmore,
        xdriver_xf86-input-{acecad,aiptek,evdev,joystick,keyboard},
        xdriver-xf86-input-{mouse,synaptics,vmmouse,void},
        xdriver-xf86-video-{apm,ark,ast,ati,chips,cirrus,dummy,fbdev},
@@ -73,6 +74,7 @@
 
        #901:  new package: gpsd
        #2389: Generate a Makefile wrapper in $(O)
+       #2461: wireless_tools: install shared library if needed
        #2521: Can't compile sdl_mixer, mikmod.h can't be found
        #2563: [PATCH] cairo: Expose the configure option to disable some...
        #2581: libmms: Update to 0.6, and patch to work on architectures...
index efe28d2881e54ecda50e77bf8a5797e8b7d4a127..c51ee9bff05361fee55982ec49162ad2899b3a30 100644 (file)
@@ -4,3 +4,9 @@ config BR2_PACKAGE_WIRELESS_TOOLS
          A collection of tools to configure wireless lan cards.
 
          http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/Tools.html
+
+config BR2_PACKAGE_WIRELESS_TOOLS_LIB
+       bool "Install shared library"
+       depends on BR2_PACKAGE_WIRELESS_TOOLS
+       help
+         The shared library of wireless tools
index 0707808f23574fde5857073c78b8da8a8e21cdb8..d8358ba09bbc9cda741176b6ba0828f892297dc3 100644 (file)
@@ -7,19 +7,34 @@
 WIRELESS_TOOLS_VERSION = 29
 WIRELESS_TOOLS_SITE = http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux
 WIRELESS_TOOLS_SOURCE = wireless_tools.$(WIRELESS_TOOLS_VERSION).tar.gz
+WIRELESS_TOOLS_INSTALL_STAGING = YES
+
+WIRELESS_TOOLS_BUILD_TARGETS = iwmulticall
+WIRELESS_TOOLS_INSTALL_TARGETS = install-iwmulticall
+
+
+ifeq ($(BR2_PACKAGE_WIRELESS_TOOLS_LIB),y)
+       WIRELESS_TOOLS_BUILD_TARGETS += libiw.so.$(WIRELESS_TOOLS_VERSION)
+       WIRELESS_TOOLS_INSTALL_TARGETS += install-dynamic
+
+define WIRELESS_TOOLS_INSTALL_STAGING_CMDS
+       $(MAKE) -C $(@D) PREFIX="$(STAGING_DIR)" install-dynamic
+       $(MAKE) -C $(@D) PREFIX="$(STAGING_DIR)/usr" install-hdr
+endef
+
+endif
 
 define WIRELESS_TOOLS_BUILD_CMDS
        $(MAKE) -C $(@D) CC="$(TARGET_CC)" CFLAGS="$(TARGET_CFLAGS)" \
-               iwmulticall
+               $(WIRELESS_TOOLS_BUILD_TARGETS)
 endef
 
 define WIRELESS_TOOLS_CLEAN_CMDS
-       $(MAKE) -C $(@D) clean
-       rm -f $(@D)/iwmulticall
+       $(MAKE) -C $(@D) realclean
 endef
 
 define WIRELESS_TOOLS_INSTALL_TARGET_CMDS
-       $(MAKE) -C $(@D) PREFIX="$(TARGET_DIR)" install-iwmulticall
+       $(MAKE) -C $(@D) PREFIX="$(TARGET_DIR)" $(WIRELESS_TOOLS_INSTALL_TARGETS)
        $(MAKE) -C $(@D) INSTALL_MAN="$(TARGET_DIR)/usr/share/man" install-man
 endef