don't fail if BR2_USE_UPDATES tries to update non-checkout
[buildroot.git] / package / lrzsz / lrzsz.mk
blobb51fe0497b24f0e09862180b5d6f4407cd36c30a
1 #############################################################
3 # lrzsz (provides zmodem)
5 #############################################################
6 # Copyright (C) 2001-2005 by Erik Andersen <andersen@codepoet.org>
7 # Copyright (C) 2002 by Tim Riker <Tim@Rikers.org>
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.
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.
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_VERSION:=0.12.20
24 LRZSZ_SITE:=http://www.ohse.de/uwe/releases
25 LRZSZ_SOURCE:=lrzsz-$(LRZSZ_VERSION).tar.gz
26 LRZSZ_DIR:=$(BUILD_DIR)/lrzsz-$(LRZSZ_VERSION)
28 $(DL_DIR)/$(LRZSZ_SOURCE):
29 $(WGET) -P $(DL_DIR) $(LRZSZ_SITE)/$(LRZSZ_SOURCE)
31 lrzsz-source: $(DL_DIR)/$(LRZSZ_SOURCE)
33 $(LRZSZ_DIR)/.unpacked: $(DL_DIR)/$(LRZSZ_SOURCE)
34 $(ZCAT) $(DL_DIR)/$(LRZSZ_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
35 touch $(LRZSZ_DIR)/.unpacked
37 $(LRZSZ_DIR)/.configured: $(LRZSZ_DIR)/.unpacked
38 (cd $(LRZSZ_DIR); rm -rf config.cache; \
39 $(TARGET_CONFIGURE_OPTS) \
40 $(TARGET_CONFIGURE_ARGS) \
41 ./configure \
42 --target=$(GNU_TARGET_NAME) \
43 --host=$(GNU_TARGET_NAME) \
44 --build=$(GNU_HOST_NAME) \
45 --prefix=/usr \
46 --exec-prefix=/usr \
47 --bindir=/usr/bin \
48 --sbindir=/usr/sbin \
49 --libdir=/lib \
50 --libexecdir=/usr/lib \
51 --sysconfdir=/etc \
52 --datadir=/usr/share \
53 --localstatedir=/tmp \
54 --mandir=/usr/man \
55 --infodir=/usr/info \
56 $(DISABLE_NLS) \
57 --disable-timesync \
59 $(SED) "s/-lnsl//;" $(LRZSZ_DIR)/src/Makefile
60 $(SED) "s~\(#define ENABLE_SYSLOG.*\)~/* \1 */~;" $(LRZSZ_DIR)/config.h
61 touch $(LRZSZ_DIR)/.configured
63 $(LRZSZ_DIR)/src/lrz: $(LRZSZ_DIR)/.configured
64 $(MAKE) CROSS_COMPILE="$(TARGET_CROSS)" prefix="$(TARGET_DIR)" -C $(LRZSZ_DIR)
65 $(STRIPCMD) $(LRZSZ_DIR)/src/lrz $(LRZSZ_DIR)/src/lsz
67 $(TARGET_DIR)/usr/bin/rz: $(LRZSZ_DIR)/src/lrz
68 cp $(LRZSZ_DIR)/src/lrz $(TARGET_DIR)/usr/bin/rz
69 cp $(LRZSZ_DIR)/src/lsz $(TARGET_DIR)/usr/bin/sz
71 lrzsz: $(TARGET_DIR)/usr/bin/rz
73 lrzsz-clean:
74 rm -f $(TARGET_DIR)/usr/bin/rz
75 -$(MAKE) -C $(LRZSZ_DIR) clean
77 lrzsz-dirclean:
78 rm -rf $(LRZSZ_DIR)
79 #############################################################
81 # Toplevel Makefile options
83 #############################################################
84 ifeq ($(BR2_PACKAGE_LRZSZ),y)
85 TARGETS+=lrzsz
86 endif