File debian.rules of Package belle-sip

#!/usr/bin/make -f
# -*- makefile -*-

# Uncomment this to turn on verbose mode.
export DH_VERBOSE=1
# Set debhelper options
DEB_BUILD_OPTIONS=nocheck
export pkgname=belle-sip
export _topdir=/usr/src/packages
export _builddir=$(_topdir)/BUILD
export _sourcedir=$(_topdir)/SOURCES
export uploaddir=/usr/src/packages/SOURCES
export srcdir=/usr/src/packages/SOURCES
export pkgdir_head=/usr/src/packages/BUILD/debian
#export pkgdir=$(pkgdir_head)/$(pkgname)
export pkgdir=$(pkgdir_head)/tmp
export buildroot=/usr/src/packages/BUILD/debian/tmp
#export buildroot=/usr/src/packages/BUILD/debian/$(pkgname)
# Add support for different Debian based distributions
export VERSION_CODENAME = $(shell cat /etc/os-release | grep VERSION_CODENAME | awk -F= '{print $$2}')
export VERSION_ID = $(shell cat /etc/os-release | grep VERSION_ID | awk -F= '{print $$2}')
export PRETTY_NAME=$(shell cat /etc/*-release | egrep "PRETTY_NAME" | cut -d = -f 2)
export ARCHITECTURE=$(shell dpkg --print-architecture)
export MY_DEB_BUILD_ARCH=$(shell dpkg-architecture -q DEB_BUILD_ARCH)
ifeq ($(findstring arm64,$(ARCHITECTURE)),arm64)
    export ARCHTYPE=aarch64
    export BUILDDIR=obj-$(ARCHTYPE)-linux-gnu
    export LIBDIR=$(ARCHTYPE)-linux-gnu
endif
ifeq ($(findstring amd64,$(ARCHITECTURE)),amd64)
    export ARCHTYPE=x86_64
    export BUILDDIR=obj-$(ARCHTYPE)-linux-gnu
    export LIBDIR=$(ARCHTYPE)-linux-gnu
endif
ifeq ($(findstring armhf,$(ARCHITECTURE)),armhf)
    export ARCHTYPE=arm
    export BUILDDIR=obj-$(ARCHTYPE)-linux-gnueabihf
    export LIBDIR=$(ARCHTYPE)-linux-gnueabihf
endif
ifeq ($(findstring Raspbian,$(PRETTY_NAME)),Raspbian)
    # Found
    export PLATFORM=Raspbian
endif
ifeq ($(findstring Debian,$(PRETTY_NAME)),Debian)
    # Not found
    export PLATFORM=DebianOrUbuntu
endif
ifeq ($(findstring Ubuntu,$(PRETTY_NAME)),Ubuntu)
    # Not found
    export PLATFORM=DebianOrUbuntu
endif
export SOURCES_ARE_HERE=/usr/src/packages/BUILD/
export BUILD_IT_HERE=/usr/src/packages/BUILD/$(BUILDDIR)/

%:
	dh $@ --buildsystem=cmake

override_dh_auto_configure:
	echo "Different Debian based distros need different patches and adjustments."
	echo PRETTY_NAME=$(PRETTY_NAME)
	echo ARCHITECTURE=$(ARCHITECTURE)
	echo DEB_BUILD_ARCH=$(DEB_BUILD_ARCH)
	echo MY_DEB_BUILD_ARCH=$(MY_DEB_BUILD_ARCH)
	echo PLATFORM=$(PLATFORM)
	echo BUILDDIR=$(BUILDDIR)
	echo LIBDIR=$(LIBDIR)
	echo
	echo pwd=$(shell pwd)
	echo
	echo "Installs $(pkgname)"
	echo _topdir=$(_topdir)
	echo _builddir=$(_builddir)
	echo _sourcedir=$(_sourcedir)
	echo uploaddir=$(uploaddir)
	echo srcdir=$(srcdir)
	echo pkgdir_head=$(pkgdir_head)
	echo pkgdir=$(pkgdir)
	echo buildroot=$(buildroot)
	echo "----------------------------------------"
	#mkdir -pv $(BUILDDIR)
	mkdir -pv $(BUILD_IT_HERE)
	#cmake -S /usr/src/packages/BUILD/ -B /usr/src/packages/BUILD/$(BUILDDIR) \
	cmake -S $(SOURCES_ARE_HERE) -B $(BUILD_IT_HERE) \
	  -DCMAKE_INSTALL_PREFIX=/usr \
	  -DENABLE_STRICT=OFF \
	  -DBUILD_SHARED_LIBS=YES \
	  -DENABLE_STATIC=OFF

override_dh_update_autotools_config:

override_dh_autoreconf:

override_dh_auto_test:
openSUSE Build Service is sponsored by