Changeset 70ec7ab
- Timestamp:
- 2015-05-03T22:43:33Z (10 years ago)
- Branches:
- master
- Children:
- 5ca1416
- Parents:
- 40cfbc5
- git-author:
- dequis <dx@…> (03-05-15 21:03:00)
- git-committer:
- dequis <dx@…> (03-05-15 22:43:33)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
configure
r40cfbc5 r70ec7ab 56 56 GLIB_MIN_VERSION=2.16 57 57 58 echo BitlBee configure59 60 58 # Cygwin and Darwin don't support PIC/PIE 61 59 case "$arch" in … … 65 63 pie=0;; 66 64 esac 65 66 get_version() { 67 REAL_BITLBEE_VERSION=$(grep '^#define BITLBEE_VERSION ' $srcdir/bitlbee.h | sed 's/.*\"\(.*\)\".*/\1/') 68 BITLBEE_VERSION=$REAL_BITLBEE_VERSION 69 70 if [ -d $srcdir/.git ] && type git > /dev/null 2> /dev/null; then 71 timestamp=$(cd $srcdir; git show -s --format=%ci HEAD | sed 's/ .*$//; s/-//g') 72 branch=$(cd $srcdir; git rev-parse --abbrev-ref HEAD) 73 74 search="(.+)-([0-9]+)-(g[0-9a-f]+)" 75 replace="\1+$timestamp+$branch+\2-\3-git" 76 77 BITLBEE_VERSION=$(cd $srcdir; git describe --long --tags | sed -r "s/$search/$replace/") 78 79 unset timestamp branch search replace 80 fi 81 } 82 83 if [ "$1" = "--dump-version" ]; then 84 srcdir=$(cd $(dirname $0);pwd) 85 get_version 86 echo $BITLBEE_VERSION 87 exit 88 fi 89 90 echo BitlBee configure 67 91 68 92 while [ -n "$1" ]; do … … 672 696 fi 673 697 674 REAL_BITLBEE_VERSION=`grep '^#define BITLBEE_VERSION ' $srcdir/bitlbee.h | sed 's/.*\"\(.*\)\".*/\1/'` 675 echo 676 if [ -z "$BITLBEE_VERSION" -a -d .bzr ] && type bzr > /dev/null 2> /dev/null; then 677 nick=`bzr nick` 678 if [ -n "$nick" -a "$nick" != "bitlbee" ]; then 679 nick="-$nick" 680 else 681 nick="" 682 fi 683 rev=`bzr revno` 684 echo 'Using bzr revision #'$rev' as version number' 685 BITLBEE_VERSION=$REAL_BITLBEE_VERSION-bzr$nick-$rev 686 fi 687 688 if [ -z "$BITLBEE_VERSION" -a -d .git ] && type git > /dev/null 2> /dev/null; then 689 rev=`git describe --long --tags`-`git rev-parse --abbrev-ref HEAD` 690 echo 'Using '$rev' as git version number' 691 BITLBEE_VERSION=$rev-git 692 fi 693 694 if [ -n "$BITLBEE_VERSION" ]; then 698 get_version 699 700 if [ "$BITLBEE_VERSION" != "$REAL_BITLBEE_VERSION" ]; then 695 701 echo 'Spoofing version number: '$BITLBEE_VERSION 696 702 echo '#undef BITLBEE_VERSION' >> config.h 697 703 echo '#define BITLBEE_VERSION "'$BITLBEE_VERSION'"' >> config.h 698 704 echo 699 else700 # for pkg-config701 BITLBEE_VERSION=$REAL_BITLBEE_VERSION702 705 fi 703 706
Note: See TracChangeset
for help on using the changeset viewer.