nut: update OpenSSL 1.1.0 patch
[feed/packages.git] / libs / libfmt / Makefile
1 #
2 # Copyright (C) 2018 Othmar Truniger
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:=libfmt
11 PKG_VERSION:=6.0.0
12 PKG_RELEASE:=1
13
14 PKG_SOURCE_NAME:=fmt
15 PKG_SOURCE:=$(PKG_SOURCE_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=https://codeload.github.com/fmtlib/$(PKG_SOURCE_NAME)/tar.gz/$(PKG_VERSION)?
17 PKG_HASH:=f1907a58d5e86e6c382e51441d92ad9e23aea63827ba47fd647eacc0d3a16c78
18 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_SOURCE_NAME)-$(PKG_VERSION)
19
20 PKG_MAINTAINER:=Othmar Truniger <github@truniger.ch>
21 PKG_LICENSE:=MIT
22 PKG_LICENSE_FILES:=LICENSE.rst
23
24 CMAKE_INSTALL:=1
25
26 include $(INCLUDE_DIR)/package.mk
27 include $(INCLUDE_DIR)/cmake.mk
28
29 CMAKE_OPTIONS += -DBUILD_SHARED_LIBS=ON
30 CMAKE_OPTIONS += -DFMT_DOC=OFF
31 CMAKE_OPTIONS += -DFMT_TEST=OFF
32
33 define Package/libfmt
34 SECTION:=libs
35 CATEGORY:=Libraries
36 TITLE:=Small, safe and fast formatting library
37 URL:=https://github.com/fmtlib/fmt
38 DEPENDS:=+libstdcpp
39 endef
40
41 define Package/libfmt/description
42 fmt is an open-source formatting library for C++.
43 It can be used as a safe alternative to printf or as a fast alternative to IOStreams.
44 endef
45
46 define Build/InstallDev
47 $(call Build/InstallDev/cmake,$(1))
48 $(SED) 's,/usr/include,$$$${prefix}/include,g' $(1)/usr/lib/pkgconfig/fmt.pc
49 $(SED) 's,/usr/lib,$$$${exec_prefix}/lib,g' $(1)/usr/lib/pkgconfig/fmt.pc
50 endef
51
52 define Package/libfmt/install
53 $(INSTALL_DIR) $(1)/usr/lib
54 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfmt.so* $(1)/usr/lib/
55 endef
56
57 $(eval $(call BuildPackage,libfmt))