-$(LIBSSL_IPK): uclibc $(STAGING_DIR)/usr/lib/libcrypto.so.0.9.7
- mkdir -p $(OPENSSL_IPK_DIR)/CONTROL
- cp $(SOURCE_DIR)/libssl.control $(OPENSSL_IPK_DIR)/CONTROL/control
- mkdir -p $(OPENSSL_IPK_DIR)/usr/lib
- cp -fa $(STAGING_DIR)/lib/libcrypto.so* $(OPENSSL_IPK_DIR)/usr/lib/
- cp -fa $(STAGING_DIR)/lib/libssl.so* $(OPENSSL_IPK_DIR)/usr/lib/
- -$(STRIP) --strip-unneeded $(OPENSSL_IPK_DIR)/usr/lib/libssl.so.0.9.7
- -$(STRIP) --strip-unneeded $(OPENSSL_IPK_DIR)/usr/lib/libcrypto.so.0.9.7
- cd $(BUILD_DIR); $(STAGING_DIR)/bin/ipkg-build -c -o root -g root $(OPENSSL_IPK_DIR)
+$(LIBSSL_IPK): uclibc $(STAGING_DIR)/lib/libcrypto.a
+ mkdir -p $(OPENSSL_IPK_BUILD_DIR)/CONTROL
+ cp $(OPENSSL_IPK_DIR)/control $(OPENSSL_IPK_BUILD_DIR)/CONTROL/control
+ mkdir -p $(OPENSSL_IPK_BUILD_DIR)/usr/lib
+ cp -fa $(STAGING_DIR)/lib/libcrypto.so* $(OPENSSL_IPK_BUILD_DIR)/usr/lib/
+ cp -fa $(STAGING_DIR)/lib/libssl.so* $(OPENSSL_IPK_BUILD_DIR)/usr/lib/
+ -$(STRIP) $(OPENSSL_IPK_BUILD_DIR)/usr/lib/libssl.so.0.9.7
+ -$(STRIP) $(OPENSSL_IPK_BUILD_DIR)/usr/lib/libcrypto.so.0.9.7
+ cd $(BUILD_DIR); $(IPKG_BUILD) $(OPENSSL_IPK_BUILD_DIR)