libsoxr: make dynamic libraries
[feed/packages.git] / libs / libsoxr / Makefile
1 #
2 # Copyright (C) 2014-2016 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 # updated to work with latest source from abrasive
7 #
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=libsoxr
12 PKG_VERSION:=0.1.1
13 PKG_RELEASE:=3
14
15 PKG_SOURCE_PROTO:=git
16 PKG_SOURCE_URL:=git://git.code.sf.net/p/soxr/code
17 PKG_SOURCE_VERSION:=$(PKG_VERSION)
18 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
19 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
20
21 PKG_LICENSE:=LGPL-2.1
22 PKG_LICENSE_FILES:=LICENCE
23
24 PKG_FIXUP:=libtool
25 PKG_REMOVE_FILES:=autogen.sh
26
27 PKG_BUILD_PARALLEL:=1
28
29 include $(INCLUDE_DIR)/package.mk
30 include $(INCLUDE_DIR)/cmake.mk
31
32 define Package/libsoxr
33 SECTION:=libs
34 CATEGORY:=Libraries
35 TITLE:=The SoX Resampler library
36 URL:=http://sourceforge.net/projects/soxr/
37 MAINTAINER:=Mike Brady <mikebrady@eircom.net>
38 DEPENDS:= +libpthread
39 endef
40
41 define Package/libsoxr/description
42 The SoX Resampler library
43 High quality, one-dimensional sample-rate conversion library
44 endef
45
46 CMAKE_OPTIONS:= -DBUILD_TESTS=0 -DBUILD_EXAMPLES=0
47 CMAKE_OPTIONS+= -DHAVE_WORDS_BIGENDIAN_EXITCODE=$(if $(CONFIG_BIG_ENDIAN),0,1)
48
49 define Build/InstallDev
50 $(INSTALL_DIR) $(1)/usr/include
51 $(CP) $(PKG_INSTALL_DIR)/usr/include/soxr.h $(1)/usr/include/
52 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
53 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsoxr.so* $(1)/usr/lib/
54 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/soxr.pc $(1)/usr/lib/pkgconfig/
55 endef
56
57 define Package/libsoxr/install
58 $(INSTALL_DIR) $(1)/usr/lib
59 $(CP) $(PKG_INSTALL_DIR)/src/libsoxr.so* $(1)/usr/lib/
60 endef
61
62
63 $(eval $(call BuildPackage,libsoxr))