From 797349f8efa152836add03ac0943aeb27169019b Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Fri, 29 Apr 2011 15:33:07 +0000 Subject: [PATCH] [PATCH] [packages] New package libcunit Add to CUnit to /libs/ CUnit is a lightweight system for writing, administering, and running unit tests in C. It provides C programmers a basic testing functionality with a flexible variety of user interfaces. Signed-off-by: Florian Sesser SVN-Revision: 26790 --- libs/libcunit/Makefile | 71 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 libs/libcunit/Makefile diff --git a/libs/libcunit/Makefile b/libs/libcunit/Makefile new file mode 100644 index 0000000000..7cec339c4a --- /dev/null +++ b/libs/libcunit/Makefile @@ -0,0 +1,71 @@ +# +# Copyright (C) 2011 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. + +include $(TOPDIR)/rules.mk + +PKG_NAME:=libcunit +PKG_VERSION:=2.1-0 +PKG_RELEASE:=1 + +PKG_SOURCE:=CUnit-$(PKG_VERSION)-src.tar.gz +PKG_SOURCE_URL:=http://downloads.sourceforge.net/project/cunit/CUnit/$(PKG_VERSION) +PKG_MD5SUM:=f4f53d2c41e9315a91b4f14a1706fe4f +PKG_BUILD_DIR:=$(BUILD_DIR)/CUnit-$(PKG_VERSION) + +PKG_FIXUP:=autoreconf + +include $(INCLUDE_DIR)/package.mk + +define Package/libcunit + SECTION:=libs + CATEGORY:=Libraries + TITLE:=Unit testing framework for C + URL:=http://cunit.sourceforge.net/ +endef + +define Package/libcunit/description + CUnit, lightweight unit testing for C + CUnit is a lightweight system for writing, administering, and running unit + tests in C. It provides C programmers a basic testing functionality with a + flexible variety of user interfaces. +endef + + +define Build/Configure + $(call Build/Configure/Default, \ + , \ + BUILD_CC="$(TARGET_CC)" \ + HOSTCC="$(HOSTCC)" \ + ) +endef + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) \ + CCOPT="$(TARGET_CFLAGS)" \ + LDFLAGS="$(TARGET_LDFLAGS)" \ + DESTDIR="$(PKG_INSTALL_DIR)" \ + install +endef + + +define Build/InstallDev + mkdir -p $(1)/usr/include/CUnit + $(CP) $(PKG_INSTALL_DIR)/usr/include/CUnit/* \ + $(1)/usr/include/CUnit + + mkdir -p $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcunit.* \ + $(1)/usr/lib +endef + + +define Package/libcunit/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcunit.* $(1)/usr/lib +endef + + +$(eval $(call BuildPackage,libcunit)) -- 2.30.2