First Commit
[librecmc/package-feed.git] / libs / check / Makefile
1 #
2 # Copyright (C) 2008-2015 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=check
11 PKG_VERSION:=0.9.14
12 PKG_RELEASE:=2
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=@SF/check
16 PKG_MD5SUM:=38263d115d784c17aa3b959ce94be8b8
17
18 PKG_LICENSE:=LGPL-2.1+
19 PKG_LICENSE_FILES:=COPYING.LESSER
20 PKG_MAINTAINER:=Nicolas Thill <nico@openwrt.org>
21
22 PKG_INSTALL:=1
23
24 include $(INCLUDE_DIR)/package.mk
25
26 define Package/check
27   SECTION:=libs
28   CATEGORY:=Libraries
29   TITLE:=Unit testing framework for C
30   URL:=http://check.sourceforge.net/
31   DEPENDS:= +libpthread +librt
32 endef
33
34 define Package/check/description
35   Check features a simple interface for defining unit tests, putting little in
36   the way of the developer. Tests are run in a separate address space, so Check
37   can catch both assertion failures and code errors that cause segmentation
38   faults or other signals. The output from unit tests can be used within source
39   code editors and IDEs.
40 endef
41
42 TARGET_CFLAGS += $(FPIC)
43 CONFIGURE_VARS += \
44         hw_cv_func_snprintf_c99=yes \
45         hw_cv_func_vsnprintf_c99=yes \
46
47 define Build/InstallDev
48         $(INSTALL_DIR) $(1)/usr/include
49         $(CP) $(PKG_INSTALL_DIR)/usr/include/check*.h $(1)/usr/include/
50         $(INSTALL_DIR) $(1)/usr/lib
51         $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcheck.{a,so*} $(1)/usr/lib/
52         $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
53         $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/check.pc $(1)/usr/lib/pkgconfig/
54 endef
55
56 define Package/check/install
57         $(INSTALL_DIR) $(1)/usr/lib
58         $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcheck.so.* $(1)/usr/lib/
59 endef
60
61 $(eval $(call BuildPackage,check))