-$(STAGING_DIR)/lib/libz.so: $(PKG_BUILD_DIR)/libz.so
- $(MAKE) -C $(PKG_BUILD_DIR) \
- DESTDIR="$(STAGING_DIR)" \
- install
-
-$(PACKAGE_DIR)/$(PKG_IPK): $(STAGING_DIR)/lib/libz.so
- mkdir -p $(PACKAGE_DIR)
- $(SCRIPT_DIR)/make-ipkg-dir.sh $(PKG_BUILD_DIR)/ipkg/zlib zlib.control $(PKG_VERSION)-$(PKG_RELEASE) $(ARCH)
- mkdir -p $(PKG_BUILD_DIR)/ipkg/zlib/usr/lib
- cp -a $(PKG_BUILD_DIR)/libz.so* $(PKG_BUILD_DIR)/ipkg/zlib/usr/lib
- $(STRIP) $(PKG_BUILD_DIR)/ipkg/zlib/usr/lib/*
- $(IPKG_BUILD) $(PKG_BUILD_DIR)/ipkg/zlib $(PACKAGE_DIR)
-
-
-source: $(DL_DIR)/$(PKG_SOURCE_FILE)
-prepare: $(PKG_BUILD_DIR)/.patched
-compile: $(STAGING_DIR)/lib/libz.so $(PACKAGE_DIR)/$(PKG_IPK)
-install: $(PKG_ZLIB)
- $(IPKG) install $(PACKAGE_DIR)/$(PKG_IPK)
-clean:
- rm -rf $(PKG_BUILD_DIR)
- rm -f $(STAGING_DIR)/lib/libz* $(STAGING_DIR)/include/zlib*
- rm -f $(PACKAGE_DIR)/zlib\*.ipk
+define Build/InstallDev
+ mkdir -p $(1)/usr/include
+ $(CP) $(PKG_INSTALL_DIR)/usr/include/z{conf,lib}.h \
+ $(1)/usr/include/
+ mkdir -p $(1)/usr/lib
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libz.{a,so*} \
+ $(1)/usr/lib/
+endef
+
+# libz.so is needed for openssl (zlib-dynamic)
+define Package/zlib/install
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libz.so $(1)/usr/lib/
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libz.so.* $(1)/usr/lib/
+endef