Add libnet package
[openwrt.git] / obsolete-buildroot / make / patch.mk
1 #############################################################
2 #
3 # patch
4 #
5 #############################################################
6 GNUPATCH_SOURCE:=patch_2.5.9.orig.tar.gz
7 GNUPATCH_SITE:=http://ftp.debian.org/debian/pool/main/p/patch
8 GNUPATCH_CAT:=zcat
9 GNUPATCH_DIR:=$(BUILD_DIR)/patch-2.5.9
10 GNUPATCH_BINARY:=patch
11 GNUPATCH_TARGET_BINARY:=usr/bin/patch
12
13 $(DL_DIR)/$(GNUPATCH_SOURCE):
14 $(WGET) -P $(DL_DIR) $(GNUPATCH_SITE)/$(GNUPATCH_SOURCE)
15
16 patch-source: $(DL_DIR)/$(GNUPATCH_SOURCE)
17
18 $(GNUPATCH_DIR)/.unpacked: $(DL_DIR)/$(GNUPATCH_SOURCE)
19 $(GNUPATCH_CAT) $(DL_DIR)/$(GNUPATCH_SOURCE) | tar -C $(BUILD_DIR) -xvf -
20 touch $(GNUPATCH_DIR)/.unpacked
21
22 $(GNUPATCH_DIR)/.configured: $(GNUPATCH_DIR)/.unpacked
23 (cd $(GNUPATCH_DIR); rm -rf config.cache; \
24 $(TARGET_CONFIGURE_OPTS) \
25 CFLAGS="$(TARGET_CFLAGS)" \
26 ./configure \
27 --target=$(GNU_TARGET_NAME) \
28 --host=$(GNU_TARGET_NAME) \
29 --build=$(GNU_HOST_NAME) \
30 --prefix=/usr \
31 --exec-prefix=/usr \
32 --bindir=/usr/bin \
33 --sbindir=/usr/sbin \
34 --libexecdir=/usr/lib \
35 --sysconfdir=/etc \
36 --datadir=/usr/share \
37 --localstatedir=/var \
38 --mandir=/usr/man \
39 --infodir=/usr/info \
40 $(DISABLE_NLS) \
41 $(DISABLE_LARGEFILE) \
42 );
43 touch $(GNUPATCH_DIR)/.configured
44
45 $(GNUPATCH_DIR)/$(GNUPATCH_BINARY): $(GNUPATCH_DIR)/.configured
46 $(MAKE) CC=$(TARGET_CC) -C $(GNUPATCH_DIR)
47
48 $(TARGET_DIR)/$(GNUPATCH_TARGET_BINARY): $(GNUPATCH_DIR)/$(GNUPATCH_BINARY)
49 rm -f $(TARGET_DIR)/$(GNUPATCH_TARGET_BINARY)
50 cp -a $(GNUPATCH_DIR)/$(GNUPATCH_BINARY) $(TARGET_DIR)/$(GNUPATCH_TARGET_BINARY)
51
52 patch: uclibc $(TARGET_DIR)/$(GNUPATCH_TARGET_BINARY)
53
54 patch-clean:
55 $(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(GNUPATCH_DIR) uninstall
56 -$(MAKE) -C $(GNUPATCH_DIR) clean
57
58 patch-dirclean:
59 rm -rf $(GNUPATCH_DIR)
60
This page took 0.048881 seconds and 5 git commands to generate.