add some ioctl stuff from wrt54gs.2.06 source
[openwrt.git] / openwrt / package / haserl / ipkg / rules
1 #!/usr/bin/make -f
2
3 ifneq ($(strip ${IPKG_RULES_INC}),)
4 include $(IPKG_RULES_INC)
5 endif
6
7 ##
8
9 PKG_VERSION := $(shell cat ./ipkg/version)
10 CURRENT_DIR := $(shell pwd)
11 INSTALL_DIR ?= $(CURRENT_DIR)/ipkg-install
12
13 unexport INSTALL_DIR
14
15 I_HASERL := ipkg/haserl
16
17 BUILD_DEPS := \
18
19 CONFIGURE_OPTS = \
20 --enable-variable-prefix="" \
21
22 ##
23
24 all: package
25
26
27 .stamp-configured: $(BUILD_DEPS)
28
29 rm -rf config.cache
30 $(TARGET_CONFIGURE_OPTS) \
31 CFLAGS="$(TARGET_CFLAGS) -DMAX_UPLOAD_KB=8192" \
32 ./configure \
33 --target=$(GNU_TARGET_NAME) \
34 --host=$(GNU_TARGET_NAME) \
35 --build=$(GNU_HOST_NAME) \
36 --program-prefix="" \
37 --program-suffix="" \
38 --prefix=/usr \
39 --exec-prefix=/usr \
40 --bindir=/usr/bin \
41 --datadir=/usr/share \
42 --includedir=/usr/include \
43 --infodir=/usr/share/info \
44 --libdir=/usr/lib \
45 --libexecdir=/usr/lib \
46 --localstatedir=/var \
47 --mandir=/usr/share/man \
48 --sbindir=/usr/sbin \
49 --sysconfdir=/etc \
50 $(DISABLE_LARGEFILE) \
51 $(DISABLE_NLS) \
52 $(CONFIGURE_OPTS) \
53
54 touch .stamp-configured
55
56
57 .stamp-built: .stamp-configured
58
59 $(MAKE) \
60 $(TARGET_CONFIGURE_OPTS) \
61
62 touch .stamp-built
63
64
65 $(INSTALL_DIR)/usr/bin/haserl: .stamp-built
66
67 mkdir -p $(INSTALL_DIR)
68
69 $(MAKE) \
70 DESTDIR="$(INSTALL_DIR)" \
71 install
72
73
74 configure: .stamp-configured
75
76
77 build: .stamp-built
78
79
80 install: $(INSTALL_DIR)/usr/bin/haserl
81
82
83 package: $(INSTALL_DIR)/usr/bin/haserl
84
85 mkdir -p $(I_HASERL)/usr/bin
86 cp -af $(INSTALL_DIR)/usr/bin/haserl $(I_HASERL)/usr/bin/
87 $(STRIP) $(I_HASERL)/usr/bin/*
88
89 chmod 0755 ipkg/*/CONTROL/
90 chmod 0644 ipkg/*/CONTROL/control
91
92 perl -pi -e "s/^Arch.*:.*/Architecture: $(ARCH)/g" ipkg/*/CONTROL/control
93 ifneq ($(strip $(PKG_VERSION)),)
94 perl -pi -e "s/^Vers.*:.*/Version: $(PKG_VERSION)/g" ipkg/*/CONTROL/control
95 endif
96
97 $(IPKG_BUILD) $(I_HASERL) $(IPKG_TARGET_DIR)
98
99
100 clean:
101
102 -$(MAKE) \
103 DESTDIR="$(INSTALL_DIR)" \
104 uninstall clean
105
106 rm -rf \
107 .stamp-* \
108 $(I_HASERL)/usr
109
110
111 control:
112
113 @cat $(I_HASERL)/CONTROL/control
114 @echo
115
116
117 .PHONY: configure build install package clean control
This page took 0.039871 seconds and 5 git commands to generate.