3 # Usage: build_haiku_repository <initScript> <repositoryDir> <repoInfo>
9 echo "$0: Missing parameters!" >&2
19 # the remaining arguments are the packages
21 # this adds the build library dir to LD_LIBRARY_PATH
22 eval "$addBuildCompatibilityLibDir"
24 # create a clean repository directory
25 rm -rf "$repositoryDir"
26 mkdir
"$repositoryDir"
28 packageDir
="$repositoryDir/packages"
31 # Get the canonical names for the packages and copy them to the package
33 for packageFile
in "$@"; do
34 fileName
=`"$package" info -f "%fileName%" "$packageFile"`
35 cp "$packageFile" "$packageDir/$fileName"
38 # build the repository file
39 cp "$repoInfo" "$repositoryDir/repo.info"
40 "$packageRepo" create
"$repositoryDir/repo.info" "$packageDir"/*.hpkg
42 # create the checksum file
43 $sha256 "$repositoryDir/repo" \
44 |
$sedExtendedRegex 's,([^[:space:]]*).*,\1,' > "$repositoryDir/repo.sha256"
45 # The sed part is only necessary for sha256sum, but it doesn't harm for