- $(MAKE) -C $(PKG_BUILD_DIR) \
- $(TARGET_CONFIGURE_OPTS) \
- COPT_FLAGS="$(TARGET_CFLAGS)" \
- KERNEL_DIR="$(LINUX_DIR)" PREFIX=/usr \
- DESTDIR="$(1)" \
- install-devel
- $(CP) $(PKG_BUILD_DIR)/include $(1)/usr
- $(CP) $(PKG_BUILD_DIR)/libiptc/libiptc.a $(1)/usr/lib
-endef
-
-define Build/UninstallDev
- rm -rf $(1)/usr/include/libipq.h
- rm -rf $(1)/usr/include/libipulog
- rm -rf $(1)/usr/include/libipq
- rm -rf $(1)/usr/include/libiptc
- rm -rf $(1)/usr/include/linux/netfilter*
- rm -rf $(1)/usr/include/iptables*
- rm -rf $(1)/usr/include/ip6tables*
- rm -rf $(1)/usr/lib/libipq.a
- rm -rf $(1)/usr/lib/libiptc.a
+ $(INSTALL_DIR) $(1)/usr/include
+ $(INSTALL_DIR) $(1)/usr/include/iptables
+ $(INSTALL_DIR) $(1)/usr/include/net/netfilter
+
+ # XXX: iptables header fixup, some headers are not installed by iptables anymore
+ $(CP) $(PKG_BUILD_DIR)/include/net/netfilter/*.h $(1)/usr/include/net/netfilter/
+ $(CP) $(PKG_BUILD_DIR)/include/iptables/*.h $(1)/usr/include/iptables/
+ $(CP) $(PKG_BUILD_DIR)/include/iptables.h $(1)/usr/include/
+ $(CP) $(PKG_BUILD_DIR)/include/libipq/libipq.h $(1)/usr/include/
+ $(CP) $(PKG_BUILD_DIR)/include/libipulog $(1)/usr/include/
+ $(CP) $(PKG_BUILD_DIR)/include/libiptc $(1)/usr/include/
+
+ $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libxtables.so* $(1)/usr/lib/
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libip*tc.so* $(1)/usr/lib/
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libipq.so* $(1)/usr/lib/
+ $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/xtables.pc $(1)/usr/lib/pkgconfig/
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libiptc.pc $(1)/usr/lib/pkgconfig/