VERSION.sh 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. # brand is lower case - used for names that don't appear to end users
  2. # brand is used for file naming - should contain no spaces
  3. brand=389
  4. # capbrand is the properly capitalized brand name that appears to end users
  5. # may contain spaces
  6. capbrand=389
  7. # vendor is the properly formatted vendor/manufacturer name that appears to end users
  8. vendor="389 Project"
  9. # PACKAGE_VERSION is constructed from these
  10. VERSION_MAJOR=1
  11. VERSION_MINOR=3
  12. VERSION_MAINT=3
  13. # if this is a PRERELEASE, set VERSION_PREREL
  14. # otherwise, comment it out
  15. # be sure to include the dot prefix in the prerel
  16. VERSION_PREREL=.a2
  17. # NOTES on VERSION_PREREL
  18. # use aN for an alpha release e.g. a1, a2, etc.
  19. # use rcN for a release candidate e.g. rc1, rc2, etc.
  20. # for extra clarification, the date can be appended to the prerel e.g.
  21. # RC1.`date +%Y%m%d`
  22. # a git commit may also be used
  23. # Set the version and release numbers for local developer RPM builds. We
  24. # set these here because we do not want the git commit hash in the RPM
  25. # version since it can make RPM upgrades difficult. If we have a git
  26. # commit hash, we add it into the release number below.
  27. RPM_RELEASE=`date -u +%Y%m%d%H%M%S`
  28. RPM_VERSION=$VERSION_MAJOR.$VERSION_MINOR.${VERSION_MAINT}$VERSION_PREREL
  29. if test -n "$VERSION_PREREL"; then
  30. # if the source is from a git repo, put the last commit
  31. # in the version
  32. # if this is not a git repo, git log will say
  33. # fatal: Not a git repository
  34. # to stderr and stdout will be empty
  35. # this tells git to print the short commit hash from the last commit
  36. COMMIT=`cd $srcdir ; git log -1 --pretty=format:%h 2> /dev/null`
  37. if test -n "$COMMIT" ; then
  38. VERSION_PREREL=$VERSION_PREREL.git$COMMIT
  39. RPM_RELEASE=$RPM_RELEASE.git$COMMIT
  40. fi
  41. fi
  42. # the real version used throughout configure and make
  43. # NOTE: because of autoconf/automake harshness, we cannot override the settings
  44. # below in C code - there is no way to override the default #defines
  45. # for these set with AC_INIT - so configure.ac should AC_DEFINE
  46. # DS_PACKAGE_VERSION DS_PACKAGE_TARNAME DS_PACKAGE_BUGREPORT
  47. # for use in C code - other code (perl scripts, shell scripts, Makefiles)
  48. # can use PACKAGE_VERSION et. al.
  49. PACKAGE_VERSION=$VERSION_MAJOR.$VERSION_MINOR.${VERSION_MAINT}$VERSION_PREREL
  50. # the name of the source tarball - see make dist
  51. PACKAGE_TARNAME=${brand}-ds-base
  52. # url for bug reports
  53. PACKAGE_BUGREPORT="${PACKAGE_BUGREPORT}enter_bug.cgi?product=$brand"
  54. PACKAGE_STRING="$PACKAGE_TARNAME $PACKAGE_VERSION"
  55. # the version of the ds console package that this directory server
  56. # is compatible with
  57. # console .2 is still compatible with 389 .3 for now
  58. CONSOLE_VERSION=$VERSION_MAJOR.2