-source: $(DL_DIR)/$(PKG_SOURCE_FILE)
-prepare: $(PKG_BUILD_DIR)/.patched
-compile: $(STAGING_DIR)/lib/libpcap.a
-install:
+$(IPKG_LIBPCAP): $(STAGING_DIR)/usr/lib/libpcap.so
+ $(SCRIPT_DIR)/make-ipkg-dir.sh $(IDIR_LIBPCAP) $(PKG_NAME).control $(PKG_VERSION)-$(PKG_RELEASE) $(ARCH)
+ mkdir -p $(IDIR_LIBPCAP)/usr/lib
+ cp -fpR $(STAGING_DIR)/usr/lib/libpcap.so.* $(IDIR_LIBPCAP)/usr/lib/
+ $(STRIP) $(IDIR_LIBPCAP)/usr/lib/lib*.so*
+ mkdir -p $(PACKAGE_DIR)
+ $(IPKG_BUILD) $(IDIR_LIBPCAP) $(PACKAGE_DIR)