-$(STAGING_DIR)/lib/libz.so: $(PKG_BUILD_DIR)/libz.so
- $(MAKE) -C $(PKG_BUILD_DIR) \
- DESTDIR="$(STAGING_DIR)" \
- install
-
-$(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)
-
-$(IPKG_STATE_DIR)/info/zlib.list: $(PKG_IPK)
- $(IPKG) install $(PKG_IPK)
-
-source: $(DL_DIR)/$(PKG_SOURCE_FILE)
-prepare: $(PKG_BUILD_DIR)/.patched
-compile: $(STAGING_DIR)/lib/libz.so $(PKG_IPK)
-install: $(PKG_ZLIB) $(IPKG_STATE_DIR)/info/zlib.list
+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