mirror of
https://github.com/pygos/build.git
synced 2024-11-25 04:20:41 +01:00
Cleanup: move some utility functions to package skeleton
Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
This commit is contained in:
parent
fa4eff263b
commit
a646707dc0
2 changed files with 16 additions and 16 deletions
|
@ -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() {
|
prepare() {
|
||||||
apply_patches
|
apply_patches
|
||||||
}
|
}
|
||||||
|
|
16
util/misc.sh
16
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() {
|
strip_files() {
|
||||||
local f
|
local f
|
||||||
|
|
||||||
|
@ -53,9 +43,3 @@ unfuck_libtool() {
|
||||||
|
|
||||||
sed -i "s#libdir='\$install_libdir'#libdir='$libdir'#g" "$PKGBUILDDIR/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"
|
|
||||||
}
|
|
||||||
|
|
Loading…
Reference in a new issue