| | |
| | | # Following variables could be set by the hook-begin snippet |
| | | VERSION= |
| | | DOWNLOAD_URL= |
| | | LICENSE_FILE= |
| | | |
| | | # Execute hook-begin snippet |
| | | if [[ -f "$CONF" ]] ; then |
| | |
| | | fi |
| | | |
| | | |
| | | # Remove everything that is not in git |
| | | rm -rf * |
| | | git checkout . > /dev/null 2>&1 |
| | | # Remove everything from git (except known patches, files, history, and $CONF) |
| | | [[ -f "$CONF" ]] && grep "^%patch%" "$CONF" | while read TAG PATCH ; do rm -f "patches/$PATCH" ; done |
| | | [[ -f "$CONF" ]] && grep "^%file%" "$CONF" | while read TAG FILE ; do rm -f "files/$FILE" ; done |
| | |
| | | |
| | | |
| | | # Makefile template |
| | | GENERATE_CMD="\$WS_TOOLS/$THIS" |
| | | [[ "$DIRECTORY" != "perl/$DISTRIBUTION" ]] && GENERATE_CMD="$GENERATE_CMD -d $DIRECTORY" |
| | | GENERATE_CMD="$GENERATE_CMD $MODULE" |
| | | ( |
| | | cat $WS_TOP/transforms/copyright-template | sed -e '/^$/,$d' |
| | | cat <<EOF |
| | | |
| | | # |
| | | # This file was automatically generated using the following command: |
| | | # \$WS_TOOLS/$THIS $MODULE |
| | | # $GENERATE_CMD |
| | | # |
| | | |
| | | BUILD_STYLE = makemaker |
| | |
| | | COMPONENT_ARCHIVE_URL=$($GMAKE print-value-COMPONENT_ARCHIVE_URL) |
| | | [[ "$COMPONENT_ARCHIVE_URL" == "$DOWNLOAD_URL" ]] && DOWNLOAD_URL= |
| | | fi |
| | | [[ -n "$DOWNLOAD_URL" ]] && sed -i -e $'s|^COMPONENT_CPAN_AUTHOR.*|COMPONENT_ARCHIVE_URL=\t\t'"$DOWNLOAD_URL"'|' Makefile |
| | | [[ -n "$DOWNLOAD_URL" ]] && sed -i -e $'s|^COMPONENT_CPAN_AUTHOR.*|COMPONENT_ARCHIVE_URL =\t\t\\\\\\\n\t'"$DOWNLOAD_URL"'|' Makefile |
| | | |
| | | # Remove COMPONENT_REVISION if not needed |
| | | COMPONENT_VERSION=$($GMAKE print-value-COMPONENT_VERSION) |
| | |
| | | sed -i -e 's/sha256:TODO/sha256:'"$SHA256"'/g' Makefile |
| | | git add Makefile |
| | | |
| | | # Unpack sources |
| | | # Unpack sources and apply patches |
| | | ! $GMAKE patch > /dev/null 2>&1 && printf "FATAL: 'gmake patch' failed!\n" >&2 && exit 1 |
| | | |
| | | # Refresh patches |
| | | if $GMAKE refresh-patches > /dev/null 2>&1 ; then |
| | | git add patches 2>/dev/null |
| | | else |
| | | printf "ERROR: 'gmake refresh-patches' failed!\n" >&2 |
| | | git checkout patches 2>/dev/null |
| | | fi |
| | | |
| | | # Cleanup after patch refresh |
| | | $GMAKE clobber > /dev/null 2>&1 |
| | | |
| | | # Prepare sources |
| | | ! $GMAKE prep > /dev/null 2>&1 && printf "FATAL: 'gmake prep' failed!\n" >&2 && exit 1 |
| | | SOURCE_DIR=$($GMAKE print-value-SOURCE_DIR) |
| | | COMPONENT_SUBDIR=$($GMAKE print-value-COMPONENT_SUBDIR) |
| | |
| | | LICENSE= |
| | | LICFILE= |
| | | COPYRIGHT= |
| | | for f in LICENSE LICENCE COPYING COPYRIGHT ; do |
| | | for f in $LICENSE_FILE LICENSE LICENCE COPYING COPYRIGHT ; do |
| | | [[ -f "$SOURCE_DIR$COMPONENT_SUBDIR/$f" ]] || continue |
| | | LICFILE="$SOURCE_DIR$COMPONENT_SUBDIR/$f" |
| | | |
| | |
| | | LC_ALL=C sort -u history > history.new |
| | | mv history.new history |
| | | git add history |
| | | |
| | | awk '$2 == "noincorporate" {printf("WARNING: Unincorporated package: %s\n", $1)}' < history >&2 |
| | | fi |
| | | |
| | | |