diff --git a/util/emptypkg.sh b/util/emptypkg.sh index b190b55..25ce6a5 100644 --- a/util/emptypkg.sh +++ b/util/emptypkg.sh @@ -1,3 +1,19 @@ +apply_patches() { + local PATCH + + for PATCH in $SCRIPTDIR/pkg/$PKGNAME/*.patch; do + if [ -f $PATCH ]; then + patch -p1 < $PATCH + fi + done +} + +pkg_scan_dir() { + find -H "$1" -type d -printf "dir \"%p\" 0%m 0 0\\n" | tail -n +2 + find -H "$1" -type l -printf "slink \"%p\" 0%m 0 0 %l\\n" + find -H "$1" -type f -printf "file \"%p\" 0%m 0 0\\n" +} + prepare() { apply_patches } diff --git a/util/misc.sh b/util/misc.sh index 335ef57..9ef510c 100644 --- a/util/misc.sh +++ b/util/misc.sh @@ -1,13 +1,3 @@ -apply_patches() { - local PATCH - - for PATCH in $SCRIPTDIR/pkg/$PKGNAME/*.patch; do - if [ -f $PATCH ]; then - patch -p1 < $PATCH - fi - done -} - strip_files() { local f @@ -53,9 +43,3 @@ unfuck_libtool() { sed -i "s#libdir='\$install_libdir'#libdir='$libdir'#g" "$PKGBUILDDIR/libtool" } - -pkg_scan_dir() { - find -H "$1" -type d -printf "dir \"%p\" 0%m 0 0\\n" | tail -n +2 - find -H "$1" -type l -printf "slink \"%p\" 0%m 0 0 %l\\n" - find -H "$1" -type f -printf "file \"%p\" 0%m 0 0\\n" -}