imgtec-ci20: genimage config/ u-boot env
[openadk.git] / package / dropbear / Makefile
blobe432de66eb695d80d13180935b0869d5c043e30e
1 # This file is part of the OpenADK project. OpenADK is copyrighted
2 # material, please see the LICENCE file in the top-level directory.
4 include $(ADK_TOPDIR)/rules.mk
6 PKG_NAME:= dropbear
7 PKG_VERSION:= 2024.85
8 PKG_RELEASE:= 1
9 PKG_HASH:= 86b036c433a69d89ce51ebae335d65c47738ccf90d13e5eb0fea832e556da502
10 PKG_DESCR:= ssh server/client designed for embedded systems
11 PKG_SECTION:= net/security
12 PKG_URL:= http://matt.ucc.asn.au/dropbear/
13 PKG_SITES:= http://matt.ucc.asn.au/dropbear/releases/
15 DISTFILES:= ${PKG_NAME}-${PKG_VERSION}.tar.bz2
17 PKG_SUBPKGS:= DROPBEAR DBCONVERT
18 PKGSD_DBCONVERT:= utility for converting ssh private keys
20 PKG_FLAVOURS_DROPBEAR:= WITH_UTMP
21 PKGFD_WITH_UTMP:= support writing /var/run/utmp
23 include $(ADK_TOPDIR)/mk/package.mk
25 $(eval $(call PKG_template,DROPBEAR,dropbear,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
26 $(eval $(call PKG_template,DBCONVERT,dropbearconvert,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKGSD_DBCONVERT},${PKG_SECTION}))
28 TARGET_CFLAGS+= -fPIC
30 BUILD_STYLE:= manual
31 INSTALL_STYLE:= manual
32 CONFIGURE_ARGS+= --disable-pam \
33 --enable-openpty \
34 --enable-syslog \
35 --enable-shadow \
36 --disable-lastlog \
37 --disable-utmpx \
38 --disable-wtmp \
39 --disable-wtmpx \
40 --disable-loginfunc \
41 --disable-pututxline \
42 --disable-harden \
43 --disable-zlib
44 ifeq (${ADK_PACKAGE_DROPBEAR_WITH_UTMP},)
45 CONFIGURE_ARGS+= --disable-utmp --disable-pututline
46 else
47 CONFIGURE_ENV+= conf_utmp_location=/var/run/utmp
48 endif
51 pre-configure:
52 echo "#define DO_HOST_LOOKUP 0" >>$(WRKBUILD)/localoptions.h
53 echo "#define DROPBEAR_X11FWD 1" >>$(WRKBUILD)/localoptions.h
55 do-build:
56 cd ${WRKBUILD} && env ${MAKE_ENV} ${MAKE} \
57 PROGRAMS="dropbear dbclient dropbearkey scp" MULTI=1 SCPPROGRESS=1
58 cd ${WRKBUILD} && env ${MAKE_ENV} ${MAKE} \
59 PROGRAMS=dropbearconvert
61 do-install:
62 # main package
63 $(INSTALL_DIR) $(IDIR_DROPBEAR)/etc/dropbear
64 $(INSTALL_DIR) $(IDIR_DROPBEAR)/bin
65 $(INSTALL_DIR) $(IDIR_DROPBEAR)/usr/bin
66 $(INSTALL_DIR) $(IDIR_DROPBEAR)/usr/sbin
67 $(INSTALL_BIN) $(WRKBUILD)/dropbearmulti \
68 $(IDIR_DROPBEAR)/usr/sbin/dropbear
69 ln -sf ../usr/sbin/dropbear $(IDIR_DROPBEAR)/bin/scp
70 ln -sf ../usr/sbin/dropbear $(IDIR_DROPBEAR)/bin/ssh
71 ln -sf ../sbin/dropbear $(IDIR_DROPBEAR)/usr/bin/dbclient
72 ln -sf ../sbin/dropbear $(IDIR_DROPBEAR)/usr/bin/dropbearkey
73 # subpackage dropbearconvert
74 $(INSTALL_DIR) $(IDIR_DBCONVERT)/usr/bin
75 $(INSTALL_BIN) $(WRKBUILD)/dropbearconvert \
76 $(IDIR_DBCONVERT)/usr/bin/dropbearconvert
77 # ssh pubkey
78 test -z $(ADK_RUNTIME_SSH_PUBKEY) || ( \
79 $(INSTALL_DIR) $(IDIR_DROPBEAR)/root/.ssh; \
80 echo $(ADK_RUNTIME_SSH_PUBKEY) \
81 >$(IDIR_DROPBEAR)/root/.ssh/authorized_keys; \
84 include ${ADK_TOPDIR}/mk/pkg-bottom.mk