Merge pull request #1133 from Shulyaka/master
[feed/packages.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:=1
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
44 define Build/InstallDev
45 $(INSTALL_DIR) $(1)/usr/include
46 $(CP) $(PKG_INSTALL_DIR)/usr/include/check*.h $(1)/usr/include/
47 $(INSTALL_DIR) $(1)/usr/lib
48 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcheck.{a,so*} $(1)/usr/lib/
49 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
50 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/check.pc $(1)/usr/lib/pkgconfig/
51 endef
52
53 define Package/check/install
54 $(INSTALL_DIR) $(1)/usr/lib
55 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcheck.so.* $(1)/usr/lib/
56 endef
57
58 $(eval $(call BuildPackage,check))