lrzsz.mk 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. #############################################################
  2. #
  3. # lrzsz (provides zmodem)
  4. #
  5. #############################################################
  6. # Copyright (C) 2001-2003 by Erik Andersen <andersen@codepoet.org>
  7. # Copyright (C) 2002 by Tim Riker <Tim@Rikers.org>
  8. #
  9. # This program is free software; you can redistribute it and/or modify
  10. # it under the terms of the GNU Library General Public License as
  11. # published by the Free Software Foundation; either version 2 of the
  12. # License, or (at your option) any later version.
  13. #
  14. # This program is distributed in the hope that it will be useful, but
  15. # WITHOUT ANY WARRANTY; without even the implied warranty of
  16. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  17. # Library General Public License for more details.
  18. #
  19. # You should have received a copy of the GNU Library General Public
  20. # License along with this program; if not, write to the Free Software
  21. # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
  22. # USA
  23. LRZSZ_SITE:=http://www.ohse.de/uwe/releases
  24. LRZSZ_SOURCE:=lrzsz-0.12.20.tar.gz
  25. LRZSZ_DIR:=$(BUILD_DIR)/lrzsz-0.12.20
  26. $(DL_DIR)/$(LRZSZ_SOURCE):
  27. $(WGET) -P $(DL_DIR) $(LRZSZ_SITE)/$(LRZSZ_SOURCE)
  28. lrzsz-source: $(DL_DIR)/$(LRZSZ_SOURCE)
  29. $(LRZSZ_DIR)/.unpacked: $(DL_DIR)/$(LRZSZ_SOURCE)
  30. zcat $(DL_DIR)/$(LRZSZ_SOURCE) | tar -C $(BUILD_DIR) -xvf -
  31. touch $(LRZSZ_DIR)/.unpacked
  32. $(LRZSZ_DIR)/.configured: $(LRZSZ_DIR)/.unpacked
  33. (cd $(LRZSZ_DIR); rm -rf config.cache; \
  34. $(TARGET_CONFIGURE_OPTS) \
  35. ./configure \
  36. --target=$(GNU_TARGET_NAME) \
  37. --host=$(GNU_TARGET_NAME) \
  38. --build=$(GNU_HOST_NAME) \
  39. --prefix=/usr \
  40. --exec-prefix=/usr \
  41. --bindir=/usr/bin \
  42. --sbindir=/usr/sbin \
  43. --libexecdir=/usr/lib \
  44. --sysconfdir=/etc \
  45. --datadir=/usr/share \
  46. --localstatedir=/tmp \
  47. --mandir=/usr/man \
  48. --infodir=/usr/info \
  49. --disable-nls \
  50. --disable-timesync \
  51. );
  52. perl -i -p -e "s/-lnsl//;" $(LRZSZ_DIR)/src/Makefile
  53. perl -i -p -e "s~(#define ENABLE_SYSLOG.*)~/* \1 */~;" $(LRZSZ_DIR)/config.h
  54. touch $(LRZSZ_DIR)/.configured
  55. $(LRZSZ_DIR)/src/lrz: $(LRZSZ_DIR)/.configured
  56. $(MAKE) CROSS_COMPILE="$(TARGET_CROSS)" prefix="$(TARGET_DIR)" -C $(LRZSZ_DIR)
  57. $(STRIP) $(LRZSZ_DIR)/src/lrz $(LRZSZ_DIR)/src/lsz
  58. $(TARGET_DIR)/usr/bin/rz: $(LRZSZ_DIR)/src/lrz
  59. cp $(LRZSZ_DIR)/src/lrz $(TARGET_DIR)/usr/bin/rz
  60. cp $(LRZSZ_DIR)/src/lsz $(TARGET_DIR)/usr/bin/sz
  61. lrzsz: uclibc $(TARGET_DIR)/usr/bin/rz
  62. lrzsz-clean:
  63. rm -f $(TARGET_DIR)/usr/bin/rz
  64. -$(MAKE) -C $(LRZSZ_DIR) clean
  65. lrzsz-dirclean:
  66. rm -rf $(LRZSZ_DIR)