Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
textproc/libkolabxml: Update to 1.2.1
Upstream doesn't seem to put out pre-made releases anymore and the distfiles are gone for the previous version as it is, so we're rolling our own now from the official git repository. Add script and 'create-distfile' target to make future updates easier. Update WWW and LICENSE
- Loading branch information
Showing
3 changed files
with
64 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
TIMESTAMP = 1473183297 | ||
SHA256 (libkolabxml-1.1.6.tar.gz) = e48d7f5de1860a381da27981f6c70de1c9f38c4cd536bc6558b6529ce95f0677 | ||
SIZE (libkolabxml-1.1.6.tar.gz) = 128843 | ||
TIMESTAMP = 1695429252 | ||
SHA256 (libkolabxml/libkolabxml-1.2.1.tar.xz) = b3f0fd0aeb4977d36b273a087c502bfa9c52f262e3b2e3e31f17ae5d43832f51 | ||
SIZE (libkolabxml/libkolabxml-1.2.1.tar.xz) = 105900 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
#!/bin/sh | ||
|
||
# Creates and updates a git checkout in ${BASE_DIRECTORY} for libkolabxml. | ||
# After that, a new distfile for the ports tree is created. | ||
|
||
PROJECT=libkolabxml | ||
BASE_DIRECTORY="$1" | ||
VERSION="$2" | ||
|
||
# Remote libkolabxml git repository | ||
REPO="https://git.kolab.org/diffusion/LKX/${PROJECT}.git" | ||
# Local checkout | ||
CHECKOUT="${BASE_DIRECTORY}/${PROJECT}" | ||
# Use the default branch | ||
BRANCH=master | ||
|
||
# Make sure we can use ${BASE_DIRECTORY} | ||
if [ ! -d "${BASE_DIRECTORY}" ] || [ ! -w "${BASE_DIRECTORY}" ] ; then | ||
echo "Directory '${BASE_DIRECTORY}' does not exist" | ||
exit 1 | ||
fi | ||
|
||
# Init a new git checkout if it is missing | ||
if [ ! -d "${CHECKOUT}" ] ; then | ||
git -C "${BASE_DIRECTORY}" clone "${REPO}" | ||
fi | ||
|
||
# Update the checkout of the required branch | ||
git -C "${CHECKOUT}" checkout "${BRANCH}" && \ | ||
git -C "${CHECKOUT}" pull --ff-only --rebase --autostash && \ | ||
git -C "${CHECKOUT}" fetch --tags | ||
if [ $? -ne 0 ] ; then | ||
echo "Failed to update ${CHECKOUT}" | ||
exit 1 | ||
fi | ||
|
||
# Set up information for the distfile | ||
DISTNAME="${PROJECT}-${VERSION}" | ||
DISTFILE="${BASE_DIRECTORY}/${DISTNAME}.tar.xz" | ||
|
||
# Tar and compress distfile | ||
git -C ${CHECKOUT} archive --format=tar --prefix="${DISTNAME}/" "${DISTNAME}" | xz > "${DISTFILE}" | ||
if [ $? -ne 0 ] ; then | ||
echo "Failed to create tarball ${DISTFILE}" | ||
exit 1 | ||
fi | ||
|
||
# Print out distfile information | ||
echo -e "Distfile:\t${DISTFILE}" |