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.
15 PREFIX ?= /opt/apps/com.samsung.setting
16 RESDIR ?= /opt/apps/com.samsung.setting/res
17 DATADIR ?= /opt/apps/com.samsung.setting/data
19 # Reduce relative text symbols in library
23 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
31 LDFLAGS += -Wl,--rpath,$(PREFIX)/lib -Wl,--hash-style=both -Wl,--as-needed
33 CMAKE_TMP_DIR = $(CURDIR)/cmake_tmp
36 configure: configure-stamp
39 # Add here commands to configure the package.
40 mkdir -p $(CMAKE_TMP_DIR);
41 cd $(CMAKE_TMP_DIR); CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" LDFLAGS="$(LDFLAGS)" cmake .. -DCMAKE_INSTALL_PREFIX=/opt/apps/com.samsung.setting
47 build-stamp: configure-stamp
50 # Add here commands to compile the package.
51 cd $(CMAKE_TMP_DIR) && $(MAKE)
52 #docbook-to-man debian/wavplayer.sgml > wavplayer.1
54 for f in `find $(CURDIR)/debian/ -name "*.in"`; do \
55 cat $$f > $${f%.in}; \
56 sed -i -e "s#@PREFIX@#$(PREFIX)#g" $${f%.in}; \
57 sed -i -e "s#@PREFIX@#$(RESDIR)#g" $${f%.in}; \
58 sed -i -e "s#@DATADIR@#$(DATADIR)#g" $${f%.in}; \
67 rm -f build-stamp configure-stamp
69 # Add here commands to clean up after the build process.
70 -cd $(CMAKE_TMP_DIR) && $(MAKE) clean
71 rm -rf $(CMAKE_TMP_DIR)
72 find . -name CMakeFiles | xargs rm -rf
73 find . -name *.so | xargs rm -rf
74 find . -name *.o | xargs rm -rf
75 find . -name Makefile | xargs rm -rf
76 find . -name cmake_install.cmake | xargs rm -rf
77 find . -name CMakeCache.txt | xargs rm -rf
78 find . -name CMakeFiles.txt | xargs rm -rf
80 rm -rf install_manifest.txt
81 rm -rf com.samsung.setting.desktop
84 for f in `find $(CURDIR)/debian/ -name "*.in"`; do \
96 # Add here commands to install the package into debian/wavplayer.
97 cd $(CMAKE_TMP_DIR) && $(MAKE) DESTDIR=$(CURDIR)/debian/tmp install
99 # Build architecture-independent files here.
100 binary-indep: build install
101 # We have nothing to do by default.
103 # Build architecture-dependent files here.
104 binary-arch: build install
110 dh_install --sourcedir=debian/tmp
113 # dh_installlogrotate
124 dh_strip --dbg-package=com.samsung.setting-dbg
135 binary: binary-indep binary-arch
136 .PHONY: build clean binary-indep binary-arch binary install configure