-PKG_CAT:=bzcat
-
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
-PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
-
-include $(TOPDIR)/package/rules.mk
-
-$(eval $(call PKG_template,LIBGMP,libgmp,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
-
-$(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared
- (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status}; \
- $(TARGET_CONFIGURE_OPTS) \
- CFLAGS="$(TARGET_CFLAGS)" \
- ./configure \
- --target=$(GNU_TARGET_NAME) \
- --host=$(GNU_TARGET_NAME) \
- --build=$(GNU_HOST_NAME) \
- --program-prefix="" \
- --program-suffix="" \
- --prefix=/usr \
- --exec-prefix=/usr \
- --bindir=/usr/bin \
- --datadir=/usr/share \
- --includedir=/usr/include \
- --infodir=/usr/share/info \
- --libdir=/usr/lib \
- --libexecdir=/usr/lib \
- --localstatedir=/var \
- --mandir=/usr/share/man \
- --sbindir=/usr/sbin \
- --sysconfdir=/etc \
- $(DISABLE_NLS) \
- $(DISABLE_LARGEFILE) \
- --enable-shared \
- --enable-static \
- );
- touch $@
-
-$(PKG_BUILD_DIR)/.built: $(PKG_BUILD_DIR)/.configured
- rm -rf $(PKG_INSTALL_DIR)
- mkdir -p $(PKG_INSTALL_DIR)
- $(MAKE) -C $(PKG_BUILD_DIR) \
+PKG_SOURCE_URL:=@GNU/gmp
+PKG_MD5SUM:=7ce52531644e6d12f16911b7e3151f3f
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/libgmp
+ SECTION:=libs
+ CATEGORY:=Libraries
+ TITLE:=GNU multiprecision arithmetic library
+ URL:=http://gmplib.org/
+endef
+
+define Package/libgmp/description
+ GMP is a free library for arbitrary precision arithmetic, operating on
+ signed integers, rational numbers, and floating point numbers.
+endef
+
+CONFIGURE_VARS += CC="$(TARGET_CROSS)gcc"
+CONFIGURE_ARGS += \
+ --enable-shared \
+ --enable-static \
+
+define Build/Compile
+ $(call Build/Compile/Default, \