#!/bin/sh PROG=${1-UNKNOWN} ConfStr="$PROG" ConfStr="$ConfStr 4.2.8p15" case "$CSET" in '') ;; *) ConfStr="$ConfStr@$CSET" ;; esac case "o" in '') ;; *) ConfStr="${ConfStr}-o" ;; esac if [ -n "$MKREPRO_TIMESTAMP" ]; then SOURCE_DATE_EPOCH=$MKREPRO_TIMESTAMP fi if [ -n "$SOURCE_DATE_EPOCH" ]; then ConfStr="$ConfStr `LC_TIME=C TZ=UTC date -d@$SOURCE_DATE_EPOCH 2>/dev/null`" || ConfStr="$ConfStr `LC_TIME=C TZ=UTC date -r $SOURCE_DATE_EPOCH`" else ConfStr="$ConfStr `LC_TIME=C TZ=UTC date`" fi if [ -n "$MKREPRO_TIMESTAMP" ]; then RUN=1 else if [ ! -f .version ]; then echo 0 > .version fi RUN="`cat .version`" RUN="`expr $RUN + 1`" echo $RUN > .version fi ConfStr="$ConfStr (${RUN})" echo "Version <${ConfStr}>"; rm -f version.c cat > version.c << -EoF- /* * version file for $PROG */ #include <config.h> const char * Version = "${ConfStr}"; -EoF- |