fix various makefile errors (#1236)
[openwrt/svn-archive/archive.git] / libs / zaptel / Makefile
1 #
2 # Copyright (C) 2006 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 # $Id: Makefile 5624 2006-11-23 00:29:07Z nbd $
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=zaptel
12 PKG_VERSION:=1.2.12
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=http://ftp.digium.com/pub/zaptel/releases/ ftp://ftp.digium.com/pub/zaptel/releases/
17 PKG_MD5SUM:=99b9f86556b903a32607b2751f920513
18 PKG_CAT:=zcat
19
20 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
21 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
22
23 include $(INCLUDE_DIR)/package.mk
24
25 define Package/zaptel/Default
26 SECTION:=libs
27 CATEGORY:=Libraries
28 URL:=http://ftp.digium.com/pub/zaptel/releases
29 endef
30
31 define Package/zaptel-libtonezone
32 $(call Package/zaptel/Default)
33 SECTION:=libs
34 CATEGORY:=Libraries
35 TITLE:=Zaptel tonezone library.
36 endef
37
38 define Build/Configure
39 endef
40
41 define Build/Compile
42 $(MAKE) -C $(PKG_BUILD_DIR) \
43 $(TARGET_CONFIGURE_OPTS) \
44 HOSTCC="$(HOSTCC)" \
45 CFLAGS="$(TARGET_CFLAGS) -I. -DBUILDING_TONEZONE" \
46 KSRC="$(LINUX_DIR)" \
47 DESTDIR="$(PKG_INSTALL_DIR)" \
48 install-tonezone
49 endef
50
51 define Build/InstallDev
52 mkdir -p $(STAGING_DIR)/usr/include/linux
53 $(CP) $(PKG_INSTALL_DIR)/usr/include/linux/zaptel.h $(STAGING_DIR)/usr/include/linux/
54 $(CP) $(PKG_INSTALL_DIR)/usr/include/tonezone.h $(STAGING_DIR)/usr/include/
55 mkdir -p $(STAGING_DIR)/usr/lib
56 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libtonezone.so* $(STAGING_DIR)/usr/lib/
57 endef
58
59 define Build/UninstallDev
60 rm -rf $(STAGING_DIR)/usr/include/linux/zaptel.h
61 rm -rf $(STAGING_DIR)/usr/include/tonezone.h
62 rm -rf $(STAGING_DIR)/usr/lib/libtonezone.so*
63 endef
64
65 define Package/zaptel-libtonezone/install
66 $(INSTALL_DIR) $(1)/usr/lib
67 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libtonezone.so.* $(1)/usr/lib/
68 endef
69
70 $(eval $(call BuildPackage,zaptel-libtonezone))