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.
16 SHAREDIR ?= /opt/share
18 UGDATADIR ?= /opt/ug/res
19 UGLIBDIR ?= /opt/ug/lib
21 CFLAGS ?= -fPIC -Wall -g
23 LDFLAGS += -Wl,--rpath,$(PREFIX)/lib -Wl,--hash-style=both -Wl,--as-needed
25 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
31 CMAKE_BUILD_DIR ?= $(CURDIR)/cmake_build_tmp
33 configure: configure-stamp
36 # Add here commands to configure the package.
37 mkdir -p $(CMAKE_BUILD_DIR) && cd $(CMAKE_BUILD_DIR) && \
38 CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" LDFLAGS="$(LDFLAGS)" cmake ${CURDIR} -DCMAKE_INSTALL_PREFIX=$(PREFIX)
43 build-stamp: configure-stamp
46 # Add here commands to compile the package.
47 $(MAKE) -C $(CMAKE_BUILD_DIR)
48 #docbook-to-man debian/worldclock.sgml > worldclock.1
50 for f in `find $(CURDIR)/debian/ -name "*.in"`; do \
51 cat $$f > $${f%.in}; \
52 sed -i -e "s#@PREFIX@#$(PREFIX)#g" $${f%.in}; \
53 sed -i -e "s#@SHAREDIR@#$(SHAREDIR)#g" $${f%.in}; \
54 sed -i -e "s#@PREFIX@#$(UGPREFIX)#g" $${f%.in}; \
55 sed -i -e "s#@UGDATADIR@#$(UGDATADIR)#g" $${f%.in}; \
56 sed -i -e "s#@UGLIBDIR@#$(UGLIBDIR)#g" $${f%.in}; \
64 rm -f build-stamp configure-stamp
66 # Add here commands to clean up after the build process.
67 mkdir -p $(CMAKE_BUILD_DIR)
68 -$(MAKE) -C $(CMAKE_BUILD_DIR) clean
69 rm -rf $(CMAKE_BUILD_DIR)
70 find -name CMakeCache.txt | xargs rm -rf
71 find -name CMakeFiles | xargs rm -rf
72 find -name cmake_install.cmake | xargs rm -rf
73 #find -name Makefile | xargs rm -rf
74 find -name install_manifest.txt | xargs rm -rf
75 find -name *.so | xargs rm -rf
76 find -name *.edj | xargs rm -rf
77 find -name *.desktop | xargs rm -rf
79 for f in `find $(CURDIR)/debian/ -name "*.in"`; do \
91 # Add here commands to install the package into debian/worldclock.
92 $(MAKE) -C $(CMAKE_BUILD_DIR) DESTDIR=$(CURDIR)/debian/tmp install
94 # Temporaruy code until next week. libug-magazine-org.tizen.clock.so
95 # cd $(CURDIR)/debian/tmp/opt/ug/lib && ln -s libug-magazine-clock-efl.so libug-magazine-clock.so
96 # cd $(CURDIR)/debian/tmp/opt/ug/lib && ln -s libug-magazine-clock-efl.so libug-magazine-org.tizen.clock.so
98 # Build architecture-independent files here.
99 binary-indep: build install
100 # We have nothing to do by default.
102 # Build architecture-dependent files here.
103 binary-arch: build install
106 # dh_installchangelogs
109 dh_install --sourcedir=debian/tmp
112 # dh_installlogrotate
123 dh_strip --dbg-package=libslp-alarm-dbg
134 binary: binary-indep binary-arch
135 .PHONY: build clean binary-indep binary-arch binary install configure