summaryrefslogtreecommitdiff
path: root/mk/package.mk
diff options
context:
space:
mode:
authorLinux User <wbx@linux.(none)>2009-10-01 20:26:05 +0200
committerLinux User <wbx@linux.(none)>2009-10-01 20:26:05 +0200
commit8759fa511c0464efaea926dcb1271c0ca95e4eb6 (patch)
tree525fc96ed62d206153794068a2f43116a095dbbe /mk/package.mk
parent22bb527c786d6631eec13f2328da05437a1e46b5 (diff)
abstract package backend, add perl
Diffstat (limited to 'mk/package.mk')
-rw-r--r--mk/package.mk23
1 files changed, 8 insertions, 15 deletions
diff --git a/mk/package.mk b/mk/package.mk
index 64884e4b4..f1a044683 100644
--- a/mk/package.mk
+++ b/mk/package.mk
@@ -1,7 +1,7 @@
# This file is part of the OpenADK project. OpenADK is copyrighted
# material, please see the LICENCE file in the top-level directory.
-all: build-all-ipkgs
+all: build-all-pkgs
ifeq ($(ADK_STATIC),y)
TCFLAGS:= ${TARGET_CFLAGS} -static
@@ -119,7 +119,7 @@ build: ${_BUILD_COOKIE}
fake: ${_FAKE_COOKIE}
# our recursive build entry point
-build-all-ipkgs: ${_IPKGS_COOKIE}
+build-all-pkgs: ${_IPKGS_COOKIE}
# there are some parameters to the PKG_template function
# 1.) Config.in identifier ADK_PACKAGE_$(1)
@@ -136,13 +136,13 @@ build-all-ipkgs: ${_IPKGS_COOKIE}
# cleaning (needed for toolchain packages like glibc/eglibc)
# should be package format independent and modular in the future
define PKG_template
-IPKG_$(1)= $(PACKAGE_DIR)/$(2)_$(3)_${CPU_ARCH}.ipk
-IDIR_$(1)= $(WRKDIR)/fake-${CPU_ARCH}/ipkg-$(2)
+IPKG_$(1)= $(PACKAGE_DIR)/$(2)_$(3)_${CPU_ARCH}.${PKG_SUFFIX}
+IDIR_$(1)= $(WRKDIR)/fake-${CPU_ARCH}/pkg-$(2)
ifneq (${ADK_PACKAGE_$(1)}${DEVELOPER},)
ALL_IPKGS+= $$(IPKG_$(1))
ALL_IDIRS+= $${IDIR_$(1)}
endif
-INFO_$(1)= $(IPKG_STATE_DIR)/info/$(2).list
+INFO_$(1)= $(PKG_STATE_DIR)/info/$(2).list
ifeq ($(ADK_PACKAGE_$(1)),y)
install-targets: $$(INFO_$(1))
@@ -156,7 +156,6 @@ $$(IDIR_$(1))/CONTROL/control: ${_PATCH_COOKIE}
@echo "Package: $(2)" > $(WRKDIR)/.$(2).control
@echo "Section: $(6)" >> $(WRKDIR)/.$(2).control
@echo "Description: $(5)" >> $(WRKDIR)/.$(2).control
-ifeq ($(ADK_TARGET_PACKAGE_IPKG),y)
${BASH} ${SCRIPT_DIR}/make-ipkg-dir.sh $${IDIR_$(1)} $${ICONTROL_$(1)} $(3) ${CPU_ARCH}
@adeps='$$(strip $${IDEPEND_$(1)})'; if [[ -n $$$$adeps ]]; then \
comma=; \
@@ -176,7 +175,6 @@ ifeq ($(ADK_TARGET_PACKAGE_IPKG),y)
@for file in conffiles preinst postinst prerm postrm; do \
[ ! -f ./files/$(2).$$$$file ] || cp ./files/$(2).$$$$file $$(IDIR_$(1))/CONTROL/$$$$file; \
done
-endif
$$(IPKG_$(1)): $$(IDIR_$(1))/CONTROL/control $${_FAKE_COOKIE}
ifeq ($(ADK_DEBUG),)
@@ -234,12 +232,7 @@ ifeq (,$(filter noscripts,$(7)))
>>'$${STAGING_PARENT}/pkg/$(1)'; \
done
endif
-ifeq ($(ADK_TARGET_PACKAGE_IPKG),y)
- $${IPKG_BUILD} $${IDIR_$(1)} $${PACKAGE_DIR} $(MAKE_TRACE)
-endif
-ifeq ($(ADK_TARGET_PACKAGE_TGZ),y)
- (cd $${IDIR_$(1)} && tar czf $(PACKAGE_DIR)/$(2)_$(3)_${CPU_ARCH}.tar.gz .);
-endif
+ $${PKG_BUILD} $${IDIR_$(1)} $${PACKAGE_DIR} $(MAKE_TRACE)
clean-targets: clean-dev-$(1)
@@ -255,7 +248,7 @@ endif
@rm -f '$${STAGING_PARENT}/pkg/$(1)'
$$(INFO_$(1)): $$(IPKG_$(1))
- $(IPKG) install $$(IPKG_$(1))
+ $(PKG_INSTALL) $$(IPKG_$(1))
endef
install-targets:
@@ -273,4 +266,4 @@ distclean: clean
rm -f ${FULLDISTFILES}
.PHONY: all refetch extract patch configure \
- build fake package install clean build-all-ipkgs
+ build fake package install clean build-all-pkgs