fix nginx build
[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.0
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
16 PKG_SOURCE_URL:=@SF/sox
17 PKG_MD5SUM:=813807c6d6fcd4b0af5c995e61f46687
18
19 PKG_LICENSE:=LGPLv2.1 GPLv2
20 PKG_LICENSE_FILES:=COPYING LICENSE.LGPL LICENSE.GPL
21
22 PKG_FIXUP:=autoreconf
23
24 PKG_INSTALL:=1
25
26 include $(INCLUDE_DIR)/package.mk
27
28 TARGET_LDFLAGS+= \
29         -Wl,-rpath-link=$(STAGING_DIR)/usr/lib
30
31 # NOTE: libflac is out of date for 8.09's freeze and can't be compiled in
32
33 define Package/sox
34   SECTION:=sound
35   CATEGORY:=Sound
36   DEPENDS:=+BUILD_PATENTED:lame-lib +BUILD_PATENTED:libmad +BUILD_PATENTED:libid3tag +libvorbis +libvorbisidec +libgsm +alsa-lib +libsndfile +libflac +ffmpeg +libmagic +libpng
37   TITLE:=Sox is a general purpose sound converter/player/recorder
38   URL:=http://sox.sourceforge.net/
39   MAINTAINER:=Hamish Guthrie <hcg@openwrt.org>
40 endef
41
42 define Package/sox/description
43         SoX is a command line utility that can convert various formats
44         of computer audio files in to other formats. It can also apply
45         various effects to these sound files during the conversion.
46         As an added bonus, SoX can play and record audio files on
47         several unix-style platforms.
48 endef
49
50 define Build/Configure
51         $(call Build/Configure/Default, \
52                 --disable-external-gsm \
53                 --disable-oss \
54                 --enable-alsa \
55                 --disable-libao \
56                 --without-libltdl \
57                 --with-ogg \
58                 --with-flac \
59                 --with-ffmpeg \
60                 --without-amr-wb \
61                 --without-amr-nb \
62                 --without-samplerate \
63                 --without-ladspa \
64                 --$(if $(CONFIG_BUILD_PATENTED),with-mad,without-mad) \
65                 --$(if $(CONFIG_BUILD_PATENTED),with-lame,without-lame) \
66                 --$(if $(CONFIG_BUILD_PATENTED),with-id3tag,without-id3tag) \
67         )
68 endef
69
70 define Build/InstallDev
71         $(INSTALL_DIR) $(1)/usr/include
72         $(CP) \
73                 $(PKG_INSTALL_DIR)/usr/include \
74                 $(1)/usr/include/
75         $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
76         $(CP) \
77                 $(PKG_INSTALL_DIR)/usr/lib/libsox.{a,so*,la} \
78                 $(1)/usr/lib/
79         $(INSTALL_DATA) \
80                 $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* \
81                 $(1)/usr/lib/pkgconfig/
82 endef
83
84 define Package/sox/install
85         $(INSTALL_DIR) $(1)/usr/bin
86         $(INSTALL_DIR) $(1)/usr/lib
87         $(CP) $(PKG_INSTALL_DIR)/usr/bin/{play,rec,sox} $(1)/usr/bin/
88         $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsox.so* $(1)/usr/lib/
89 endef
90
91 $(eval $(call BuildPackage,sox))
92