diff options
Diffstat (limited to 'package/openssh/Makefile')
-rw-r--r-- | package/openssh/Makefile | 140 |
1 files changed, 89 insertions, 51 deletions
diff --git a/package/openssh/Makefile b/package/openssh/Makefile index 9d96f75f7..2d4a554a7 100644 --- a/package/openssh/Makefile +++ b/package/openssh/Makefile @@ -21,64 +21,102 @@ 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/ + $(RSTRIP) $(IDIR_OPENSSH_SFTP_SERVER) + $(IPKG_BUILD) $(IDIR_OPENSSH_SFTP_SERVER) $(PACKAGE_DIR) |