X-Git-Url: https://git.rohieb.name/openwrt.git/blobdiff_plain/14d0f66cd28d2535a4c472f9df8c75acdc99f08a..f2cc72d702f51fa1a4d6ac4c557b82b348050ee3:/openwrt/package/openssh/Makefile?ds=sidebyside diff --git a/openwrt/package/openssh/Makefile b/openwrt/package/openssh/Makefile index 9d96f75f7..c0d296d23 100644 --- a/openwrt/package/openssh/Makefile +++ b/openwrt/package/openssh/Makefile @@ -3,9 +3,9 @@ include $(TOPDIR)/rules.mk PKG_NAME:=openssh -PKG_VERSION:=4.0p1 +PKG_VERSION:=4.2p1 PKG_RELEASE:=1 -PKG_MD5SUM:=7b36f28fc16e1b7f4ba3c1dca191ac92 +PKG_MD5SUM:=df899194a340c933944b193477c628fa PKG_SOURCE_URL:=ftp://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/ \ ftp://openbsd.wiretapped.net/pub/OpenBSD/OpenSSH/portable/ \ @@ -21,64 +21,104 @@ include $(TOPDIR)/package/rules.mk PKG_DEPEND:="openssl" -$(eval $(call PKG_template,OPENSSH,openssh,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) +$(eval $(call PKG_template,OPENSSH_CLIENT,openssh-client,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) +$(eval $(call PKG_template,OPENSSH_CLIENT_UTILS,openssh-client-utils,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) +$(eval $(call PKG_template,OPENSSH_SERVER,openssh-server,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) +$(eval $(call PKG_template,OPENSSH_SFTP_CLIENT,openssh-sftp-client,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) +$(eval $(call PKG_template,OPENSSH_SFTP_SERVER,openssh-sftp-server,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared - (cd $(PKG_BUILD_DIR); rm -rf config.cache; \ +$(PKG_BUILD_DIR)/.configured: + (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \ $(TARGET_CONFIGURE_OPTS) \ CFLAGS="$(TARGET_CFLAGS)" \ + CPPFLAGS="-I$(STAGING_DIR)/usr/include" \ + LD="$(TARGET_CC)" \ + LDFLAGS="-L$(STAGING_DIR)/usr/lib" \ ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --sbindir=/usr/sbin \ - --libexecdir=/usr/lib \ - --sysconfdir=/etc/ssh \ - --datadir=/usr/share \ - --localstatedir=/var \ - --mandir=/usr/man \ - --infodir=/usr/info \ - --with-zlib=$(STAGING_DIR)/usr \ - --with-ssl-dir=$(STAGING_DIR)/usr \ - --disable-strip \ - --disable-lastlog \ - --disable-etc-default-login \ - --disable-utmp \ - --disable-utmpx \ - --disable-wtmp \ - --disable-wtmpx \ - --with-cflags="$(TARGET_CFLAGS)" \ - --includedir=$(STAGING_DIR)/include \ - --without-pam \ - --without-bsd-auth \ - --without-kerberos5 \ - --without-x \ - --disable-debug \ + --target=$(GNU_TARGET_NAME) \ + --host=$(GNU_TARGET_NAME) \ + --build=$(GNU_HOST_NAME) \ + --program-prefix="" \ + --program-suffix="" \ + --prefix=/usr \ + --exec-prefix=/usr \ + --bindir=/usr/bin \ + --datadir=/usr/share \ + --includedir=/usr/include \ + --infodir=/usr/share/info \ + --libdir=/usr/lib \ + --libexecdir=/usr/lib \ + --localstatedir=/var \ + --mandir=/usr/share/man \ + --sbindir=/usr/sbin \ + --sysconfdir=/etc/ssh \ + $(DISABLE_LARGEFILE) \ + $(DISABLE_NLS) \ + --enable-shared \ + --disable-static \ + --disable-debug \ + --disable-strip \ + --disable-etc-default-login \ + --disable-lastlog \ + --disable-utmp \ + --disable-utmpx \ + --disable-wtmp \ + --disable-wtmpx \ + --without-bsd-auth \ + --without-kerberos5 \ + --without-pam \ + --without-x \ ); - touch $(PKG_BUILD_DIR)/.configured + touch $@ -$(PKG_BUILD_DIR)/.built: $(PKG_BUILD_DIR)/.configured - $(MAKE) CC=$(TARGET_CC) -C $(PKG_BUILD_DIR) - touch $(PKG_BUILD_DIR)/.built - -$(PKG_BUILD_DIR)/.installed: $(PKG_BUILD_DIR)/.built +$(PKG_BUILD_DIR)/.built: + rm -rf $(PKG_INSTALL_DIR) mkdir -p $(PKG_INSTALL_DIR) - $(MAKE) CC=$(TARGET_CC) -C $(PKG_BUILD_DIR) \ + $(MAKE) -C $(PKG_BUILD_DIR) \ DESTDIR="$(PKG_INSTALL_DIR)" \ - install - touch $(PKG_BUILD_DIR)/.installed + all install + touch $@ + +$(IPKG_OPENSSH_CLIENT): + install -m0700 -d $(IDIR_OPENSSH_CLIENT)/etc/ssh + cp -fpR $(PKG_INSTALL_DIR)/etc/ssh/ssh_config $(IDIR_OPENSSH_CLIENT)/etc/ssh/ + install -m0755 -d $(IDIR_OPENSSH_CLIENT)/usr/bin + cp -fpR $(PKG_INSTALL_DIR)/usr/bin/ssh $(IDIR_OPENSSH_CLIENT)/usr/bin/ + cp -fpR $(PKG_INSTALL_DIR)/usr/bin/scp $(IDIR_OPENSSH_CLIENT)/usr/bin/ + $(RSTRIP) $(IDIR_OPENSSH_CLIENT) + $(IPKG_BUILD) $(IDIR_OPENSSH_CLIENT) $(PACKAGE_DIR) + +$(IPKG_OPENSSH_CLIENT_UTILS): + install -m0755 -d $(IDIR_OPENSSH_CLIENT_UTILS)/usr/bin + cp -fpR $(PKG_INSTALL_DIR)/usr/bin/ssh-add $(IDIR_OPENSSH_CLIENT_UTILS)/usr/bin/ + cp -fpR $(PKG_INSTALL_DIR)/usr/bin/ssh-agent $(IDIR_OPENSSH_CLIENT_UTILS)/usr/bin/ + cp -fpR $(PKG_INSTALL_DIR)/usr/bin/ssh-keyscan $(IDIR_OPENSSH_CLIENT_UTILS)/usr/bin/ + $(RSTRIP) $(IDIR_OPENSSH_CLIENT_UTILS) + $(IPKG_BUILD) $(IDIR_OPENSSH_CLIENT_UTILS) $(PACKAGE_DIR) + +$(IPKG_OPENSSH_SERVER): + install -m0700 -d $(IDIR_OPENSSH_SERVER)/etc/ssh + cp -fpR $(PKG_INSTALL_DIR)/etc/ssh/sshd_config $(IDIR_OPENSSH_SERVER)/etc/ssh/ + install -m0755 -d $(IDIR_OPENSSH_SERVER)/etc/init.d + install -m0755 ./files/S50sshd $(IDIR_OPENSSH_SERVER)/etc/init.d/ + install -m0755 -d $(IDIR_OPENSSH_SERVER)/usr/bin + cp -fpR $(PKG_INSTALL_DIR)/usr/bin/ssh-keygen $(IDIR_OPENSSH_SERVER)/usr/bin/ + install -m0755 -d $(IDIR_OPENSSH_SERVER)/usr/sbin + cp -fpR $(PKG_INSTALL_DIR)/usr/sbin/sshd $(IDIR_OPENSSH_SERVER)/usr/sbin/ + $(RSTRIP) $(IDIR_OPENSSH_SERVER) + $(IPKG_BUILD) $(IDIR_OPENSSH_SERVER) $(PACKAGE_DIR) + +$(IPKG_OPENSSH_SFTP_CLIENT): + install -m0755 -d $(IDIR_OPENSSH_SFTP_CLIENT)/usr/bin + cp -fpR $(PKG_INSTALL_DIR)/usr/bin/sftp $(IDIR_OPENSSH_SFTP_CLIENT)/usr/bin/ + $(RSTRIP) $(IDIR_OPENSSH_SFTP_CLIENT) + $(IPKG_BUILD) $(IDIR_OPENSSH_SFTP_CLIENT) $(PACKAGE_DIR) -$(IPKG_OPENSSH): $(IDIR_OPENSSH)/CONTROL/control $(PKG_BUILD_DIR)/.installed - mkdir -p $(IDIR_OPENSSH){/etc/ssh,/usr/sbin,/usr/bin} - cp -fpR $(PKG_INSTALL_DIR)/usr/sbin/sshd $(IDIR_OPENSSH)/usr/sbin/ - cp -fpR $(PKG_INSTALL_DIR)/usr/bin/ssh-keygen $(IDIR_OPENSSH)/usr/bin/ - #$(RSTRIP) $(IDIR_OPENSSH) - mkdir -p $(PACKAGE_DIR) - cp $(PKG_INSTALL_DIR)/etc/ssh/* $(IDIR_OPENSSH)/etc/ssh/ - mkdir -p $(IDIR_OPENSSH)/etc/init.d - install -m 755 ./files/S50sshd $(IDIR_OPENSSH)/etc/init.d/ - $(IPKG_BUILD) $(IDIR_OPENSSH) $(PACKAGE_DIR) +$(IPKG_OPENSSH_SFTP_SERVER): + install -m0755 -d $(IDIR_OPENSSH_SFTP_SERVER)/usr/lib + cp -fpR $(PKG_INSTALL_DIR)/usr/lib/sftp-server $(IDIR_OPENSSH_SFTP_SERVER)/usr/lib/ + install -m0755 -d $(IDIR_OPENSSH_SFTP_SERVER)/usr/libexec + ln -sf ../lib/sftp-server $(IDIR_OPENSSH_SFTP_SERVER)/usr/libexec/sftp-server + $(RSTRIP) $(IDIR_OPENSSH_SFTP_SERVER) + $(IPKG_BUILD) $(IDIR_OPENSSH_SFTP_SERVER) $(PACKAGE_DIR)