summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
blob: cd1eb5d950ab1d6aec51a35f9a77b6538cf1e164 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
###########################################################################
# Copyright 2015 - 2018 IoT.bzh
#
# author: Romain Forlot <romain.forlot@iot.bzh>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
###########################################################################

cmake_minimum_required(VERSION 3.5)

include(GNUInstallDirs)

INSTALL(FILES CMakeAfbTemplates.cmake DESTINATION ${CMAKE_ROOT}/Modules)
INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/src/ DESTINATION ${CMAKE_ROOT}/Modules/CMakeAfbTemplates)
REVISION" || -z "$LOCALCONF" ]] && return 0 echo "INFO: using RPM revision schema $RPMREVISION" cat <<EOF >> $LOCALCONF # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # fragment { # generated by $THIS "$RPMREVISION" # EOF case "$RPMREVISION" in prservice*) [[ $RPMREVISION =~ ^prservice(:([^ \t\n]+))?$ ]] && { echo "PRSERV_HOST ?= \"${BASH_REMATCH[2]:-localhost:0}\"" >> $LOCALCONF } || { echo "ERROR ($THIS): invalid address specified for PR Service" return 1 } ;; timestamp) AGL_PR=$(date --utc '+%Y%m%d.%H%M%S') cat <<'EOF' >> $LOCALCONF # to re-generate AGL_PR the same way as aglsetup does, run: # echo "AGL_PR ?= \"$(date --utc '+%Y%m%d.%H%M%S')\"" EOF echo "AGL_PR ?= \"${AGL_PR}\"" >> $LOCALCONF; cat <<'EOF' >> $LOCALCONF PKGR = "${PR}${EXTENDPRAUTO}.${AGL_PR}" PKGV = "${@ '${PV}'.replace('AUTOINC','${AGL_PR}')}" BB_BASEHASH_IGNORE_VARS:append = " PKGR PKGV" EOF ;; value:*) echo "AGL_PR ?= \"${RPMREVISION#value:}\"" >> $LOCALCONF; cat <<'EOF' >> $LOCALCONF PKGR = "${PR}${EXTENDPRAUTO}.${AGL_PR}" PKGV = "${@ '${PV}'.replace('AUTOINC','${AGL_PR}')}" BB_BASEHASH_IGNORE_VARS:append = " PKGR PKGV" EOF ;; none) # do nothing ;; *) echo "ERROR ($THIS): unknown package revision method '$REVISION'" return 1 ;; esac cat <<'EOF' >> $LOCALCONF # # } # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # EOF } 01_setup_pkg_revision