~ubuntu-branches/ubuntu/wily/freerdp/wily-proposed

« back to all changes in this revision

Viewing changes to cmake/AutoVersioning.cmake

  • Committer: Package Import Robot
  • Author(s): Martin Pitt, Jeremy Bicha, Jean-Louis Dupond, Martin Pitt
  • Date: 2012-01-31 10:02:14 UTC
  • mfrom: (1.1.6)
  • Revision ID: package-import@ubuntu.com-20120131100214-jaok3uwvni7sqxth
Tags: 1.0.0-0git1
Upload current Debian packaging git to get this rolling for precise.

[ Jeremy Bicha ]
* New upstream release. Closes: #647498.
* Updated symbols and bumped soname
* debian/control:
  - Added new build dependencies
  - Bump Standards-Version to 3.9.2
* debian/source/format: Set to 3.0 (quilt)
* debian/rules: Turn on strict symbols checking
* debian/watch: Watch github

[ Jean-Louis Dupond ]
* debian/control: Updated homepage
* debian/copyright: Reflect upstream switch to the Apache license

[ Martin Pitt ]
* debian/libfreerdp0.symbols: Fix version number, should
  be 1.0~beta5, not 1.0-beta5.
* debian/control: Add libavcodec-dev build dependency, upstream build system
  checks for that. Thanks Jean-Louis Dupond!

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# - AutoVersioning
 
2
# Gather version from tarball or SCM
 
3
#
 
4
#  This module defines the following variables:
 
5
#     PRODUCT_VERSION    - Version of product
 
6
#
 
7
 
 
8
#=============================================================================
 
9
# Copyright 2011 O.S. Systems Software Ltda.
 
10
# Copyright 2011 Otavio Salvador <otavio@ossystems.com.br>
 
11
#
 
12
# Licensed under the Apache License, Version 2.0 (the "License");
 
13
# you may not use this file except in compliance with the License.
 
14
# You may obtain a copy of the License at
 
15
#
 
16
#     http://www.apache.org/licenses/LICENSE-2.0
 
17
#
 
18
# Unless required by applicable law or agreed to in writing, software
 
19
# distributed under the License is distributed on an "AS IS" BASIS,
 
20
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 
21
# See the License for the specific language governing permissions and
 
22
# limitations under the License.
 
23
#=============================================================================
 
24
 
 
25
if(EXISTS "${CMAKE_SOURCE_DIR}/.version" )
 
26
  file(READ ${CMAKE_SOURCE_DIR}/.version PRODUCT_VERSION)
 
27
 
 
28
  string(STRIP ${PRODUCT_VERSION} PRODUCT_VERSION)
 
29
else()
 
30
  execute_process(COMMAND git describe --match "v[0-9]*" --abbrev=4
 
31
                  OUTPUT_VARIABLE PRODUCT_VERSION
 
32
                  OUTPUT_STRIP_TRAILING_WHITESPACE
 
33
                  ERROR_QUIET)
 
34
 
 
35
  if(PRODUCT_VERSION)
 
36
        string(REGEX REPLACE "^v(.*)" "\\1" PRODUCT_VERSION ${PRODUCT_VERSION})
 
37
  else()
 
38
    # GIT is the default version
 
39
    set(PRODUCT_VERSION GIT)
 
40
  endif()
 
41
 
 
42
  # Check if has not commited changes
 
43
  execute_process(COMMAND git update-index -q --refresh)
 
44
  execute_process(COMMAND git diff-index --name-only HEAD --
 
45
                  OUTPUT_VARIABLE CHANGED_SOURCE
 
46
                  OUTPUT_STRIP_TRAILING_WHITESPACE
 
47
                  ERROR_QUIET)
 
48
 
 
49
  if(CHANGED_SOURCE)
 
50
    set(PRODUCT_VERSION ${PRODUCT_VERSION}-dirty)
 
51
  endif()
 
52
endif()
 
53
 
 
54
message(STATUS "${CMAKE_PROJECT_NAME} ${PRODUCT_VERSION}")