2 IPKG_
$(1):=$(PACKAGE_DIR
)/$(2)_
$(3)_
$(4).ipk
3 IDIR_
$(1):=$(PKG_BUILD_DIR
)/ipkg
/$(2)
4 INFO_
$(1):=$(IPKG_STATE_DIR
)/info/$(2).list
6 ifneq ($(BR2_PACKAGE_
$(1)),)
10 compile
: $$(IPKG_
$(1))
12 ifeq ($(BR2_PACKAGE_
$(1)),y
)
13 install: $$(INFO_
$(1))
16 $$(IDIR_
$(1))/CONTROL
/control
: $(PKG_BUILD_DIR
)/.prepared
17 $(SCRIPT_DIR
)/make-ipkg-dir.sh
$$(IDIR_
$(1)) .
/ipkg
/$(2).control
$(3) $(4)
18 for file in conffiles preinst postinst prerm postrm
; do \
19 [ -f .
/ipkg
/$(2).
$$$$file ] && cp .
/ipkg
/$(2).
$$$$file $$(IDIR_
$(1))/CONTROL
/$$$$file || true
; \
22 $$(IPKG_
$(1)): $$(IDIR_
$(1))/CONTROL
/control
$(PKG_BUILD_DIR
)/.built
$(PACKAGE_DIR
)
24 $$(INFO_
$(1)): $$(IPKG_
$(1))
25 $(IPKG
) install $$(IPKG_
$(1))
32 ifneq ($(strip $(PKG_SOURCE
)),)
33 $(DL_DIR
)/$(PKG_SOURCE
):
34 $(SCRIPT_DIR
)/download.pl
"$(DL_DIR)" "$(PKG_SOURCE)" "$(PKG_MD5SUM)" $(PKG_SOURCE_URL
)
37 ifneq ($(strip $(PKG_CAT
)),)
38 $(PKG_BUILD_DIR
)/.prepared
: $(DL_DIR
)/$(PKG_SOURCE
)
39 rm -rf
$(PKG_BUILD_DIR
)
40 mkdir
-p
$(PKG_BUILD_DIR
)
41 $(PKG_CAT
) $(DL_DIR
)/$(PKG_SOURCE
) |
tar -C
$(PKG_BUILD_DIR
)/..
$(TAR_OPTIONS
) -
42 if
[ -d .
/patches
]; then \
43 $(PATCH
) $(PKG_BUILD_DIR
) .
/patches
; \
45 touch
$(PKG_BUILD_DIR
)/.prepared
50 source
: $(DL_DIR
)/$(PKG_SOURCE
)
51 prepare
: $(PKG_BUILD_DIR
)/.prepared
57 if
[ -f
$(PKG_BUILD_DIR
)/.built
]; then \
62 $(PKG_BUILD_DIR
)/.configured
: $(PKG_BUILD_DIR
)/.prepared
63 $(PKG_BUILD_DIR
)/.built
: $(PKG_BUILD_DIR
)/.configured
69 rm -rf
$(PKG_BUILD_DIR
)
71 .PHONY
: all source prepare compile
install clean