lede-packages-rs

git clone git://archive.git.mtrnord.blog/MTRNord/lede-packages-rs.git
Log | Files | Refs | README | LICENSE

Makefile (1778B)


      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.11.0
     12 PKG_RELEASE:=1
     13 
     14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
     15 PKG_SOURCE_URL:=https://github.com/libcheck/check/releases/download/$(PKG_VERSION)
     16 PKG_HASH:=24f7a48aae6b74755bcbe964ce8bc7240f6ced2141f8d9cf480bc3b3de0d5616
     17 
     18 PKG_LICENSE:=LGPL-2.1+
     19 PKG_LICENSE_FILES:=COPYING.LESSER
     20 PKG_MAINTAINER:=Eduardo Abinader <eduardoabinader@gmail.com>
     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:=https://libcheck.github.io/check/
     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))