480915e76aa8d735b2dc7ac0ec6c60bdb6933973
[feed/telephony.git] / libs / spandsp3 / Makefile
1 #
2 # Copyright (C) 2020 Sebastian Kemper <sebastian_ml@gmx.net>
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:=spandsp3
11
12 PKG_SOURCE_PROTO:=git
13 PKG_SOURCE_URL:=https://github.com/freeswitch/spandsp.git
14 PKG_SOURCE_DATE=2020-08-14
15 PKG_SOURCE_VERSION:=6ec23e5a7e411a22d59e5678d12c4d2942c4a4b6
16 PKG_RELEASE:=2
17 PKG_MIRROR_HASH:=fcfa13576a25ff27e3746c3db30de89d2afceb963072b352a34e7a4a9f492ae5
18
19 PKG_INSTALL:=1
20 PKG_BUILD_PARALLEL:=1
21 PKG_FIXUP:=autoreconf
22
23 PKG_LICENSE:=LGPL-2.1-or-later GPL-2.0-or-later
24 PKG_LICENSE_FILES:=COPYING
25 PKG_MAINTAINER:= \
26 Jiri Slachta <jiri@slachta.eu> \
27 Sebastian Kemper <sebastian_ml@gmx.net>
28
29 include $(INCLUDE_DIR)/package.mk
30
31 define Package/libspandsp3
32 SUBMENU:=Telephony
33 SECTION:=libs
34 CATEGORY:=Libraries
35 TITLE:=spandsp3 library
36 DEPENDS:=+libjpeg +libtiff
37 URL:=https://github.com/freeswitch/spandsp
38 ABI_VERSION:=3
39 endef
40
41 # Use fixed point math when soft float support is enabled for target devices.
42 ifeq ($(CONFIG_SOFT_FLOAT),y)
43 CONFIGURE_ARGS+= \
44 --enable-fixed-point
45 endif
46
47 define Build/InstallDev
48 $(INSTALL_DIR) \
49 $(1)/usr/lib/spandsp3/{include/spandsp/private,lib}
50
51 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libspandsp* \
52 $(1)/usr/lib/spandsp3/lib
53
54 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/spandsp.h \
55 $(1)/usr/lib/spandsp3/include
56
57 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/spandsp/*.h \
58 $(1)/usr/lib/spandsp3/include/spandsp
59
60 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/spandsp/private/*.h \
61 $(1)/usr/lib/spandsp3/include/spandsp/private
62
63 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
64 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/spandsp.pc \
65 $(1)/usr/lib/pkgconfig/spandsp3.pc
66 endef
67
68 define Package/libspandsp3/install
69 $(INSTALL_DIR) $(1)/usr/lib
70 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libspandsp.so.$(ABI_VERSION)* \
71 $(1)/usr/lib
72 endef
73
74 $(eval $(call BuildPackage,libspandsp3))