@ -13,6 +13,9 @@ endif
IPKG_BUILD := \
IPKG_BUILD := \
$( SCRIPT_DIR) /ipkg-build -c -o 0 -g 0
$( SCRIPT_DIR) /ipkg-build -c -o 0 -g 0
IPKG_REMOVE := \
$( SCRIPT_DIR) /ipkg-remove
IPKG_STATE_DIR := $( TARGET_DIR) /usr/lib/opkg
IPKG_STATE_DIR := $( TARGET_DIR) /usr/lib/opkg
# 1: package name
# 1: package name
@ -90,8 +93,9 @@ _endef=endef
i f e q ( $( DUMP ) , )
i f e q ( $( DUMP ) , )
define BuildTarget/ipkg
define BuildTarget/ipkg
ABIV_$( 1) := $( call GetABISuffix,$( 1) )
PDIR_$( 1) := $( call FeedPackageDir,$( 1) )
PDIR_$( 1) := $( call FeedPackageDir,$( 1) )
IPKG_$( 1) := $$ ( PDIR_$( 1) ) /$( 1) _$( VERSION) _$( PKGARCH) .ipk
IPKG_$( 1) := $$ ( PDIR_$( 1) ) /$( 1) $$ ( ABIV_$( 1) ) _$( VERSION) _$( PKGARCH) .ipk
IDIR_$( 1) := $( PKG_BUILD_DIR) /ipkg-$( PKGARCH) /$( 1)
IDIR_$( 1) := $( PKG_BUILD_DIR) /ipkg-$( PKGARCH) /$( 1)
KEEP_$( 1) := $( strip $( call Package/$( 1) /conffiles) )
KEEP_$( 1) := $( strip $( call Package/$( 1) /conffiles) )
@ -148,19 +152,20 @@ ifeq ($(DUMP),)
$( call locked,$( CP) $( PKG_BUILD_DIR) /.pkgdir/$( 1) /. $( STAGING_DIR_ROOT) /,root-copy)
$( call locked,$( CP) $( PKG_BUILD_DIR) /.pkgdir/$( 1) /. $( STAGING_DIR_ROOT) /,root-copy)
touch $$ @
touch $$ @
Package/$( 1) /DEPENDS := $$ ( call mergelist,$$ ( filter-out @%,$$ ( IDEPEND_$( 1) ) ) )
Package/$( 1) /DEPENDS := $$ ( call mergelist,$$ ( foreach dep,$$ ( f ilter-out @%,$$ ( IDEPEND_$( 1) ) ) ,$$ ( dep) $$ ( call GetABISuffix,$$ ( dep) ) ) )
ifneq ( $$ ( EXTRA_DEPENDS) ,)
ifneq ( $$ ( EXTRA_DEPENDS) ,)
Package/$( 1) /DEPENDS := $$ ( EXTRA_DEPENDS) $$ ( if $$ ( Package/$( 1) /DEPENDS) ,$$ ( comma) $$ ( Package/$( 1) /DEPENDS) )
Package/$( 1) /DEPENDS := $$ ( EXTRA_DEPENDS) $$ ( if $$ ( Package/$( 1) /DEPENDS) ,$$ ( comma) $$ ( Package/$( 1) /DEPENDS) )
endif
endif
$( _define ) P a c k a g e / $( 1) / C O N T R O L
$( _define ) P a c k a g e / $( 1) / C O N T R O L
Package : $( 1)
Package : $( 1) $$( ABIV_ $ ( 1) )
Version : $( VERSION )
Version : $( VERSION )
$$ ( c a l l a d d f i e l d , D e p e n d s , $$ ( P a c k a g e / $( 1) / D E P E N D S )
$$ ( c a l l a d d f i e l d , D e p e n d s , $$ ( P a c k a g e / $( 1) / D E P E N D S )
) $$ ( c a l l a d d f i e l d , C o n f l i c t s , $$ ( c a l l m e r g e l i s t , $( CONFLICTS ) )
) $$ ( c a l l a d d f i e l d , C o n f l i c t s , $$ ( c a l l m e r g e l i s t , $( CONFLICTS ) )
) $$ ( c a l l a d d f i e l d , P r o v i d e s , $$ ( c a l l m e r g e l i s t , $( PROVIDES ) )
) $$ ( c a l l a d d f i e l d , P r o v i d e s , $$ ( c a l l m e r g e l i s t , $( PROVIDES ) $$ ( i f $$ ( A B I V _ $( 1) ) , $( 1) ) )
) $$ ( c a l l a d d f i e l d , A l t e r n a t i v e s , $$ ( c a l l m e r g e l i s t , $( ALTERNATIVES ) )
) $$ ( c a l l a d d f i e l d , A l t e r n a t i v e s , $$ ( c a l l m e r g e l i s t , $( ALTERNATIVES ) )
) $$ ( c a l l a d d f i e l d , S o u r c e , $( SOURCE )
) $$ ( c a l l a d d f i e l d , S o u r c e , $( SOURCE )
) $$ ( c a l l a d d f i e l d , S o u r c e N a m e , $( 1)
) $$ ( c a l l a d d f i e l d , L i c e n s e , $( LICENSE )
) $$ ( c a l l a d d f i e l d , L i c e n s e , $( LICENSE )
) $$ ( c a l l a d d f i e l d , L i c e n s e F i l e s , $( LICENSE_FILES )
) $$ ( c a l l a d d f i e l d , L i c e n s e F i l e s , $( LICENSE_FILES )
) $$ ( c a l l a d d f i e l d , S e c t i o n , $( SECTION )
) $$ ( c a l l a d d f i e l d , S e c t i o n , $( SECTION )
@ -176,7 +181,7 @@ $(_endef)
$$ ( IPKG_$( 1) ) : export DESCRIPTION = $$ ( Package/$( 1) /description)
$$ ( IPKG_$( 1) ) : export DESCRIPTION = $$ ( Package/$( 1) /description)
$$ ( IPKG_$( 1) ) : export PATH = $$ ( TARGET_PATH_PKG)
$$ ( IPKG_$( 1) ) : export PATH = $$ ( TARGET_PATH_PKG)
$( PKG_INFO_DIR) /$( 1) .provides $$ ( IPKG_$( 1) ) : $( STAMP_BUILT) $( INCLUDE_DIR) /package-ipkg.mk
$( PKG_INFO_DIR) /$( 1) .provides $$ ( IPKG_$( 1) ) : $( STAMP_BUILT) $( INCLUDE_DIR) /package-ipkg.mk
@rm -rf $$ ( IDIR_$( 1) ) $$ ( call opkg_package_files,$( 1) )
@rm -rf $$ ( IDIR_$( 1) ) $$ ( if $$ ( call opkg_package_files,$( 1) *) ,; $$ ( IPKG_REMOVE) $( 1) $$ ( call opkg_package_files,$( 1) *) )
mkdir -p $( PACKAGE_DIR) $$ ( IDIR_$( 1) ) /CONTROL $( PKG_INFO_DIR)
mkdir -p $( PACKAGE_DIR) $$ ( IDIR_$( 1) ) /CONTROL $( PKG_INFO_DIR)
$( call Package/$( 1) /install,$$ ( IDIR_$( 1) ) )
$( call Package/$( 1) /install,$$ ( IDIR_$( 1) ) )
$( if $( Package/$( 1) /install-overlay) ,mkdir -p $( PACKAGE_DIR) $$ ( IDIR_$( 1) ) /rootfs-overlay)
$( if $( Package/$( 1) /install-overlay) ,mkdir -p $( PACKAGE_DIR) $$ ( IDIR_$( 1) ) /rootfs-overlay)
@ -235,7 +240,7 @@ $(_endef)
@[ -f $$ ( IPKG_$( 1) ) ]
@[ -f $$ ( IPKG_$( 1) ) ]
$( 1) -clean:
$( 1) -clean:
$$ ( if $$ ( call opkg_package_files,$( 1) ) ,rm -f $$ ( call opkg_package_files,$( 1) ) )
$$ ( if $$ ( call opkg_package_files,$( 1) *) ,$$ ( IPKG_REMOVE) $( 1) $$ ( call opkg_package_files,$( 1) * ) )
clean: $( 1) -clean
clean: $( 1) -clean