summaryrefslogtreecommitdiff
path: root/xibuild
diff options
context:
space:
mode:
authordavidovski <david@davidovski.xyz>2022-05-04 23:53:02 +0100
committerdavidovski <david@davidovski.xyz>2022-05-04 23:53:02 +0100
commit358b3a25343d97edd3d2e74f8ba03e2f5ffcecca (patch)
treebfb1cbf7452fc073748994b42e6511d4328c820b /xibuild
parent2f98aac2c1c1858e4613c5c833c67e1005e5b357 (diff)
fixed postinstall issues
Diffstat (limited to 'xibuild')
-rwxr-xr-xxibuild/build_all.sh12
-rwxr-xr-xxibuild/build_package.sh4
-rw-r--r--xibuild/build_profile8
-rwxr-xr-xxibuild/make_infos.sh14
4 files changed, 25 insertions, 13 deletions
diff --git a/xibuild/build_all.sh b/xibuild/build_all.sh
index a0adbbc..ffa6c03 100755
--- a/xibuild/build_all.sh
+++ b/xibuild/build_all.sh
@@ -24,8 +24,7 @@ run_postinstall () {
#
chmod 755 $file
xichroot "$XIB_CHROOT" "/var/lib/xipkg/postinstall/$f"
- echo $?
- if [ "$?" == "0" ]; then
+ if [ "$?" = "0" ]; then
rm $file
printf "${PASS}${CHECKMARK}"
else
@@ -34,18 +33,23 @@ run_postinstall () {
done
printf ")\n"
- [ "$(ls $postinstall | wc -w)" == 0 ] &&
+ [ "$(ls $postinstall | wc -w)" = 0 ] && \
rmdir $postinstall
fi
}
+extract () {
+ tar -h -p -vvxf $1 -C ${SYSROOT} 2>${LOG_FILE} | grep ^- | tr -s " " | cut -d" " -f6 | cut -c2-
+}
+
+
# build a package by its name
#
build_package () {
local name=$(echo $1 | cut -d"+" -f1)
local install=$(echo $line | grep -q '+' && echo "true" || echo "false")
- local buildfile=$(find $XIB_BUILDFILES -wholename "*/$name.xibuild" | head -1)
+ local buildfile=$(find $XIB_BUILDFILES/repo/ -wholename "*/$name.xibuild" | head -1)
if [ -f "$buildfile" ]; then
printf "${INFO}%s\n${RESET}" $name
diff --git a/xibuild/build_package.sh b/xibuild/build_package.sh
index b430738..fcdf881 100755
--- a/xibuild/build_package.sh
+++ b/xibuild/build_package.sh
@@ -86,7 +86,7 @@ fetch_source () {
http*)
;;
*)
- url="file://${XIB_BUILDFILES}/extra/$NAME/$url"
+ url="file://${XIB_BUILDFILES}/repo/$REPO/$NAME/$url"
;;
esac
@@ -231,7 +231,7 @@ build_pkg () {
printf "${GREEN}${CHECKMARK}\n"
printf "${BLUE}${TABCHAR}clean "
- strip_dest > $log_file 2>&1 || return 1
+ strip_dest >> $log_file 2>&1 || return 1
printf "${GREEN}${CHECKMARK}\n"
printf "${BLUE}${TABCHAR}package "
diff --git a/xibuild/build_profile b/xibuild/build_profile
index 04c2ceb..b1ddb89 100644
--- a/xibuild/build_profile
+++ b/xibuild/build_profile
@@ -1,4 +1,5 @@
export PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin:/tools/sbin
+export LIBRARY_PATH=/lib:/usr/lib/:/tools/lib:/tools/lib64
apply_patches () {
for p in *.patch; do
@@ -14,5 +15,12 @@ export MAKEFLAGS="-j$JOBS"
export XORG_PREFIX="/usr"
export XORG_CONFIG="--prefix=/usr --sysconfdir=/etc --localstatedir=/var --disable-static"
+export BUILD_ROOT="/build/source"
+export RUST_TARGET="x86_64-unknown-linux-musl"
+#command -v clang &&
+# export CC="clang"
+
+#command -v clang++ &&
+# export CXX="clang++"
ldconfig
diff --git a/xibuild/make_infos.sh b/xibuild/make_infos.sh
index d720500..7d76c86 100755
--- a/xibuild/make_infos.sh
+++ b/xibuild/make_infos.sh
@@ -5,7 +5,7 @@
XIPKG_INFO_VERSION='03'
get_info() {
- local name=$(basename -s ".xipkg" $1)
+ local name=$(basename $1 ".xipkg")
local pkg_ver=$PKG_VER
[ -z "$pkg_ver" ] && pkg_ver=$BRANCH
@@ -19,7 +19,7 @@ get_info() {
echo "CHECKSUM=$(md5sum $1 | awk '{ print $1 }')"
echo "VERSION=$pkg_ver"
echo "SOURCE=$SOURCE"
- echo "DATE=$(date -r $1)"
+ echo "DATE=$(stat -t $1 | cut -d' ' -f13 | xargs date -d)"
echo "DEPS=${DEPS}"
echo "MAKE_DEPS=${MAKE_DEPS}"
}
@@ -33,10 +33,10 @@ sign () {
list_line() {
local pkg_file=$1
- local name=$(basename -s ".xipkg" $pkg_file)
+ local name=$(basename $pkg_file ".xipkg" )
local filecount=$(gzip -cd $pkg_file | tar -tvv | grep -c ^-)
local checksum=$(md5sum $pkg_file | awk '{ print $1 }')
- local size=$(stat -c %s $pkg_file)
+ local size=$(stat -t $pkg_file | cut -d" " -f2)
echo $name.xipkg $checksum $size $filecount
}
@@ -44,7 +44,7 @@ list_line() {
list_deps() {
local info_file=$1
local deps=$(grep "^DEPS=" $info_file | sed -rn 's/DEPS=(.*)/\1/p')
- local name=$(basename -s ".xipkg.info" $info_file)
+ local name=$(basename $info_file ".xipkg.info" )
echo "$name: $deps"
}
@@ -66,11 +66,11 @@ hbar -t -T "removing old repos" $i $total
graph_file="$XIB_EXPORT"/repo/deps.graph
[ -f $graph_file ] && rm $graph_file
-list=$(ls "$XIB_EXPORT"/repo/*/*.xipkg)
+list=$(find "$XIB_EXPORT"/repo/ -name "*.xipkg")
total=$(echo $list | wc -w)
i=0
for pkg in $list; do
- name=$(basename -s ".xipkg" $pkg)
+ name=$(basename $pkg ".xipkg")
repo=$(echo $pkg | rev | cut -d/ -f2 | rev)
info_file="$XIB_EXPORT/repo/$repo/$name.xipkg.info"
build_file="$XIB_EXPORT/repo/$repo/$name.xibuild"