fix sox build
[packages.git] / sound / sox / Makefile
index fa12a82..614ae3b 100644 (file)
@@ -1,6 +1,6 @@
 # 
 # Copyright (C) 2008 David Cooper <dave@kupesoft.com>
-# Copyright (C) 2006 OpenWrt.org
+# Copyright (C) 2006-2012 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -9,14 +9,17 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=sox
-PKG_VERSION:=14.0.1
-PKG_RELEASE:=2
+PKG_VERSION:=14.4.0
+PKG_RELEASE:=1
 
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=@SF/sox
-PKG_MD5SUM:=6c95af60b20b9655531bf3162c0be937
+PKG_MD5SUM:=813807c6d6fcd4b0af5c995e61f46687
 
-PKG_FIXUP = libtool
+PKG_LICENSE:=LGPLv2.1 GPLv2
+PKG_LICENSE_FILES:=COPYING LICENSE.LGPL LICENSE.GPL
+
+PKG_FIXUP:=autoreconf
 
 PKG_INSTALL:=1
 
@@ -30,9 +33,10 @@ TARGET_LDFLAGS+= \
 define Package/sox
   SECTION:=sound
   CATEGORY:=Sound
-  DEPENDS:=+BUILD_PATENTED:lame-lib +BUILD_PATENTED:libmad +BUILD_PATENTED:libid3tag +libvorbis +libvorbisidec +libgsm
+  DEPENDS:=+BUILD_PATENTED:lame-lib +BUILD_PATENTED:libmad +BUILD_PATENTED:libid3tag +libvorbis +libvorbisidec +libgsm +alsa-lib +libsndfile +libflac +ffmpeg +libmagic +libpng +libao
   TITLE:=Sox is a general purpose sound converter/player/recorder
   URL:=http://sox.sourceforge.net/
+  MAINTAINER:=Hamish Guthrie <hcg@openwrt.org>
 endef
 
 define Package/sox/description
@@ -51,8 +55,8 @@ define Build/Configure
                --disable-libao \
                --without-libltdl \
                --with-ogg \
-               --without-flac \
-               --without-ffmpeg \
+               --with-flac \
+               --with-ffmpeg \
                --without-amr-wb \
                --without-amr-nb \
                --without-samplerate \
@@ -63,11 +67,25 @@ define Build/Configure
        )
 endef
 
+define Build/InstallDev
+       $(INSTALL_DIR) $(1)/usr/include
+       $(CP) \
+               $(PKG_INSTALL_DIR)/usr/include \
+               $(1)/usr/include/
+       $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
+       $(CP) \
+               $(PKG_INSTALL_DIR)/usr/lib/libsox.{a,so*,la} \
+               $(1)/usr/lib/
+       $(INSTALL_DATA) \
+               $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* \
+               $(1)/usr/lib/pkgconfig/
+endef
+
 define Package/sox/install
        $(INSTALL_DIR) $(1)/usr/bin
        $(INSTALL_DIR) $(1)/usr/lib
        $(CP) $(PKG_INSTALL_DIR)/usr/bin/{play,rec,sox} $(1)/usr/bin/
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/{libsfx.so*,libsox.so*} $(1)/usr/lib/
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsox.so* $(1)/usr/lib/
 endef
 
 $(eval $(call BuildPackage,sox))