3 # Sample debian/rules that uses debhelper.
4 # This file was originally written by Joey Hess and Craig Small.
5 # As a special exception, when this file is copied by dh-make into a
6 # dh-make output file, you may use that output file without restriction.
7 # This special exception was added by Craig Small in version 0.37 of dh-make.
9 # Uncomment this to turn on verbose mode.
14 DATADIR ?= /opt/ug/res
16 CFLAGS ?= -fPIC -Wall -g
18 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
24 LDFLAGS += -Wl,--rpath=$(PREFIX)/lib -Wl,--as-needed -Wl,--hash-style=both
26 BUILD_TMP_DIR ?= cmake_build_tmp
27 CMAKE_BUILD_DIR ?= $(CURDIR)/$(BUILD_TMP_DIR)
29 configure: configure-stamp
32 # Add here commands to configure the package.
33 mkdir -p $(CMAKE_BUILD_DIR) && cd $(CMAKE_BUILD_DIR) && \
34 CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" LDFLAGS="$(LDFLAGS)" cmake $(CURDIR) -DCMAKE_INSTALL_PREFIX=$(PREFIX)
35 touch $(CMAKE_BUILD_DIR)/configure-stamp
39 build-stamp: configure-stamp
42 # Add here commands to compile the package.
43 $(MAKE) -C $(CMAKE_BUILD_DIR)
44 #docbook-to-man debian/worldclock.sgml > worldclock.1
46 for f in `find $(CURDIR)/debian/ -name "*.in"`; do \
47 cat $$f > $${f%.in}; \
48 sed -i -e "s#@PREFIX@#$(PREFIX)#g" $${f%.in}; \
49 sed -i -e "s#@LIBDIR@#$(LIBDIR)#g" $${f%.in}; \
50 sed -i -e "s#@DATADIR@#$(DATADIR)#g" $${f%.in}; \
53 touch $(CMAKE_BUILD_DIR)/$@
58 rm -f $(CMAKE_BUILD_DIR)/build-stamp $(CMAKE_BUILD_DIR)/configure-stamp
60 # Add here commands to clean up after the build process.
61 mkdir -p $(CMAKE_BUILD_DIR)
62 -$(MAKE) -C $(CMAKE_BUILD_DIR) clean
63 rm -rf $(CMAKE_BUILD_DIR)
64 find -name CMakeCache.txt | xargs rm -rf
65 find -name CMakeFiles | xargs rm -rf
66 find -name cmake_install.cmake | xargs rm -rf
67 find -name Makefile | xargs rm -rf
68 find -name install_manifest.txt | xargs rm -rf
69 find -name *.so | xargs rm -rf
70 find -name *.edj | xargs rm -rf
71 find -name *.desktop | xargs rm -rf
72 find -name *.pc | xargs rm -rf
74 for f in `find $(CURDIR)/debian/ -name "*.in"`; do \
86 # Add here commands to install the package into debian/tmp.
87 $(MAKE) -C $(CMAKE_BUILD_DIR) DESTDIR=$(CURDIR)/debian/tmp install
90 # Build architecture-independent files here.
91 binary-indep: build install
92 # We have nothing to do by default.
94 # Build architecture-dependent files here.
95 binary-arch: build install
98 # dh_installchangelogs
101 dh_install --sourcedir=debian/tmp
104 # dh_installlogrotate
115 dh_strip --dbg-package=libug-worldclock-efl-dbg
126 binary: binary-indep binary-arch
127 .PHONY: build clean binary-indep binary-arch binary install configure