Skip to content

Commit

Permalink
textproc/libkolabxml: Update to 1.2.1
Browse files Browse the repository at this point in the history
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
BSDKaffee committed Sep 23, 2023
1 parent f16b003 commit 04cfaff
Show file tree
Hide file tree
Showing 3 changed files with 64 additions and 9 deletions.
18 changes: 12 additions & 6 deletions textproc/libkolabxml/Makefile
@@ -1,17 +1,17 @@
PORTNAME= libkolabxml
PORTVERSION= 1.1.6
PORTREVISION= 16
DISTVERSION= 1.2.1
CATEGORIES= textproc
MASTER_SITES= http://mirror.kolabsys.com/pub/releases/
MASTER_SITES= LOCAL/kde/${PORTNAME}
DIST_SUBDIR= ${PORTNAME}

MAINTAINER= kde@FreeBSD.org
COMMENT= Kolab XML Format Schema Definitions Library
WWW= http://www.kolab.org/about/libkolabxml
WWW= https://kolab.org/

# The XSD schemas in schemas/ are APACHE20-licensed, and some files
# are in public domain. The library itself and the installed headers
# are considered LGPL3-licensed, though.
LICENSE= LGPL3
LICENSE= LGPL3+

BUILD_DEPENDS= xsdcxx:devel/xsd
LIB_DEPENDS= libboost_system.so:devel/boost-libs \
Expand All @@ -26,10 +26,16 @@ CMAKE_OFF= BUILD_TESTS \
JAVA_BINDINGS \
PHP_BINDINGS \
PYTHON_BINDINGS
USES= cmake
USES= cmake tar:xz
USE_CXXSTD= c++11
USE_LDCONFIG= yes

PLIST_SUB= SHLIB_VER=${PORTVERSION}

create-distfile:
${MKDIR} ${DISTDIR}/${DIST_SUBDIR}
${SH} ${FILESDIR}/create_libkolabxml_release.sh \
${DISTDIR}/${DIST_SUBDIR} \
${DISTVERSION}

.include <bsd.port.mk>
6 changes: 3 additions & 3 deletions textproc/libkolabxml/distinfo
@@ -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
49 changes: 49 additions & 0 deletions textproc/libkolabxml/files/create_libkolabxml_release.sh
@@ -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}"

0 comments on commit 04cfaff

Please sign in to comment.