Merge pull request #4940 from diizzyy/patch-95
[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 PKG_MIRROR_HASH:=939259d5c02bbe55cf8329e7bd05ce4d660e37d5c97fcbb0fdeef04f11a63e7f
21
22 PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>, \
23 Mike Brady <mikebrady@eircom.net>
24
25 PKG_LICENSE:=LGPL-2.1
26 PKG_LICENSE_FILES:=LICENCE
27
28 PKG_FIXUP:=libtool
29 PKG_REMOVE_FILES:=autogen.sh
30
31 PKG_BUILD_PARALLEL:=1
32 PKG_INSTALL:=1
33
34 include $(INCLUDE_DIR)/package.mk
35 include $(INCLUDE_DIR)/cmake.mk
36
37 define Package/libsoxr
38 SECTION:=libs
39 CATEGORY:=Libraries
40 TITLE:=The SoX Resampler library
41 URL:=http://sourceforge.net/projects/soxr/
42 DEPENDS:= +libpthread
43 endef
44
45 define Package/libsoxr/description
46 The SoX Resampler library
47 High quality, one-dimensional sample-rate conversion library
48 endef
49
50 CMAKE_OPTIONS:= -DBUILD_TESTS=0 -DBUILD_EXAMPLES=0
51 CMAKE_OPTIONS+= -DHAVE_WORDS_BIGENDIAN_EXITCODE=$(if $(CONFIG_BIG_ENDIAN),0,1)
52 CMAKE_OPTIONS+= -DWITH_OPENMP=0
53
54 define Build/InstallDev
55 $(INSTALL_DIR) $(1)/usr/include
56 $(CP) $(PKG_INSTALL_DIR)/usr/include/soxr.h $(1)/usr/include/
57 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
58 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsoxr.so* $(1)/usr/lib/
59 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/soxr.pc $(1)/usr/lib/pkgconfig/
60 endef
61
62 define Package/libsoxr/install
63 $(INSTALL_DIR) $(1)/usr/lib
64 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsoxr.so* $(1)/usr/lib/
65 endef
66
67 $(eval $(call BuildPackage,libsoxr))