Tizen 2.1 base
[platform/framework/web/wrt-installer.git] / debian / rules
index af33220..075ebbe 100755 (executable)
@@ -6,54 +6,27 @@
 # dh-make output file, you may use that output file without restriction.
 # This special exception was added by Craig Small in version 0.37 of dh-make.
 
-# Uncomment this to turn on verbose mode.
-#export DH_VERBOSE=1
-
-
-# These are used for cross-compiling and for saving the configure script
-# from having to guess our platform (since we know it already)
-DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
-DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
-PACKAGE_VERSION ?= $(shell sed -n "1 p" debian/changelog | sed 's/.*(\(.*\)).*/\1/')
+PACKAGE_VERSION ?= $(shell dpkg-parsechangelog | sed -n 's/^Version: // p')
 
 PREFIX ?= /usr
 DATADIR ?= /opt
 LDFLAGS = -Wl,--rpath=$(PREFIX)/lib
-# Please set CFLAGS only in CMakeLists.txt, as they are dependent on CMake build type.
-
+CMAKE_BUILD_DIR ?= $(CURDIR)/cmake_build_tmp
 
-ifeq (,$(findstring no,$(DPL_LOG)))
+ifeq (,$(findstring no,$(DPL_LOGS)))
        DPL_LOGS_STATUS = "ON"
 else
        DPL_LOGS_STATUS = "OFF"
 endif
 
-ifeq (1,$(WRT_SKIP_ACE_SUPPORT))
-    WRT_SKIP_ACE = "ON"
-else
-    WRT_SKIP_ACE = "OFF"
-endif
-
-ifeq (1,$(WRT_SMACK_ENABLE))
-    SMACK_STATUS = "ON"
-else
-    SMACK_STATUS = "OFF"
-endif
-
-#for building with:
-#efl library, use TARGET=X1
-export TARGET=X1
-
-CMAKE_BUILD_DIR ?= $(CURDIR)/cmake_build_tmp
-
-#config.status: configure
 config.status:
        dh_testdir
        # Add here commands to configure the package.
        mkdir -p $(CMAKE_BUILD_DIR) && cd $(CMAKE_BUILD_DIR) && \
-       cmake ${SRCDIR} -DBUILD_TYPE="${TARGET}" -DCMAKE_INSTALL_PREFIX="${PREFIX}" -DCMAKE_BUILD_TYPE="$(BUILD_TYPE)" -DDPL_LOG=$(DPL_LOGS_STATUS) -DSMACK_ENABLED=${SMACK_STATUS} -DCMAKE_PACKAGE_VERSION="$(PACKAGE_VERSION)" -DWRT_SKIP_ACE_SUPPORT="${WRT_SKIP_ACE}" ..
-
-
+       cmake ${SRCDIR} \
+               -DCMAKE_INSTALL_PREFIX="${PREFIX}"      \
+               -DDPL_LOG=$(DPL_LOGS_STATUS)            \
+               -DCMAKE_PACKAGE_VERSION=${PACKAGE_VERSION} ..
 build: build-stamp
 
 build-stamp:  config.status
@@ -61,7 +34,6 @@ build-stamp:  config.status
        # Add here commands to compile the package.
        cd $(CMAKE_BUILD_DIR) && $(MAKE) -j 4
        #docbook-to-man debian/ncurses.sgml > ncurses.1
-
        for f in `find $(CURDIR)/debian/ -name "*.in"`; do \
                cat $$f > $${f%.in}; \
                sed -i -e "s#@PREFIX@#$(PREFIX)#g" $${f%.in}; \