summaryrefslogtreecommitdiffhomepage
path: root/contrib/package/xrelayd/Makefile
blob: 01a0244dea5d73099882478dbdfa58dabfd0c081 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
include $(TOPDIR)/rules.mk

PKG_NAME:=xrelayd
PKG_VERSION:=0.2.1pre2
PKG_RELEASE:=1

PKG_SOURCE_URL:=http://znerol.ch/files
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_MD5SUM:=05f242295fa864bb3b0b7f0712b4dfa3

PKG_CAT:=zcat
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install

PKG_BUILD_DEPENDS:=libxyssl

include $(INCLUDE_DIR)/package.mk

define Package/xrelayd
  SECTION:=net
  CATEGORY:=Network
  DEPENDS:=@BROKEN +libxyssl
  TITLE:=stunnel replacement based on xyssl
  URL:=http://znerol.ch/
endef

define Package/xrelayd/description
  stunnel replacement based on xyssl
endef

define Build/Configure
endef

define Build/Compile
	rm -rf $(PKG_INSTALL_DIR)
	mkdir -p $(PKG_INSTALL_DIR)
	$(MAKE) -C $(PKG_BUILD_DIR) \
		$(TARGET_CONFIGURE_OPTS) \
		CC="$(TARGET_CC)" \
		LD="$(TARGET_CC)" \
		CFLAGS="$(strip $(TARGET_CFLAGS))" \
		CPPFLAGS="$$$$CPPFLAGS -I$(STAGING_DIR)/usr/include" \
		LDFLAGS="-L$(STAGING_DIR)/usr/lib" \
		prefix="$(PKG_INSTALL_DIR)/usr"
	mkdir -p $(PKG_INSTALL_DIR)/usr/bin
	$(CP) $(PKG_BUILD_DIR)/xrelayd $(PKG_INSTALL_DIR)/usr/bin 
endef

define Package/xrelayd/install
	$(INSTALL_DIR) $(1)/usr/bin
	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/xrelayd $(1)/usr/bin
	$(RSTRIP) $(1)/usr/bin/xrelayd
endef

#mostlyclean:
#	make -C $(PKG_BUILD_DIR) clean
#	rm $(PKG_BUILD_DIR)/.built

$(eval $(call BuildPackage,xrelayd))