summaryrefslogtreecommitdiff
path: root/openwrt/package/ez-ipupdate/rules
blob: f56d2b27616c8b7a98cef21e1facc410ceee0e35 (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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
#!/usr/bin/make -f

ifeq ($(strip ${IPKG_DIR}),)
	IPKG_DIR := $(shell pwd)/../..
endif

include $(IPKG_DIR)/Makefile.inc

##

EZ_IPUPDATE_DIR := ipkg/ez-ipupdate

BUILD_DEPS := \

##

all: package

build: .stamp-built

install: .stamp-installed

clean:

	$(MAKE) clean
	rm -rf .stamp-*
	rm -rf $(EZ_IPUPDATE_DIR)/etc/ez-ipupdate
	rm -rf $(EZ_IPUPDATE_DIR)/usr


control:

	@cat $(EZ_IPUPDATE_DIR)/CONTROL/control
	@echo
	

binary package: .stamp-installed

	@cat $(EZ_IPUPDATE_DIR)/CONTROL/control
	$(IPKG_BUILD) $(EZ_IPUPDATE_DIR) $(IPKG_TARGET_DIR)


.stamp-built: $(BUILD_DEPS)

	rm -rf config.cache
	$(TARGET_CONFIGURE_OPTS) \
	CFLAGS="$(TARGET_CFLAGS)" \
	./configure \
	  --target=$(GNU_TARGET_NAME) \
	  --host=$(GNU_TARGET_NAME) \
	  --build=$(GNU_HOST_NAME) \
	  --prefix=/usr \
	  --exec-prefix=/usr \
	  --bindir=/usr/bin \
	  --datadir=/usr/share \
	  --includedir=/usr/include \
	  --infodir=/usr/share/info \
	  --libdir=/usr/lib \
	  --libexecdir=/usr/lib/locate \
	  --localstatedir=/var/lib \
	  --mandir=/usr/share/man \
	  --sbindir=/usr/sbin \
	  --sysconfdir=/etc \
	  $(DISABLE_NLS) \

	$(MAKE) \
	  $(TARGET_CONFIGURE_OPTS) \

	touch .stamp-built


.stamp-installed: .stamp-built

	mkdir -p $(EZ_IPUPDATE_DIR)

	$(MAKE) \
	  DESTDIR="$(shell pwd)/$(EZ_IPUPDATE_DIR)" \
	 install
	 
	mkdir -p $(EZ_IPUPDATE_DIR)/etc/ez-ipupdate
	cp -a example-dyndns.conf $(EZ_IPUPDATE_DIR)/etc/ez-ipupdate/
	
	$(STRIP) $(EZ_IPUPDATE_DIR)/usr/bin/*

	chmod 0755 $(EZ_IPUPDATE_DIR)/CONTROL
	chmod 0644 $(EZ_IPUPDATE_DIR)/CONTROL/control
	chmod 0755 $(EZ_IPUPDATE_DIR)/etc
	chmod 0700 $(EZ_IPUPDATE_DIR)/etc/ez-ipupdate
	chmod 0600 $(EZ_IPUPDATE_DIR)/etc/ez-ipupdate/*
	chmod 0755 $(EZ_IPUPDATE_DIR)/usr
	chmod 0755 $(EZ_IPUPDATE_DIR)/usr/bin
	chmod 0755 $(EZ_IPUPDATE_DIR)/usr/bin/ez-ipupdate

	touch .stamp-installed


.PHONY: build install clean control binary package