-$(eval $(call PKG_template,OPENSWAN,openswan,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
-
-FLAGS := $(TARGET_CFLAGS) -I$(PKG_BUILD_DIR)/linux/include -L$(STAGING_DIR)/usr/lib -I$(STAGING_DIR)/usr/include
-
-$(PKG_BUILD_DIR)/.built:
-# $(MAKE) -C $(PKG_BUILD_DIR) \
-# $(TARGET_CONFIGURE_OPTS) \
-# KERNELSRC="$(LINUX_DIR)" \
-# ARCH="mips" \
-# USERCOMPILE="$(FLAGS)" \
-# module
- $(MAKE) -C $(PKG_BUILD_DIR) \
- $(TARGET_CONFIGURE_OPTS) \
- KERNELSRC="$(LINUX_DIR)" \
- ARCH="mips" \
- USERCOMPILE="$(FLAGS)" \
- EXTRA_INCLUDE="-I$(STAGING_DIR)/usr/include" \
- EXTRA_LIBS="-L$(STAGING_DIR)/usr/lib" \
- IPSECDIR="/usr/lib/ipsec" \
- INC_USRLOCAL="/usr" \
- programs
-
-$(IPKG_OPENSWAN):
+define Package/kmod-openswan
+SECTION:=drivers
+CATEGORY:=Drivers
+DEPENDS:=
+TITLE:=Openswan kernel module
+DESCRIPTION:=Openswan kernel module \\\
+Openswan is an implementation of IPsec for Linux.
+URL:=http://www.openswan.org/
+VERSION:=$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE)
+endef
+
+define Build/Compile