add openssh package, sshd does not work. why?
[openwrt.git] / package / openssh / Makefile
1 # $Id$
2
3 include $(TOPDIR)/rules.mk
4
5 PKG_NAME:=openssh
6 PKG_VERSION:=4.0p1
7 PKG_RELEASE:=1
8 PKG_MD5SUM:=7b36f28fc16e1b7f4ba3c1dca191ac92
9
10 PKG_SOURCE_URL:=ftp://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/ \
11 ftp://openbsd.wiretapped.net/pub/OpenBSD/OpenSSH/portable/ \
12 ftp://ftp.belnet.be/packages/openbsd/OpenSSH/portable/ \
13 ftp://ftp.de.openbsd.org/pub/unix/OpenBSD/OpenSSH/portable/
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_CAT:=zcat
16
17 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
18 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
19
20 include $(TOPDIR)/package/rules.mk
21
22 PKG_DEPEND:="openssl"
23
24 $(eval $(call PKG_template,OPENSSH,openssh,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
25
26 $(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared
27 (cd $(PKG_BUILD_DIR); rm -rf config.cache; \
28 $(TARGET_CONFIGURE_OPTS) \
29 CFLAGS="$(TARGET_CFLAGS)" \
30 ./configure \
31 --target=$(GNU_TARGET_NAME) \
32 --host=$(GNU_TARGET_NAME) \
33 --build=$(GNU_HOST_NAME) \
34 --prefix=/usr \
35 --exec-prefix=/usr \
36 --bindir=/usr/bin \
37 --sbindir=/usr/sbin \
38 --libexecdir=/usr/lib \
39 --sysconfdir=/etc/ssh \
40 --datadir=/usr/share \
41 --localstatedir=/var \
42 --mandir=/usr/man \
43 --infodir=/usr/info \
44 --with-zlib=$(STAGING_DIR)/usr \
45 --with-ssl-dir=$(STAGING_DIR)/usr \
46 --disable-strip \
47 --disable-lastlog \
48 --disable-etc-default-login \
49 --disable-utmp \
50 --disable-utmpx \
51 --disable-wtmp \
52 --disable-wtmpx \
53 --with-cflags="$(TARGET_CFLAGS)" \
54 --includedir=$(STAGING_DIR)/include \
55 --without-pam \
56 --without-bsd-auth \
57 --without-kerberos5 \
58 --without-x \
59 --disable-debug \
60 );
61 touch $(PKG_BUILD_DIR)/.configured
62
63 $(PKG_BUILD_DIR)/.built: $(PKG_BUILD_DIR)/.configured
64 $(MAKE) CC=$(TARGET_CC) -C $(PKG_BUILD_DIR)
65 touch $(PKG_BUILD_DIR)/.built
66
67 $(PKG_BUILD_DIR)/.installed: $(PKG_BUILD_DIR)/.built
68 mkdir -p $(PKG_INSTALL_DIR)
69 $(MAKE) CC=$(TARGET_CC) -C $(PKG_BUILD_DIR) \
70 DESTDIR="$(PKG_INSTALL_DIR)" \
71 install
72 touch $(PKG_BUILD_DIR)/.installed
73
74 $(IPKG_OPENSSH): $(IDIR_OPENSSH)/CONTROL/control $(PKG_BUILD_DIR)/.installed
75 mkdir -p $(IDIR_OPENSSH){/etc/ssh,/usr/sbin,/usr/bin}
76 cp -fpR $(PKG_INSTALL_DIR)/usr/sbin/sshd $(IDIR_OPENSSH)/usr/sbin/
77 cp -fpR $(PKG_INSTALL_DIR)/usr/bin/ssh-keygen $(IDIR_OPENSSH)/usr/bin/
78 #$(RSTRIP) $(IDIR_OPENSSH)
79 mkdir -p $(PACKAGE_DIR)
80 cp $(PKG_INSTALL_DIR)/etc/ssh/* $(IDIR_OPENSSH)/etc/ssh/
81 mkdir -p $(IDIR_OPENSSH)/etc/init.d
82 install -m 755 ./files/S50sshd $(IDIR_OPENSSH)/etc/init.d/
83 $(IPKG_BUILD) $(IDIR_OPENSSH) $(PACKAGE_DIR)
84
This page took 0.039924 seconds and 5 git commands to generate.