sox: moved to github
[packages.git] / libs / gsm / Makefile
1 #
2 # Copyright (C) 2006-2009 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=gsm
11 PKG_VERSION:=1.0.13
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=http://user.cs.tu-berlin.de/~jutta/gsm/
16 PKG_MD5SUM:=c1ba392ce61dc4aff1c29ea4e92f6df4
17
18 PKG_LICENSE:=FREE
19 PKG_LICENSE_FILES:=COPYRIGHT
20
21 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-1.0-pl13
22
23 include $(INCLUDE_DIR)/package.mk
24
25 define Package/gsm/Default
26   TITLE:=GSM transcoding
27   URL:=http://user.cs.tu-berlin.de/~jutta/toast.html
28 endef
29
30 define Package/gsm/description/Default
31  An implementation of the European GSM 06.10 provisional standard
32  for full-rate speech transcoding, prI-ETS 300 036, which uses
33  RPE/LTP (residual pulse excitation/long term prediction) coding
34  at 13 kbit/s.
35 endef
36
37 define Package/libgsm
38 $(call Package/gsm/Default)
39   SECTION:=libs
40   CATEGORY:=Libraries
41   TITLE+= library
42 endef
43
44 define Package/libgsm/description
45 $(call Package/gsm/description/Default)
46  This package contains a shared GSM transcoding library, used by other
47  programs.
48 endef
49
50 define Package/gsm-utils
51 $(call Package/gsm/Default)
52   SECTION:=utils
53   CATEGORY:=Utilities
54   DEPENDS:=+libgsm
55   TITLE+= utilities
56 endef
57
58 define Package/gsm-utils/description
59 $(call Package/gsm/description/Default)
60  This package contains GSM transcoding utilities.
61 endef
62
63 define Build/Configure
64 endef
65
66 TARGET_CFLAGS += $(FPIC)
67
68 define Build/Compile
69         $(MAKE) -C $(PKG_BUILD_DIR) \
70                 $(TARGET_CONFIGURE_OPTS) \
71                 LD="$(TARGET_CC)" \
72                 COPTS="$(TARGET_CFLAGS)" \
73                 INSTALL_ROOT="$(PKG_INSTALL_DIR)" \
74                 all install
75 endef
76
77 define Package/libgsm/install
78         $(INSTALL_DIR) $(1)/usr/lib
79         $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgsm.so.* $(1)/usr/lib/
80 endef
81
82 define Package/gsm-utils/install
83         $(INSTALL_DIR) $(1)/usr/bin
84         $(CP) $(PKG_INSTALL_DIR)/usr/bin/toast $(1)/usr/bin/
85         (cd $(1)/usr/bin; ln -sf toast untoast; ln -sf toast tcat)
86 endef
87
88 define Build/InstallDev
89         $(INSTALL_DIR) $(1)/usr/include/gsm
90         $(CP) $(PKG_INSTALL_DIR)/usr/include/gsm.h $(1)/usr/include/gsm/
91         $(INSTALL_DIR) $(1)/usr/lib
92         $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgsm.{a,so*} $(1)/usr/lib/
93 endef
94
95 $(eval $(call BuildPackage,libgsm))
96 $(eval $(call BuildPackage,gsm-utils))