Port siproxd to -ng
[openwrt/svn-archive/archive.git] / net / siproxd / 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$
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=siproxd
12 PKG_VERSION:=0.5.12
13 PKG_RELEASE:=1
14 PKG_MD5SUM:=2fa02bd6f83070593bfc2d383ce614fa
15
16 PKG_SOURCE_URL:=@SF/siproxd
17 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
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/siproxd
26 SECTION:=net
27 CATEGORY:=Network
28 DEPENDS:=+libosip2
29 TITLE:=SIP (Session Initiation Protocol) proxy
30 DESCRIPTION:=A SIP (Session Initiation Protocol) proxy
31 URL:=http://siproxd.sourceforge.net/
32 endef
33
34 define Package/siproxd/conffiles
35 /etc/siproxd.conf
36 endef
37
38 define Build/Configure
39 $(call Build/Configure/Default,--enable-static --enable-shared)
40 endef
41
42 define Build/Compile
43 rm -rf $(PKG_INSTALL_DIR)
44 mkdir -p $(PKG_INSTALL_DIR)
45 $(MAKE) -C $(PKG_BUILD_DIR) \
46 DESTDIR="$(PKG_INSTALL_DIR)" \
47 all install
48 endef
49
50 define Package/siproxd/install
51 install -d -m0755 $(1)/etc
52 $(CP) $(PKG_INSTALL_DIR)/etc/siproxd.conf.example $(1)/etc/siproxd.conf
53 $(CP) $(PKG_INSTALL_DIR)/etc/siproxd_passwd.cfg $(1)/etc/
54 install -d -m0755 $(1)/etc/init.d
55 install -m0755 files/siproxd.init $(1)/etc/init.d/siproxd
56 install -d -m0755 $(1)/usr/sbin
57 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/siproxd $(1)/usr/sbin/
58 endef
59
60 $(eval $(call BuildPackage,siproxd))