check config changes on make world
[openwrt.git] / openwrt / package / dropbear / Makefile
1 # $Id$
2
3 include $(TOPDIR)/rules.mk
4
5 DROPBEAR_VERSION:=0.45
6 DROPBEAR_MD5SUM:=2bcc46e4c239aec982bf36a723dd0b0e
7
8 DROPBEAR_SOURCE:=dropbear-$(DROPBEAR_VERSION).tar.bz2
9 DROPBEAR_SITE:=http://matt.ucc.asn.au/dropbear/releases/
10 DROPBEAR_DIR:=$(BUILD_DIR)/dropbear-$(DROPBEAR_VERSION)
11 DROPBEAR_CAT:=bzcat
12 DROPBEAR_BINARY:=dropbearmulti
13 DROPBEAR_TARGET_BINARY:=usr/sbin/dropbear
14 DROPBEAR_IPK:=dropbear_$(DROPBEAR_VERSION)-1_$(ARCH).ipk
15 DROPBEAR_IPK_DIR:=$(DROPBEAR_DIR)/ipkg
16
17 $(DL_DIR)/$(DROPBEAR_SOURCE):
18 $(SCRIPT_DIR)/download.pl $(DL_DIR) $(DROPBEAR_SOURCE) $(DROPBEAR_MD5SUM) $(DROPBEAR_SITE)
19
20 $(DROPBEAR_DIR)/.patched: $(DL_DIR)/$(DROPBEAR_SOURCE)
21 $(DROPBEAR_CAT) $(DL_DIR)/$(DROPBEAR_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
22 $(PATCH) $(DROPBEAR_DIR) ./patches \*.patch
23 $(SED) 's,^/\* #define DROPBEAR_MULTI.*,#define DROPBEAR_MULTI,g' $(DROPBEAR_DIR)/options.h
24 touch $(DROPBEAR_DIR)/.patched
25
26 $(DROPBEAR_DIR)/.configured: $(DROPBEAR_DIR)/.patched
27 (cd $(DROPBEAR_DIR); rm -rf config.cache; \
28 autoconf; \
29 $(TARGET_CONFIGURE_OPTS) \
30 CFLAGS="$(TARGET_CFLAGS)" \
31 ./configure \
32 --target=$(GNU_TARGET_NAME) \
33 --host=$(GNU_TARGET_NAME) \
34 --build=$(GNU_HOST_NAME) \
35 --prefix=/usr \
36 --exec-prefix=/usr \
37 --bindir=/usr/bin \
38 --sbindir=/usr/sbin \
39 --libexecdir=/usr/lib \
40 --sysconfdir=/etc \
41 --datadir=/usr/share \
42 --localstatedir=/var \
43 --mandir=/usr/man \
44 --infodir=/usr/info \
45 $(DISABLE_NLS) \
46 --with-shared \
47 );
48 touch $(DROPBEAR_DIR)/.configured
49
50 $(DROPBEAR_DIR)/$(DROPBEAR_BINARY): $(DROPBEAR_DIR)/.configured
51 $(MAKE) $(TARGET_CONFIGURE_OPTS) LD=$(TARGET_CC) \
52 PROGRAMS="dropbear dbclient dropbearkey dropbearconvert scp" \
53 MULTI=1 SCPPROGRESS=1 -C $(DROPBEAR_DIR)
54
55 $(PACKAGE_DIR)/$(DROPBEAR_IPK): $(DROPBEAR_DIR)/$(DROPBEAR_BINARY)
56 $(SCRIPT_DIR)/make-ipkg-dir.sh $(DROPBEAR_IPK_DIR) dropbear.control $(DROPBEAR_VERSION)-1 $(ARCH)
57 cp dropbear.conffiles $(DROPBEAR_IPK_DIR)/CONTROL/conffiles
58 mkdir -p $(DROPBEAR_IPK_DIR)/usr/bin
59 mkdir -p $(DROPBEAR_IPK_DIR)/usr/sbin
60 install -m 755 $(DROPBEAR_DIR)/$(DROPBEAR_BINARY) \
61 $(DROPBEAR_IPK_DIR)/$(DROPBEAR_TARGET_BINARY)
62 $(STRIP) $(DROPBEAR_IPK_DIR)/usr/sbin/dropbear
63 ln -sf ../sbin/dropbear $(DROPBEAR_IPK_DIR)/usr/bin/scp
64 ln -sf ../sbin/dropbear $(DROPBEAR_IPK_DIR)/usr/bin/ssh
65 ln -sf ../sbin/dropbear $(DROPBEAR_IPK_DIR)/usr/bin/dropbearkey
66 ln -sf ../sbin/dropbear $(DROPBEAR_IPK_DIR)/usr/bin/dropbearconvert
67 mkdir -p $(DROPBEAR_IPK_DIR)/etc/init.d
68 cp ./files/passwd $(DROPBEAR_IPK_DIR)/etc
69 cp ./files/S50dropbear $(DROPBEAR_IPK_DIR)/etc/init.d/
70 chmod a+x $(DROPBEAR_IPK_DIR)/etc/init.d/S50dropbear
71 $(IPKG_BUILD) $(DROPBEAR_IPK_DIR) $(PACKAGE_DIR)
72
73 $(IPKG_STATE_DIR)/info/dropbear.list: $(PACKAGE_DIR)/$(DROPBEAR_IPK)
74 $(IPKG) install $(PACKAGE_DIR)/$(DROPBEAR_IPK)
75
76 source: $(DL_DIR)/$(DROPBEAR_SOURCE)
77 prepare: $(DROPBEAR_DIR)/.patched
78 compile: $(PACKAGE_DIR)/$(DROPBEAR_IPK)
79 install: $(IPKG_STATE_DIR)/info/dropbear.list
80
81 clean:
82 rm -rf $(DROPBEAR_DIR)
83 rm -f $(PACKAGE_DIR)/$(DROPBEAR_IPK)
84
This page took 0.068301 seconds and 5 git commands to generate.