convert bridge to new packaging style
[openwrt.git] / openwrt / package / dropbear / Makefile
1 # $Id$
2
3 include $(TOPDIR)/rules.mk
4
5 PKG_NAME:=dropbear
6 PKG_VERSION:=0.45
7 PKG_RELEASE:=2
8 PKG_MD5SUM:=2bcc46e4c239aec982bf36a723dd0b0e
9
10 PKG_SOURCE_URL:= \
11 http://matt.ucc.asn.au/dropbear/releases/ \
12 http://nthill.free.fr/openwrt/sources/$(PKG_NAME)/
13 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
14 PKG_CAT:=bzcat
15
16 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
17
18 IPKG_DROPBEAR:=$(PACKAGE_DIR)/$(PKG_NAME)_$(PKG_VERSION)-$(PKG_RELEASE)_$(ARCH).ipk
19 IDIR_DROPBEAR:=$(PKG_BUILD_DIR)/ipkg/$(PKG_NAME)
20 INFO_DROPBEAR:=$(IPKG_STATE_DIR)/info/$(PKG_NAME).list
21
22 $(DL_DIR)/$(PKG_SOURCE):
23 $(SCRIPT_DIR)/download.pl $(DL_DIR) $(PKG_SOURCE) $(PKG_MD5SUM) $(PKG_SOURCE_URL)
24
25 $(PKG_BUILD_DIR)/.prepared: $(DL_DIR)/$(PKG_SOURCE)
26 $(PKG_CAT) $(DL_DIR)/$(PKG_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
27 $(PATCH) $(PKG_BUILD_DIR) ./patches \*.patch
28 $(SED) 's,^/\* #define PKG_MULTI.*,#define PKG_MULTI,g' $(PKG_BUILD_DIR)/options.h
29 touch $(PKG_BUILD_DIR)/.prepared
30
31 $(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared
32 (cd $(PKG_BUILD_DIR); rm -rf config.cache; \
33 autoconf; \
34 $(TARGET_CONFIGURE_OPTS) \
35 CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include" \
36 LDFLAGS="-L$(STAGING_DIR)/usr/lib" \
37 ./configure \
38 --target=$(GNU_TARGET_NAME) \
39 --host=$(GNU_TARGET_NAME) \
40 --build=$(GNU_HOST_NAME) \
41 --program-prefix="" \
42 --program-suffix="" \
43 --prefix=/usr \
44 --exec-prefix=/usr \
45 --bindir=/usr/bin \
46 --datadir=/usr/share \
47 --includedir=/usr/include \
48 --infodir=/usr/share/info \
49 --libdir=/usr/lib \
50 --libexecdir=/usr/lib \
51 --localstatedir=/var \
52 --mandir=/usr/share/man \
53 --sbindir=/usr/sbin \
54 --sysconfdir=/etc \
55 $(DISABLE_LARGEFILE) \
56 $(DISABLE_NLS) \
57 --with-shared \
58 --disable-pam \
59 --enable-openpty \
60 --enable-syslog \
61 --disable-shadow \
62 --disable-lastlog \
63 --disable-utmp \
64 --disable-utmpx \
65 --disable-wtmp \
66 --disable-wtmpx \
67 --disable-loginfunc \
68 --disable-pututline \
69 --disable-pututxline \
70 );
71 touch $(PKG_BUILD_DIR)/.configured
72
73 $(PKG_BUILD_DIR)/dropbearmulti: $(PKG_BUILD_DIR)/.configured
74 $(MAKE) -C $(PKG_BUILD_DIR) \
75 LD=$(TARGET_CC) \
76 PROGRAMS="dropbear dbclient dropbearkey dropbearconvert scp" \
77 MULTI=1 SCPPROGRESS=1
78
79 $(IPKG_DROPBEAR): $(PKG_BUILD_DIR)/dropbearmulti
80 $(SCRIPT_DIR)/make-ipkg-dir.sh $(IDIR_DROPBEAR) $(PKG_NAME).control $(PKG_VERSION)-$(PKG_RELEASE) $(ARCH)
81 mkdir -p $(IDIR_DROPBEAR)/usr/bin
82 mkdir -p $(IDIR_DROPBEAR)/usr/sbin
83 install -m 755 $(PKG_BUILD_DIR)/dropbearmulti \
84 $(IDIR_DROPBEAR)/usr/sbin/dropbear
85 $(STRIP) $(IDIR_DROPBEAR)/usr/sbin/dropbear
86 ln -sf ../sbin/dropbear $(IDIR_DROPBEAR)/usr/bin/scp
87 ln -sf ../sbin/dropbear $(IDIR_DROPBEAR)/usr/bin/ssh
88 ln -sf ../sbin/dropbear $(IDIR_DROPBEAR)/usr/bin/dbclient
89 ln -sf ../sbin/dropbear $(IDIR_DROPBEAR)/usr/bin/dropbearkey
90 ln -sf ../sbin/dropbear $(IDIR_DROPBEAR)/usr/bin/dropbearconvert
91 mkdir -p $(IDIR_DROPBEAR)/etc/init.d
92 install -m 755 ./files/S50dropbear $(IDIR_DROPBEAR)/etc/init.d/
93 $(IPKG_BUILD) $(IDIR_DROPBEAR) $(PACKAGE_DIR)
94
95 $(INFO_DROPBEAR): $(IPKG_DROPBEAR)
96 $(IPKG) install $(IPKG_DROPBEAR)
97
98 source: $(DL_DIR)/$(PKG_SOURCE)
99 prepare: $(PKG_BUILD_DIR)/.prepared
100 compile: $(IPKG_DROPBEAR)
101 install: $(INFO_DROPBEAR)
102
103 clean:
104 rm -rf $(PKG_BUILD_DIR) $(IPKG_DROPBEAR)
105
This page took 0.059978 seconds and 5 git commands to generate.