e4996e5caecced60e668deab27d02e4768420e82
[openwrt/svn-archive/archive.git] / net / restund / Makefile
1 #
2 # Makefile
3 #
4 # Copyright (C) 2010 Alfred E. Heggestad
5 #
6
7 include $(TOPDIR)/rules.mk
8
9 PKG_NAME:=restund
10 PKG_VERSION:=0.1.0
11 PKG_RELEASE:=1
12
13 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
14 PKG_SOURCE_URL:=http://www.creytiv.com/pub/
15 #PKG_MD5SUM:=ee345fe605ffcfce843dae4aed81122b
16
17 include $(INCLUDE_DIR)/package.mk
18
19 define Package/restund
20 SECTION:=net
21 CATEGORY:=Network
22 DEPENDS:=+libre
23 TITLE:=libre stun server
24 URL:=http://www.creytiv.com/
25 endef
26
27 #PKG_MAKE_OPTS += USE_MYSQL=
28
29 define Build/Compile
30 $(MAKE) -C $(PKG_BUILD_DIR) \
31 LIBRE_MK=../re-$(PKG_VERSION)/mk/re.mk \
32 LIBRE_INC=../re-$(PKG_VERSION)/include \
33 CC="$(TARGET_CC)" \
34 EXTRA_CFLAGS="$(TARGET_CFLAGS)" \
35 DESTDIR="$(PKG_INSTALL_DIR)" \
36 $(PKG_MAKE_OPTS) \
37 SYSROOT="$(TOOLCHAIN_DIR)" \
38 SYSROOT_ALT="$(STAGING_DIR)/usr" \
39 RELEASE=1 \
40 all install
41 endef
42
43 define Package/restund/install
44 $(INSTALL_DIR) $(1)/usr/sbin
45 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/restund $(1)/usr/sbin/
46 $(INSTALL_DIR) $(1)/usr/lib/$(PKG_NAME)/modules
47 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/$(PKG_NAME)/modules/*.so $(1)/usr/lib/$(PKG_NAME)/modules/.
48 $(INSTALL_DIR) $(1)/etc
49 $(INSTALL_CONF) $(PKG_BUILD_DIR)/etc/restund.conf $(1)/etc/
50 $(INSTALL_DIR) $(1)/etc/init.d
51 $(INSTALL_BIN) ./files/restund.init $(1)/etc/init.d/restund
52 endef
53
54 $(eval $(call BuildPackage,restund))