3 include $(TOPDIR
)/rules.mk
8 PKG_MD5SUM
:= bd9195d086566f56634c0bcbbbcbebea
12 http
://nthill.free.fr
/openwrt
/sources
/$(PKG_NAME
)/
13 PKG_SOURCE
:= $(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
16 PKG_BUILD_DIR
:= $(BUILD_DIR
)/$(PKG_NAME
)-$(PKG_VERSION
)
17 PKG_INSTALL_DIR
:=$(PKG_BUILD_DIR
)/ipkg-install
19 IPKG_HASERL
:=$(PACKAGE_DIR
)/$(PKG_NAME
)_
$(PKG_VERSION
)-$(PKG_RELEASE
)_
$(ARCH
).ipk
20 IDIR_HASERL
:=$(PKG_BUILD_DIR
)/ipkg
/$(PKG_NAME
)
21 INFO_HASERL
:=$(IPKG_STATE_DIR
)/info/$(PKG_NAME
).list
23 $(DL_DIR
)/$(PKG_SOURCE
):
24 $(SCRIPT_DIR
)/download.pl
$(DL_DIR
) $(PKG_SOURCE
) $(PKG_MD5SUM
) $(PKG_SOURCE_URL
)
26 $(PKG_BUILD_DIR
)/.prepared
: $(DL_DIR
)/$(PKG_SOURCE
)
27 rm -rf
$(PKG_BUILD_DIR
)
28 $(PKG_CAT
) $(DL_DIR
)/$(PKG_SOURCE
) |
tar -C
$(BUILD_DIR
) $(TAR_OPTIONS
) -
29 touch
$(PKG_BUILD_DIR
)/.prepared
31 $(PKG_BUILD_DIR
)/.configured
: $(PKG_BUILD_DIR
)/.prepared
32 (cd
$(PKG_BUILD_DIR
); rm -rf config.
{cache
,status
} ; \
33 $(TARGET_CONFIGURE_OPTS
) \
34 CFLAGS
="$(TARGET_CFLAGS) -DMAX_UPLOAD_KB=8192" \
36 --target
=$(GNU_TARGET_NAME
) \
37 --host
=$(GNU_TARGET_NAME
) \
38 --build
=$(GNU_HOST_NAME
) \
44 --datadir=/usr
/share \
45 --includedir=/usr
/include \
46 --infodir=/usr
/share
/info \
48 --libexecdir
=/usr
/lib \
49 --localstatedir
=/var \
50 --mandir=/usr
/share
/man \
53 $(DISABLE_LARGEFILE
) \
56 touch
$(PKG_BUILD_DIR
)/.configured
58 $(PKG_BUILD_DIR
)/.built
: $(PKG_BUILD_DIR
)/.configured
59 $(MAKE
) -C
$(PKG_BUILD_DIR
)
60 touch
$(PKG_BUILD_DIR
)/.built
62 $(PKG_INSTALL_DIR
)/usr
/bin
/haserl
: $(PKG_BUILD_DIR
)/.built
63 mkdir
-p
$(PKG_INSTALL_DIR
)
64 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
65 DESTDIR
="$(PKG_INSTALL_DIR)" \
68 $(IPKG_HASERL
): $(PKG_INSTALL_DIR
)/usr
/bin
/haserl
69 $(SCRIPT_DIR
)/make-ipkg-dir.sh
$(IDIR_HASERL
) .
/ipkg
/$(PKG_NAME
).control
$(PKG_VERSION
)-$(PKG_RELEASE
) $(ARCH
)
70 install -m0755
-d
$(IDIR_HASERL
)/usr
/bin
71 cp
-fpR
$(PKG_INSTALL_DIR
)/usr
/bin
/haserl
$(IDIR_HASERL
)/usr
/bin
/
72 $(RSTRIP
) $(IDIR_HASERL
)
73 $(IPKG_BUILD
) $(IDIR_HASERL
) $(PACKAGE_DIR
)
75 $(INFO_HASERL
): $(IPKG_HASERL
)
76 $(IPKG
) install $(IPKG_HASERL
)
78 source
: $(DL_DIR
)/$(PKG_SOURCE
)
79 prepare
: $(PKG_BUILD_DIR
)/.prepared
80 compile
: $(IPKG_HASERL
)
81 install: $(INFO_HASERL
)
84 rm -rf
$(PKG_BUILD_DIR
)