debian swirl logo

Back to the packages list kwwidgets

#!/usr/bin/make -f

export DH_VERBOSE= 0

include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/class/makefile.mk
include /usr/share/cdbs/1/rules/patchsys-quilt.mk

CFLAGS = -g
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
	CFLAGS += -O0
else
	CFLAGS += -O2
endif
export CFLAGS

# set the number of build jobs
ifneq (,$(filter parallel= %,$(DEB_BUILD_OPTIONS)))
        JOBS := -j$(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
endif

DEB_DH_BUILDDEB_ARGS := -- -Z bzip2
DEB_BUILDDIR = $(CURDIR)/DEB_build_shared
DEB_DESTDIR = $(CURDIR)/debian/tmp
DEB_MAKE_BUILD_TARGET    := $(JOBS)
DEB_MAKE_INSTALL_TARGET  := $(JOBS) install


PYVERS = $(shell pyversions -r debian/control)
PYMODDIR = usr/lib/$(PYVERS)/site-packages
PYEXTDIR = $(PYMODDIR)


$(DEB_BUILDDIR)/CMakeCache.txt: debian/CMakeCache.txt.debian
		cp $< $@
	echo CMAKE_INSTALL_PREFIX:PATH= $(CURDIR)/debian/tmp/usr >> $@
	echo CMAKE_VERBOSE_MAKEFILE:BOOL= $(DH_VERBOSE) >> $@
	echo CMAKE_CXX_FLAGS:STRING= -Wno-deprecated -I/usr/include/$(PYVERS) >> $@
	echo CMAKE_SHARED_LINKER_FLAGS:STRING= -Wl,--as-needed >> $@
	echo CMAKE_EXE_LINKER_FLAGS:STRING= -Wl,--as-needed >> $@
	echo BUILD_DOCUMENTATION:BOOL= ON >> $@
	echo KWWidgets_BUILD_EXAMPLES:BOOL= OFF >> $@
	echo KWWidgets_BUILD_TESTING:BOOL= OFF >> $@
	echo BUILD_SHARED_LIBS:BOOL= ON >> $@

get-orig-source:
		/bin/sh $(CURDIR)/debian/get-orig-source


common-configure-arch:: $(DEB_BUILDDIR)/CMakeCache.txt
		cd $(DEB_BUILDDIR) && cmake ..


common-build-arch::
		sed -i -e "s#/usr/lib/\(`dpkg-architecture -qDEB_HOST_MULTIARCH`/\)\?lib\([^;]*\)\.so#\2#g" ./DEB_build_shared/KWWidgetsLibraryDepends.cmake
		echo "python-kwwidgets: non-dev-pkg-with-shlib-symlink" > debian/python-kwwidgets.lintian-overrides
		echo "python-kwwidgets: package-name-doesnt-match-sonames" >> debian/python-kwwidgets.lintian-overrides
		dh_lintian


install/kwwidgets-doc::
		doxygen -u -s $(DEB_BUILDDIR)/Utilities/Doxygen/Doxyfile
		doxygen $(DEB_BUILDDIR)/Utilities/Doxygen/Doxyfile
	# remove zero byte files
		find $(DEB_BUILDDIR)/Utilities/Doxygen/doc/ -depth -empty | xargs rm -rf
		find $(DEB_BUILDDIR)/Utilities/Doxygen/doc/ -name "*.md5" | xargs rm -rf
		dh_install -pkwwidgets-doc         ../../DEB_build_shared/Utilities/Doxygen/doc/html usr/share/doc/kwwidgets-doc

install/python-kwwidgets::
		dh_install -ppython-kwwidgets      $(PYMODDIR)/KWWidgets-1.0*.egg-info               $(PYMODDIR)
		dh_install -ppython-kwwidgets      $(PYMODDIR)/libKWWidgetsPython.so                 $(PYMODDIR)
		dh_install -ppython-kwwidgets      $(PYMODDIR)/kwwidgets.py                          $(PYMODDIR)
		dh_install -ppython-kwwidgets      usr/lib/libKWWidgetsPythonD.so*                   usr/lib
		dh_pysupport -v


install/kwwidgets-examples::
		dh_installexamples  -pkwwidgets-examples  Examples/*


install/tcl8.5-kwwidgets::
		dh_install -ptcl8.5-kwwidgets      usr/lib/KWWidgets/tcl/pkgIndex.tcl                usr/lib/KWWidgets
		dh_install -ptcl8.5-kwwidgets      usr/lib/tcl/kwwidgets/kwwidgets.tcl               usr/lib/KWWidgets/kwwidgets


install/libkwwidgets1.0.1009::
		dh_install -plibkwwidgets1.0.1009  usr/lib/libKWWidgets.so.*                         usr/lib


install/libkwwidgets1-dev::
		dh_install -plibkwwidgets1-dev     usr/lib/libKWWidgets.so                           usr/lib
		dh_install -plibkwwidgets1-dev     usr/lib/KWWidgets/CMake/*                         usr/lib/KWWidgets/CMake
		dh_install -plibkwwidgets1-dev     usr/lib/KWWidgets/*.cmake                         usr/lib/KWWidgets
		dh_install -plibkwwidgets1-dev     usr/include/KWWidgets/*                           usr/include/KWWidgets


clean::
		rm -rf $(DEB_BUILDDIR)

Builds:

kwwidgets-doc
cross-platform gui toolkit - documentation
kwwidgets-examples
cross-platform gui toolkit - examples
libkwwidgets1.0.1009
cross-platform gui toolkit - runtime
libkwwidgets1-dev
cross-platform gui toolkit - development
python-kwwidgets
cross-platform gui toolkit - python
tcl8.5-kwwidgets
cross-platform gui toolkit - tcl/tk