3 include $(TOPDIR
)/rules.mk
8 PKG_MD5SUM
:=2bcc46e4c239aec982bf36a723dd0b0e
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
16 PKG_BUILD_DIR
:=$(BUILD_DIR
)/$(PKG_NAME
)-$(PKG_VERSION
)
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
22 $(DL_DIR
)/$(PKG_SOURCE
):
23 $(SCRIPT_DIR
)/download.pl
$(DL_DIR
) $(PKG_SOURCE
) $(PKG_MD5SUM
) $(PKG_SOURCE_URL
)
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
31 $(PKG_BUILD_DIR
)/.configured
: $(PKG_BUILD_DIR
)/.prepared
32 (cd
$(PKG_BUILD_DIR
); rm -rf config.cache
; \
34 $(TARGET_CONFIGURE_OPTS
) \
35 CFLAGS
="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include" \
36 LDFLAGS
="-L$(STAGING_DIR)/usr/lib" \
38 --target
=$(GNU_TARGET_NAME
) \
39 --host
=$(GNU_TARGET_NAME
) \
40 --build
=$(GNU_HOST_NAME
) \
46 --datadir=/usr
/share \
47 --includedir=/usr
/include \
48 --infodir=/usr
/share
/info \
50 --libexecdir
=/usr
/lib \
51 --localstatedir
=/var \
52 --mandir=/usr
/share
/man \
55 $(DISABLE_LARGEFILE
) \
69 --disable-pututxline \
71 touch
$(PKG_BUILD_DIR
)/.configured
73 $(PKG_BUILD_DIR
)/dropbearmulti
: $(PKG_BUILD_DIR
)/.configured
74 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
76 PROGRAMS
="dropbear dbclient dropbearkey dropbearconvert scp" \
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
)
95 $(INFO_DROPBEAR
): $(IPKG_DROPBEAR
)
96 $(IPKG
) install $(IPKG_DROPBEAR
)
98 source
: $(DL_DIR
)/$(PKG_SOURCE
)
99 prepare
: $(PKG_BUILD_DIR
)/.prepared
100 compile
: $(IPKG_DROPBEAR
)
101 install: $(INFO_DROPBEAR
)
104 rm -rf
$(PKG_BUILD_DIR
) $(IPKG_DROPBEAR
)