8ebec7248ee4708222c8b3523c63b6c81bf65879
[packages.git] / sound / sox / Makefile
1
2 # Copyright (C) 2008 David Cooper <dave@kupesoft.com>
3 # Copyright (C) 2006-2012 OpenWrt.org
4 #
5 # This is free software, licensed under the GNU General Public License v2.
6 # See /LICENSE for more information.
7 #
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=sox
12 PKG_VERSION:=14.4.1
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
16 PKG_SOURCE_URL:=@SF/sox
17 PKG_MD5SUM:=ff9ca6aca972549de0e80e8e30ed379c
18
19 PKG_LICENSE:=LGPLv2.1 GPLv2
20 PKG_LICENSE_FILES:=COPYING LICENSE.LGPL LICENSE.GPL
21
22 PKG_INSTALL:=1
23
24 include $(INCLUDE_DIR)/package.mk
25
26 TARGET_LDFLAGS+= \
27         -Wl,-rpath-link=$(STAGING_DIR)/usr/lib
28
29 define Package/sox
30   SECTION:=sound
31   CATEGORY:=Sound
32   DEPENDS:=+BUILD_PATENTED:lame-lib +BUILD_PATENTED:libmad +BUILD_PATENTED:libid3tag +libvorbis +libvorbisidec +libgsm +alsa-lib +libsndfile +libflac +ffmpeg +libmagic +libpng +libao
33   TITLE:=Sox is a general purpose sound converter/player/recorder
34   URL:=http://sox.sourceforge.net/
35   MAINTAINER:=Hamish Guthrie <hcg@openwrt.org>
36 endef
37
38 define Package/sox/description
39         SoX is a command line utility that can convert various formats
40         of computer audio files in to other formats. It can also apply
41         various effects to these sound files during the conversion.
42         As an added bonus, SoX can play and record audio files on
43         several unix-style platforms.
44 endef
45
46 define Build/Configure
47         $(call Build/Configure/Default, \
48                 --disable-external-gsm \
49                 --disable-oss \
50                 --enable-alsa \
51                 --disable-libao \
52                 --without-libltdl \
53                 --with-ogg \
54                 --with-flac \
55                 --with-ffmpeg \
56                 --without-amr-wb \
57                 --without-amr-nb \
58                 --without-samplerate \
59                 --without-ladspa \
60                 --$(if $(CONFIG_BUILD_PATENTED),with-mad,without-mad) \
61                 --$(if $(CONFIG_BUILD_PATENTED),with-lame,without-lame) \
62                 --$(if $(CONFIG_BUILD_PATENTED),with-id3tag,without-id3tag) \
63         )
64 endef
65
66 define Build/InstallDev
67         $(INSTALL_DIR) $(1)/usr/include
68         $(CP) \
69                 $(PKG_INSTALL_DIR)/usr/include \
70                 $(1)/usr/include/
71         $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
72         $(CP) \
73                 $(PKG_INSTALL_DIR)/usr/lib/libsox.{a,so*,la} \
74                 $(1)/usr/lib/
75         $(INSTALL_DATA) \
76                 $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* \
77                 $(1)/usr/lib/pkgconfig/
78 endef
79
80 define Package/sox/install
81         $(INSTALL_DIR) $(1)/usr/bin
82         $(INSTALL_DIR) $(1)/usr/lib
83         $(CP) $(PKG_INSTALL_DIR)/usr/bin/{play,rec,sox} $(1)/usr/bin/
84         $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsox.so* $(1)/usr/lib/
85 endef
86
87 $(eval $(call BuildPackage,sox))
88