generic: ar8216: clear driver specific data pointer in phy_device
[openwrt.git] / package / network / services / dropbear / Makefile
1 #
2 # Copyright (C) 2006-2012 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=dropbear
11 PKG_VERSION:=2012.55
12 PKG_RELEASE:=2
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
15 PKG_SOURCE_URL:= \
16         http://matt.ucc.asn.au/dropbear/releases/ \
17         http://www.mirrors.wiretapped.net/security/cryptography/apps/ssh/dropbear/
18 PKG_MD5SUM:=8c784baec3054cdb1bb4bfa792c87812
19
20 PKG_LICENSE:=MIT
21 PKG_LICENSE_FILES:=LICENSE libtomcrypt/LICENSE libtommath/LICENSE
22
23 PKG_BUILD_PARALLEL:=1
24
25 include $(INCLUDE_DIR)/package.mk
26
27 define Package/dropbear/Default
28   URL:=http://matt.ucc.asn.au/dropbear/
29 endef
30
31 define Package/dropbear
32   $(call Package/dropbear/Default)
33   SECTION:=net
34   CATEGORY:=Base system
35   TITLE:=Small SSH2 client/server
36 endef
37
38 define Package/dropbear/description
39  A small SSH2 server/client designed for small memory environments.
40 endef
41
42 define Package/dropbear/conffiles
43 /etc/dropbear/dropbear_rsa_host_key
44 /etc/dropbear/dropbear_dss_host_key 
45 /etc/config/dropbear 
46 endef
47
48 define Package/dropbearconvert
49   $(call Package/dropbear/Default)
50   SECTION:=utils
51   CATEGORY:=Utilities
52   TITLE:=Utility for converting SSH keys
53 endef
54
55 CONFIGURE_ARGS += \
56         --with-shared \
57         --disable-pam \
58         --enable-openpty \
59         --enable-syslog \
60         $(if $(CONFIG_SHADOW_PASSWORDS),,--disable-shadow) \
61         --disable-lastlog \
62         --disable-utmp \
63         --disable-utmpx \
64         --disable-wtmp \
65         --disable-wtmpx \
66         --disable-loginfunc \
67         --disable-pututline \
68         --disable-pututxline \
69         --disable-zlib \
70         --enable-bundled-libtom
71
72 TARGET_CFLAGS += -DARGTYPE=3 -ffunction-sections -fdata-sections
73 TARGET_LDFLAGS += -Wl,--gc-sections
74
75 define Build/Compile
76         +$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
77                 $(TARGET_CONFIGURE_OPTS) \
78                 PROGRAMS="dropbear dbclient dropbearkey scp" \
79                 MULTI=1 SCPPROGRESS=1
80         +$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
81                 $(TARGET_CONFIGURE_OPTS) \
82                 PROGRAMS="dropbearconvert"
83 endef
84
85 define Package/dropbear/install
86         $(INSTALL_DIR) $(1)/usr/sbin
87         $(INSTALL_BIN) $(PKG_BUILD_DIR)/dropbearmulti $(1)/usr/sbin/dropbear
88         $(INSTALL_DIR) $(1)/usr/bin
89         ln -sf ../sbin/dropbear $(1)/usr/bin/scp
90         ln -sf ../sbin/dropbear $(1)/usr/bin/ssh
91         ln -sf ../sbin/dropbear $(1)/usr/bin/dbclient
92         ln -sf ../sbin/dropbear $(1)/usr/bin/dropbearkey
93         $(INSTALL_DIR) $(1)/etc/config
94         $(INSTALL_DATA) ./files/dropbear.config $(1)/etc/config/dropbear
95         $(INSTALL_DIR) $(1)/etc/init.d
96         $(INSTALL_BIN) ./files/dropbear.init $(1)/etc/init.d/dropbear
97         $(INSTALL_DIR) $(1)/usr/lib/opkg/info
98         $(INSTALL_DIR) $(1)/etc/dropbear
99         touch $(1)/etc/dropbear/dropbear_rsa_host_key
100         touch $(1)/etc/dropbear/dropbear_dss_host_key
101 endef
102
103 define Package/dropbearconvert/install
104         $(INSTALL_DIR) $(1)/usr/bin
105         $(INSTALL_BIN) $(PKG_BUILD_DIR)/dropbearconvert $(1)/usr/bin/dropbearconvert
106 endef
107
108 $(eval $(call BuildPackage,dropbear))
109 $(eval $(call BuildPackage,dropbearconvert))