Changeset ee613ea in freewrt


Ignore:
Timestamp:
Jan 6, 2007, 2:32:51 PM (19 years ago)
Author:
Thorsten Glaser <tg@…>
Children:
4e32a60
Parents:
451aa8b
Message:

implement a means for packages with no distfiles to work
instructions: use a do-extract: target (default: empty),
and set NO_DISTFILES to 1 before including package.mk

git-svn-id: svn://www.freewrt.org/branches/common-adk@1412 afb5a338-a214-0410-bd46-81f09a774fd1

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • mk/buildhlp.mk

    r451aa8b ree613ea  
    55# or at http://www.freewrt.org/license for details.
    66
    7 ifneq (${PKG_SOURCE_URL},)
    8 ifeq (${PKG_SOURCE},)
     7ifneq ($(strip ${PKG_SOURCE_URL}),)
     8ifeq ($(strip ${PKG_SOURCE}),)
    99PKG_SOURCE:=            ${PKG_NAME}-${PKG_VERSION}.tar.gz
    1010endif
    1111endif
    12 ifneq (${PKG_SOURCE},)
     12ifneq ($(strip ${PKG_SOURCE}),)
    1313DISTFILES?=             ${DL_DIR}/${PKG_SOURCE}
    1414endif
     
    1919WRKINST?=               ${WRKDIR}/fake-${ARCH}/root
    2020
    21 ifneq (${PKG_SOURCE_URL},)
     21ifneq ($(strip ${PKG_SOURCE_URL}),)
    2222$(DL_DIR)/$(PKG_SOURCE):
    2323        @$(CMD_TRACE) "downloading... "
     
    3232        @echo "distfiles downloaded in FreeWRT. Sorry." >&2
    3333
    34 ifneq (${DISTFILES}${PKG_SOURCE},)
     34ifneq ($(strip ${DISTFILES})$(strip ${PKG_SOURCE}),)
    3535fetch: ${DISTFILES}
    3636refetch:
     
    4242        rm -rf ${WRKSRC} ${WRKBUILD}
    4343        ${EXTRACT_CMD}
    44 ifneq (${CRLF_WORKAROUND},)
     44ifneq ($(strip ${CRLF_WORKAROUND}),)
    4545        perl -pi -e 's!\r$$!!g' $$(find ${WRKSRC} -type f)
    4646endif
    4747        touch $@
    4848
     49__use_generic_patch_target:=42
     50else
     51ifeq ($(strip ${NO_DISTFILES}),1)
     52${WRKBUILD}/.extract_done:
     53        rm -rf ${WRKSRC} ${WRKBUILD}
     54        mkdir -p ${WRKDIR} ${WRKSRC}
     55        ${MAKE} do-extract
     56        touch $@
     57
     58fetch refetch do-extract:
     59
     60__use_generic_patch_target:=42
     61else
     62ifeq ($(strip ${_IN_PACKAGE}),1)
     63$(warning This package does not use the generic extraction and patch target; it's most likely to fail.)
     64endif
     65endif
     66endif
     67
     68ifeq ($(strip ${__use_generic_patch_target}),42)
    4969${WRKBUILD}/.prepared: ${WRKBUILD}/.extract_done
    5070        [ ! -d ./patches ] || $(PREVENT_PATCH) $(PATCH) $(WRKSRC) ./patches \
     
    5474        [ ! -d ./extra ] || (cd extra; $(PREVENT_PATCH) pax -rw . ${WRKSRC}/)
    5575        touch $@
    56 else
    57 ifeq (${_IN_PACKAGE},1)
    58 $(warning This package does not use the generic extraction and patch target; it's most likely to fail.)
    59 endif
    6076endif
    6177
  • package/base-files/Makefile

    r451aa8b ree613ea  
    1212PKG_RELEASE:=           17
    1313WRKSRC=                 ${WRKDIR}/base-files
    14 
    15 DISTFILES:=
     14NO_DISTFILES:=          1       # should be Yes, but gmake sucks
    1615
    1716include $(TOPDIR)/mk/package.mk
     
    4342endif
    4443
    45 do-configure:
    46         touch ${WRKBUILD}/.prepared
    4744do-install:
    4845        $(CP) ./files/* $(IDIR_BASE_FILES)
Note: See TracChangeset for help on using the changeset viewer.