fix usb-ohci modules.d file
[openwrt.git] / obsolete-buildroot / make / openssh.mk
1 #############################################################
2 #
3 # openssh
4 #
5 #############################################################
6
7 OPENSSH_SITE:=ftp://ftp.tux.org/bsd/openbsd/OpenSSH/portable/
8 OPENSSH_DIR:=$(BUILD_DIR)/openssh-3.8p1
9 OPENSSH_SOURCE:=openssh-3.8p1.tar.gz
10
11 OPENSSH_IPK_DIR=$(OPENWRT_IPK_DIR)/openssh
12 OPENSSH_IPK_BUILD_DIR:=$(BUILD_DIR)/openssh-3.8p1-ipk
13
14 OPENSSH_SERVER_IPK:=$(BUILD_DIR)/openssh-server_3.8p1-1_mipsel.ipk
15 OPENSSH_CLIENT_IPK:=$(BUILD_DIR)/openssh-client_3.8p1-1_mipsel.ipk
16 OPENSSH_SFTP_SERVER_IPK:=$(BUILD_DIR)/openssh-sftp-server_3.8p1-1_mipsel.ipk
17 OPENSSH_SFTP_CLIENT_IPK:=$(BUILD_DIR)/openssh-sftp-client_3.8p1-1_mipsel.ipk
18 OPENSSH_CLIENT_EX_IPK:=$(BUILD_DIR)/openssh-client-extras_3.8p1-1_mipsel.ipk
19
20 $(DL_DIR)/$(OPENSSH_SOURCE):
21 $(WGET) -P $(DL_DIR) $(OPENSSH_SITE)/$(OPENSSH_SOURCE)
22
23 $(OPENSSH_DIR)/.unpacked: $(DL_DIR)/$(OPENSSH_SOURCE) $(OPENSSH_PATCH)
24 zcat $(DL_DIR)/$(OPENSSH_SOURCE) | tar -C $(BUILD_DIR) -xvf -
25 cat $(OPENSSH_IPK_DIR)/openssh.patch | patch -p1 -d $(OPENSSH_DIR)
26 touch $(OPENSSH_DIR)/.unpacked
27
28 $(OPENSSH_DIR)/.configured: $(OPENSSH_DIR)/.unpacked
29 (cd $(OPENSSH_DIR); rm -rf config.cache; autoconf; \
30 $(TARGET_CONFIGURE_OPTS) \
31 LD=$(TARGET_CROSS)gcc \
32 CFLAGS="$(TARGET_CFLAGS)" \
33 ./configure \
34 --target=$(GNU_TARGET_NAME) \
35 --host=$(GNU_TARGET_NAME) \
36 --build=$(GNU_HOST_NAME) \
37 --prefix=/usr \
38 --exec-prefix=/usr \
39 --bindir=/usr/bin \
40 --sbindir=/usr/sbin \
41 --libexecdir=/usr/sbin \
42 --sysconfdir=/etc \
43 --datadir=/usr/share \
44 --localstatedir=/var \
45 --mandir=/usr/man \
46 --infodir=/usr/info \
47 --includedir=$(STAGING_DIR)/include \
48 --disable-lastlog --disable-utmp \
49 --disable-utmpx --disable-wtmp --disable-wtmpx \
50 --without-x \
51 $(DISABLE_NLS) \
52 $(DISABLE_LARGEFILE) \
53 );
54 touch $(OPENSSH_DIR)/.configured
55
56 $(OPENSSH_DIR)/ssh: $(OPENSSH_DIR)/.configured
57 $(MAKE) CC=$(TARGET_CC) -C $(OPENSSH_DIR)
58 -$(STRIP) $(OPENSSH_DIR)/scp
59 -$(STRIP) $(OPENSSH_DIR)/sftp
60 -$(STRIP) $(OPENSSH_DIR)/sftp-server
61 -$(STRIP) $(OPENSSH_DIR)/ssh
62 -$(STRIP) $(OPENSSH_DIR)/ssh-add
63 -$(STRIP) $(OPENSSH_DIR)/ssh-agent
64 -$(STRIP) $(OPENSSH_DIR)/ssh-keygen
65 -$(STRIP) $(OPENSSH_DIR)/ssh-keyscan
66 -$(STRIP) $(OPENSSH_DIR)/ssh-keysign
67 -$(STRIP) $(OPENSSH_DIR)/ssh-rand-helper
68 -$(STRIP) $(OPENSSH_DIR)/sshd
69
70 $(TARGET_DIR)/usr/bin/ssh: $(OPENSSH_DIR)/ssh
71 $(MAKE) CC=$(TARGET_CC) DESTDIR=$(TARGET_DIR) -C $(OPENSSH_DIR) install
72 mkdir -p $(TARGET_DIR)/etc/init.d/
73 cp $(OPENSSH_DIR)/S50sshd $(TARGET_DIR)/etc/init.d/
74 chmod a+x $(TARGET_DIR)/etc/init.d/S50sshd
75 rm -rf $(TARGET_DIR)/usr/info $(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/doc
76 # since this is the embedded build, keep things to minimum
77 rm $(TARGET_DIR)/etc/moduli
78 rm $(TARGET_DIR)/usr/bin/sftp
79 rm $(TARGET_DIR)/usr/bin/ssh-add
80 rm $(TARGET_DIR)/usr/bin/ssh-agent
81 rm $(TARGET_DIR)/usr/bin/ssh-keyscan
82 rm $(TARGET_DIR)/usr/sbin/sftp-server
83 rm $(TARGET_DIR)/usr/sbin/ssh-keysign
84
85 openssh: $(TARGET_DIR)/usr/bin/ssh
86
87 $(OPENSSH_IPK_BUILD_DIR)/usr/bin/ssh: $(OPENSSH_DIR)/ssh
88 $(MAKE) CC=$(TARGET_CC) DESTDIR=$(OPENSSH_IPK_BUILD_DIR) -C $(OPENSSH_DIR) install
89 mkdir -p $(OPENSSH_IPK_BUILD_DIR)/etc/init.d/
90 cp $(OPENSSH_DIR)/S50sshd $(OPENSSH_IPK_BUILD_DIR)/etc/init.d/
91 chmod a+x $(OPENSSH_IPK_BUILD_DIR)/etc/init.d/S50sshd
92 rm -rf $(OPENSSH_IPK_BUILD_DIR)/usr/info $(OPENSSH_IPK_BUILD_DIR)/usr/man $(OPENSSH_IPK_BUILD_DIR)/usr/share/doc
93
94 $(OPENSSH_SERVER_IPK): $(OPENSSH_IPK_BUILD_DIR)/usr/bin/ssh
95 rm -rf $(OPENSSH_IPK_BUILD_DIR)/build
96 mkdir -p $(OPENSSH_IPK_BUILD_DIR)/build/CONTROL
97 cp $(OPENSSH_IPK_DIR)/openssh.server.control $(OPENSSH_IPK_BUILD_DIR)/build/CONTROL/control
98 cp $(OPENSSH_IPK_DIR)/openssh.server.conffiles $(OPENSSH_IPK_BUILD_DIR)/build/CONTROL/conffiles
99 cp $(OPENSSH_IPK_DIR)/openssh.server.preinst $(OPENSSH_IPK_BUILD_DIR)/build/CONTROL/preinst
100 chmod a+x $(OPENSSH_IPK_BUILD_DIR)/build/CONTROL/preinst
101 cp $(OPENSSH_IPK_DIR)/openssh.server.postinst $(OPENSSH_IPK_BUILD_DIR)/build/CONTROL/postinst
102 chmod a+x $(OPENSSH_IPK_BUILD_DIR)/build/CONTROL/postinst
103 mkdir -p $(OPENSSH_IPK_BUILD_DIR)/build/etc/init.d
104 cp $(OPENSSH_IPK_DIR)/openssh.server.sshd_config $(OPENSSH_IPK_BUILD_DIR)/build/etc/sshd_config
105 cp $(OPENSSH_IPK_DIR)/openssh.server.S50sshd-ipk $(OPENSSH_IPK_BUILD_DIR)/build/etc/init.d/S50sshd
106 chmod a+x $(OPENSSH_IPK_BUILD_DIR)/build/etc/init.d/S50sshd
107 mkdir -p $(OPENSSH_IPK_BUILD_DIR)/build/usr/sbin
108 cp $(OPENSSH_IPK_BUILD_DIR)/usr/sbin/sshd $(OPENSSH_IPK_BUILD_DIR)/build/usr/sbin
109 mkdir -p $(OPENSSH_IPK_BUILD_DIR)/build/usr/bin
110 cp $(OPENSSH_IPK_BUILD_DIR)/usr/bin/ssh-keygen $(OPENSSH_IPK_BUILD_DIR)/build/usr/bin
111 cd $(BUILD_DIR); $(IPKG_BUILD) $(OPENSSH_IPK_BUILD_DIR)/build
112 rm -rf $(OPENSSH_IPK_BUILD_DIR)/build
113
114 $(OPENSSH_CLIENT_IPK): $(OPENSSH_IPK_BUILD_DIR)/usr/bin/ssh
115 rm -rf $(OPENSSH_IPK_BUILD_DIR)/build
116 mkdir -p $(OPENSSH_IPK_BUILD_DIR)/build/CONTROL
117 cp $(OPENSSH_IPK_DIR)/openssh.client.control $(OPENSSH_IPK_BUILD_DIR)/build/CONTROL/control
118 cp $(OPENSSH_IPK_DIR)/openssh.client.conffiles $(OPENSSH_IPK_BUILD_DIR)/build/CONTROL/conffiles
119 cp $(OPENSSH_IPK_DIR)/openssh.client.preinst $(OPENSSH_IPK_BUILD_DIR)/build/CONTROL/preinst
120 chmod a+x $(OPENSSH_IPK_BUILD_DIR)/build/CONTROL/preinst
121 mkdir -p $(OPENSSH_IPK_BUILD_DIR)/build/etc
122 cp $(OPENSSH_IPK_DIR)/openssh.client.ssh_config $(OPENSSH_IPK_BUILD_DIR)/build/etc/ssh_config
123 mkdir -p $(OPENSSH_IPK_BUILD_DIR)/build/usr/bin
124 cp $(OPENSSH_IPK_BUILD_DIR)/usr/bin/ssh $(OPENSSH_IPK_BUILD_DIR)/build/usr/bin
125 cp $(OPENSSH_IPK_BUILD_DIR)/usr/bin/scp $(OPENSSH_IPK_BUILD_DIR)/build/usr/bin
126 cd $(BUILD_DIR); $(IPKG_BUILD) $(OPENSSH_IPK_BUILD_DIR)/build
127 rm -rf $(OPENSSH_IPK_BUILD_DIR)/build
128
129 $(OPENSSH_SFTP_SERVER_IPK): $(OPENSSH_IPK_BUILD_DIR)/usr/bin/ssh
130 rm -rf $(OPENSSH_IPK_BUILD_DIR)/build
131 mkdir -p $(OPENSSH_IPK_BUILD_DIR)/build/CONTROL
132 cp $(OPENSSH_IPK_DIR)/openssh.sftp-server.control $(OPENSSH_IPK_BUILD_DIR)/build/CONTROL/control
133 mkdir -p $(OPENSSH_IPK_BUILD_DIR)/build/usr/sbin
134 cp $(OPENSSH_IPK_BUILD_DIR)/usr/sbin/sftp-server $(OPENSSH_IPK_BUILD_DIR)/build/usr/sbin
135 cd $(BUILD_DIR); $(IPKG_BUILD) $(OPENSSH_IPK_BUILD_DIR)/build
136 rm -rf $(OPENSSH_IPK_BUILD_DIR)/build
137
138 $(OPENSSH_SFTP_CLIENT_IPK): $(OPENSSH_IPK_BUILD_DIR)/usr/bin/ssh
139 rm -rf $(OPENSSH_IPK_BUILD_DIR)/build
140 mkdir -p $(OPENSSH_IPK_BUILD_DIR)/build/CONTROL
141 cp $(OPENSSH_IPK_DIR)/openssh.sftp-client.control $(OPENSSH_IPK_BUILD_DIR)/build/CONTROL/control
142 mkdir -p $(OPENSSH_IPK_BUILD_DIR)/build/usr/bin
143 cp $(OPENSSH_IPK_BUILD_DIR)/usr/bin/sftp $(OPENSSH_IPK_BUILD_DIR)/build/usr/bin
144 cd $(BUILD_DIR); $(IPKG_BUILD) $(OPENSSH_IPK_BUILD_DIR)/build
145 rm -rf $(OPENSSH_IPK_BUILD_DIR)/build
146
147 $(OPENSSH_CLIENT_EX_IPK): $(OPENSSH_IPK_BUILD_DIR)/usr/bin/ssh
148 rm -rf $(OPENSSH_IPK_BUILD_DIR)/build
149 mkdir -p $(OPENSSH_IPK_BUILD_DIR)/build/CONTROL
150 cp $(OPENSSH_IPK_DIR)/openssh.client.ex.control $(OPENSSH_IPK_BUILD_DIR)/build/CONTROL/control
151 mkdir -p $(OPENSSH_IPK_BUILD_DIR)/build/usr/bin
152 cp $(OPENSSH_IPK_BUILD_DIR)/usr/bin/ssh-add $(OPENSSH_IPK_BUILD_DIR)/build/usr/bin
153 cp $(OPENSSH_IPK_BUILD_DIR)/usr/bin/ssh-agent $(OPENSSH_IPK_BUILD_DIR)/build/usr/bin
154 cp $(OPENSSH_IPK_BUILD_DIR)/usr/bin/ssh-keyscan $(OPENSSH_IPK_BUILD_DIR)/build/usr/bin
155 mkdir -p $(OPENSSH_IPK_BUILD_DIR)/build/usr/sbin
156 cp $(OPENSSH_IPK_BUILD_DIR)/usr/sbin/ssh-keysign $(OPENSSH_IPK_BUILD_DIR)/build/usr/sbin
157 cd $(BUILD_DIR); $(IPKG_BUILD) $(OPENSSH_IPK_BUILD_DIR)/build
158 rm -rf $(OPENSSH_IPK_BUILD_DIR)/build
159
160 openssh-ipk: $(OPENSSH_SERVER_IPK) $(OPENSSH_CLIENT_IPK) \
161 $(OPENSSH_SFTP_SERVER_IPK) $(OPENSSH_SFTP_CLIENT_IPK) \
162 $(OPENSSH_CLIENT_EX_IPK)
163
164 openssh-source: $(DL_DIR)/$(OPENSSH_SOURCE)
165
166 openssh-clean:
167 $(MAKE) -C $(OPENSSH_DIR) clean
168
169 openssh-dirclean:
170 rm -rf $(OPENSSH_DIR)
171
This page took 0.050065 seconds and 5 git commands to generate.