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 IDEPEND_
$(1):=$$(strip $(5))
18 $$(IDIR_
$(1))/CONTROL
/control
: $(PKG_BUILD_DIR
)/.prepared
19 $(SCRIPT_DIR
)/make-ipkg-dir.sh
$$(IDIR_
$(1)) .
/ipkg
/$(2).control
$(3) $(4)
20 if
[ "$$(IDEPEND_$(1))" != "" ]; then echo
"Depends: $$(IDEPEND_$(1))" >> $$(IDIR_
$(1))/CONTROL
/control
; fi
21 for file in conffiles preinst postinst prerm postrm
; do \
22 [ -f .
/ipkg
/$(2).
$$$$file ] && cp .
/ipkg
/$(2).
$$$$file $$(IDIR_
$(1))/CONTROL
/$$$$file || true
; \
25 $$(IPKG_
$(1)): $$(IDIR_
$(1))/CONTROL
/control
$(PKG_BUILD_DIR
)/.built
$(PACKAGE_DIR
)
27 $$(INFO_
$(1)): $$(IPKG_
$(1))
28 $(IPKG
) install $$(IPKG_
$(1))
35 ifneq ($(strip $(PKG_SOURCE
)),)
36 $(DL_DIR
)/$(PKG_SOURCE
):
37 $(SCRIPT_DIR
)/download.pl
"$(DL_DIR)" "$(PKG_SOURCE)" "$(PKG_MD5SUM)" $(PKG_SOURCE_URL
)
40 ifneq ($(strip $(PKG_CAT
)),)
41 $(PKG_BUILD_DIR
)/.prepared
: $(DL_DIR
)/$(PKG_SOURCE
)
42 rm -rf
$(PKG_BUILD_DIR
)
43 mkdir
-p
$(PKG_BUILD_DIR
)
44 $(PKG_CAT
) $(DL_DIR
)/$(PKG_SOURCE
) |
tar -C
$(PKG_BUILD_DIR
)/..
$(TAR_OPTIONS
) -
45 if
[ -d .
/patches
]; then \
46 $(PATCH
) $(PKG_BUILD_DIR
) .
/patches
; \
48 touch
$(PKG_BUILD_DIR
)/.prepared
53 source
: $(DL_DIR
)/$(PKG_SOURCE
)
54 prepare
: $(PKG_BUILD_DIR
)/.prepared
60 if
[ -f
$(PKG_BUILD_DIR
)/.built
]; then \
65 $(PKG_BUILD_DIR
)/.configured
: $(PKG_BUILD_DIR
)/.prepared
66 $(PKG_BUILD_DIR
)/.built
: $(PKG_BUILD_DIR
)/.configured
72 rm -rf
$(PKG_BUILD_DIR
)
74 .PHONY
: all source prepare compile
install clean