Build a system Haiku package
* Create rules (build/jam/PackageRules) and a script, build_haiku_package, to build hpkg files. * Move all rule invocations that copy files and created symlinks and directories in the "system" directory from HaikuImage to HaikuPackages, which creates a package "haiku.hpkg". * build_haiku_image: Comment out adding the copyrights info to AboutSystem for the moment.
This commit is contained in:
@@ -331,16 +331,18 @@ fi # ! updateOnly
|
||||
|
||||
|
||||
# add the concatenated copyrights as an attribute to AboutSystem
|
||||
# TODO: That might not be necessary, when all third-party software everything
|
||||
# is packaged. Though we might not package everything.
|
||||
|
||||
if [ ! $updateOnly ]; then
|
||||
if [ -f $copyrightsFile ]; then
|
||||
copyrightAttrs=$tmpDir/copyrightAttrs
|
||||
$rmAttrs -f $copyrightAttrs
|
||||
touch $copyrightAttrs
|
||||
$addattr -f $copyrightsFile COPYRIGHTS $copyrightAttrs
|
||||
$copyAttrs ${sPrefix}$copyrightAttrs ${tPrefix}system/apps/AboutSystem
|
||||
fi
|
||||
fi
|
||||
# if [ ! $updateOnly ]; then
|
||||
# if [ -f $copyrightsFile ]; then
|
||||
# copyrightAttrs=$tmpDir/copyrightAttrs
|
||||
# $rmAttrs -f $copyrightAttrs
|
||||
# touch $copyrightAttrs
|
||||
# $addattr -f $copyrightsFile COPYRIGHTS $copyrightAttrs
|
||||
# $copyAttrs ${sPrefix}$copyrightAttrs ${tPrefix}system/apps/AboutSystem
|
||||
# fi
|
||||
# fi
|
||||
|
||||
if [ $isCD ]; then
|
||||
# generate the attribute stores
|
||||
|
||||
Executable
+66
@@ -0,0 +1,66 @@
|
||||
#!/bin/sh
|
||||
set -o errexit
|
||||
|
||||
# The first argument is the shell script that initializes the variables:
|
||||
# sourceDir
|
||||
# outputDir
|
||||
# tmpDir
|
||||
# addBuildCompatibilityLibDir
|
||||
#
|
||||
# addattr
|
||||
# copyattr
|
||||
# package
|
||||
# rc
|
||||
# rmAttrs
|
||||
# unzip
|
||||
#
|
||||
|
||||
if [ $# -le 1 ]; then
|
||||
echo "$0: Missing parameters!" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
packagePath="$1"
|
||||
packageInfoPath="$2"
|
||||
shift 2
|
||||
echo "Building package $1 with info $2..."
|
||||
|
||||
if [ $# -gt 0 ]; then
|
||||
. $1
|
||||
shift
|
||||
fi
|
||||
|
||||
# this adds the build library dir to LD_LIBRARY_PATH
|
||||
eval "$addBuildCompatibilityLibDir"
|
||||
|
||||
|
||||
# make a clean contents dir
|
||||
contentsDir="$tmpDir/contents"
|
||||
$rmAttrs -rf "$contentsDir"
|
||||
mkdir -p "$contentsDir"
|
||||
|
||||
|
||||
# map the shell commands
|
||||
sPrefix=
|
||||
tPrefix="$contentsDir/"
|
||||
cd=cd
|
||||
scd=:
|
||||
cp="$copyattr -d"
|
||||
copyAttrs="$copyattr"
|
||||
ln=ln
|
||||
mkdir=mkdir
|
||||
rm=$rmAttrs
|
||||
mkindex=mkindex
|
||||
|
||||
|
||||
# execute the scripts preparing the package contents
|
||||
while [ $# -gt 0 ]; do
|
||||
. $1
|
||||
shift
|
||||
done
|
||||
|
||||
|
||||
# create the package
|
||||
cp "$packageInfoPath" "$contentsDir/.PackageInfo"
|
||||
rm -f "$packagePath"
|
||||
$package create -C "$contentsDir" "$packagePath"
|
||||
Reference in New Issue
Block a user