Skip to content
Snippets Groups Projects
Select Git revision
  • 83c5abce6a3629e39c92a0a65742eca12755d66c
  • master default protected
  • release/beta-qt-202301101210
  • stable
  • release/beta-qt-202211182015
  • release/beta-qt-202211181752
  • release/beta-qt-202211171508
  • release/beta-qt-202211081754
  • release/beta-qt-202211071518
  • release/beta-qt-202210270957
  • release/beta-qt-202210071648
  • release/beta-qt-202209291549
  • release/beta-qt-202209011129
  • release/beta-qt-202208261640
  • release/beta-qt-202208241511
  • release/beta-qt-202208231849
  • release/beta-qt-202208091525
  • release/beta-qt-202207191241
  • release/beta-qt-202207181708
  • release/beta-qt-202207131914
  • release/beta-qt-202207131513
  • android/release_358
  • android/release_357
  • android/release_356
  • android/release_355
  • android/release_354
  • 20221220.0956.79e1207
  • android/release_353
  • android/release_352
  • android/release_350
  • android/release_349
  • android/release_348
  • android/release_347
  • 20221031.1308.130cc26
  • android/release_346
  • android/release_345
  • android/release_344
  • android/release_343
  • android/release_342
  • android/release_341
  • android/release_340
41 results

Makefile.packaging

Blame
  • Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    Makefile.packaging 4.09 KiB
    # -*- mode: makefile; -*-
    # Copyright (C) 2016-2018 Savoir-faire Linux Inc.
    #
    # This program is free software: you can redistribute it and/or modify
    # it under the terms of the GNU General Public License as published by
    # the Free Software Foundation, either version 3 of the License, or
    # (at your option) any later version.
    #
    # This program is distributed in the hope that it will be useful,
    # but WITHOUT ANY WARRANTY; without even the implied warranty of
    # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    # GNU General Public License for more details.
    #
    # You should have received a copy of the GNU General Public License
    # along with this program.  If not, see <http://www.gnu.org/licenses/>.
    #
    .DEFAULT_GOAL := package-all
    
    ##############################
    ## Version number variables ##
    ##############################
    # YYYY-MM-DD
    LAST_COMMIT_DATE:=$(shell git log -1 --format=%cd --date=short)
    
    # number of commits that day
    NUMBER_OF_COMMITS:=$(shell git log --format=%cd --date=short | grep -c $(LAST_COMMIT_DATE))
    
    # YYMMDD
    LAST_COMMIT_DATE_SHORT:=$(shell echo $(LAST_COMMIT_DATE) | sed -s 's/-//g')
    
    # last commit id
    COMMIT_ID:=$(shell git rev-parse --short HEAD)
    
    RELEASE_VERSION:=$(LAST_COMMIT_DATE_SHORT).$(NUMBER_OF_COMMITS).$(COMMIT_ID)
    RELEASE_TARBALL_FILENAME:=ring_$(RELEASE_VERSION).tar.gz
    
    # Debian versions
    DEBIAN_VERSION:=$(RELEASE_VERSION)~dfsg1-1
    DEBIAN_DSC_FILENAME:=ring_$(DEBIAN_VERSION).dsc
    DEBIAN_OCI_VERSION:=$(RELEASE_VERSION)~dfsg1-0
    DEBIAN_OCI_DSC_FILENAME:=ring_$(DEBIAN_OCI_VERSION).dsc
    DEBIAN_OCI_PKG_DIR:="packaging/rules/debian-one-click-install"
    
    #####################
    ## Other variables ##
    #####################
    TMPDIR := $(shell mktemp -d)
    CURRENT_UID:=$(shell id -u)
    
    #############################
    ## Release tarball targets ##
    #############################
    .PHONY: release-tarball
    release-tarball: $(RELEASE_TARBALL_FILENAME)
    
    $(RELEASE_TARBALL_FILENAME):
    	# Fetch tarballs
    	mkdir -p daemon/contrib/native
    	cd daemon/contrib/native && \
    	    ../bootstrap && make list && \
    	    make fetch-all -j || make fetch-all || make fetch-all
    	rm -rf daemon/contrib/native
    
    	cd $(TMPDIR) && \
    	    tar -C $(CURDIR)/.. \
    	        --exclude-vcs \
    	        -zcf $(RELEASE_TARBALL_FILENAME) \
    	        $(shell basename $(CURDIR)) && \
    	    mv $(RELEASE_TARBALL_FILENAME) $(CURDIR)
    
    	rm -rf $(CURDIR)/daemon/contrib/tarballs/*
    
    #######################
    ## Packaging targets ##
    #######################
    
    .PHONY: package-all
    package-all: package-debian_9 \
                 package-debian_9_i386 \
                 package-debian_9_oci \
                 package-debian_9_i386_oci \
                 package-ubuntu_16.04 \
                 package-ubuntu_16.04_i386 \
                 package-ubuntu_16.04_oci \
                 package-ubuntu_16.04_i386_oci \
                 package-ubuntu_18.04 \
                 package-ubuntu_18.04_i386 \
                 package-ubuntu_18.04_oci \
                 package-ubuntu_18.04_i386_oci \
                 package-ubuntu_18.10 \
                 package-ubuntu_18.10_i386 \
                 package-ubuntu_18.10_oci \
                 package-ubuntu_18.10_i386_oci \
                 package-fedora_27 \
                 package-fedora_27_i386 \
                 package-fedora_28 \
                 package-fedora_28_i386 \
                 package-fedora_29 \
                 package-fedora_29_i386 \
                 package-gentoo
    
    # Append the output of make-packaging-target to this Makefile
    # see Makefile.packaging.distro_targets
    $(shell scripts/make-packaging-target.py --generate-all > Makefile.packaging.distro_targets)
    include Makefile.packaging.distro_targets
    
    ###################
    ## Other targets ##
    ###################
    .PHONY: docs
    
    # Build the documentation
    # Note that newly added RST files will likely not display on all documents'
    # navigation bar unless the docs/build folder is manually deleted.
    docs: env
    	env/bin/sphinx-build -b html docs/source docs/build/html
    	env/bin/sphinx-build -b texinfo docs/source docs/build/texinfo
    
    env:
    	virtualenv env
    	env/bin/pip install Sphinx==1.4.1 sphinx-rtd-theme==0.1.9
    
    .PHONY: clean
    clean:
    	rm -rf env
    	rm -rf docs/build
    	rm -f ring_*.tar.gz
    	rm -rf packages
    	rm -f Makefile.packaging.distro_targets
    	rm -f .docker-image-*