Update source from tizen 2.3
[platform/core/base/rpm-installer.git] / debian / rules
1 #!/usr/bin/make -f
2 # -*- makefile -*-
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.
8
9 # Uncomment this to turn on verbose mode.
10 #export DH_VERBOSE=1
11
12 include debian/desktop.slp
13 include debian/control.slp
14
15 PKGDIR = debian/$(Package)
16 DESKTOPFILE = debian/desktop.slp
17 DESKTOPDIR = usr/share/install-info/application
18
19 CFLAGS = -Wall -g
20
21 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
22         CFLAGS += -O0
23 else
24         CFLAGS += -O2
25 endif
26
27 configure: configure-stamp
28 configure-stamp:
29         dh_testdir
30         # Add here commands to configure the package.
31         rm -rf Makefile CMakeCache.txt CMakeFiles cmake_install.cmake install_manifest.txt *.deb
32         cmake . -DCMAKE_INSTALL_PREFIX=/usr
33         rm -rf CMakeFiles/CompilerIdC*
34         touch configure-stamp
35
36
37 build: build-stamp
38
39 build-stamp: configure-stamp
40         dh_testdir
41
42         # Add here commands to compile the package.
43         $(MAKE)
44         #docbook-to-man debian/native-installer.sgml > native-installer.1
45
46         touch $@
47
48 clean:
49         dh_testdir
50         dh_testroot
51         rm -f build-stamp configure-stamp
52         # Add here commands to clean up after the build process.
53         -$(MAKE) clean
54         dh_clean
55         rm -rf Makefile CMakeCache.txt CMakeFiles cmake_install.cmake install_manifest.txt *.deb
56         cd backend && rm -rf Makefile CMakeCache.txt CMakeFiles cmake_install.cmake install_manifest.txt *.deb
57         cd backend-lib && rm -rf Makefile CMakeCache.txt CMakeFiles cmake_install.cmake install_manifest.txt *.deb
58         rm -f backend/install_rpm_package.sh  backend/install_rpm_package_with_dbpath_ro.sh  backend/install_rpm_package_with_dbpath_rw.sh  backend/uninstall_rpm_package.sh  backend/upgrade_rpm_package.sh  backend/upgrade_rpm_package_with_dbpath_ro.sh  backend/upgrade_rpm_package_with_dbpath_rw.sh  backend/query_rpm__package.sh  backend/cpio_rpm_package.sh  backend/cpio_rpm_package_update_xml.sh backend/coretpk_update_xml.sh backend/rpm_update_xml.sh
59         cd frontend && rm -rf Makefile CMakeCache.txt CMakeFiles cmake_install.cmake install_manifest.txt *.deb *.sh rpm-backend
60         cd common && rm -rf Makefile CMakeCache.txt CMakeFiles cmake_install.cmake install_manifest.txt *.deb *.a
61         cd frontend && rm -rf Makefile CMakeCache.txt CMakeFiles cmake_install.cmake install_manifest.txt *.deb
62         cd po && rm -rf Makefile CMakeCache.txt CMakeFiles cmake_install.cmake install_manifest.txt *.deb *.mo
63         rm -rf $(CURDIR)/debian/rpm-installer
64         rm -rf $(CURDIR)/debian/rpm-installer-dbg
65
66 install: build
67         dh_testdir
68         dh_testroot
69         dh_clean -k
70         dh_installdirs
71
72         # Add here commands to install the package into debian/rpm-installer.
73         $(MAKE) DESTDIR=$(CURDIR)/$(PKGDIR) install
74 #       mkdir -p $(CURDIR)/$(PKGDIR)/$(DESKTOPDIR)
75 #       cp $(DESKTOPFILE) $(CURDIR)/$(PKGDIR)/$(DESKTOPDIR)/$(Package).desktop
76
77
78 # Build architecture-independent files here.
79 binary-indep: build install
80 # We have nothing to do by default.
81
82 # Build architecture-dependent files here.
83 binary-arch: build install
84         dh_testdir
85         dh_testroot
86         dh_installchangelogs
87         dh_installdocs
88         dh_installexamples
89 #       cp $(DESKTOPFILE) $(CURDIR)/debian/native-installer/$(DESKTOPDIR)/$(Package).desktop
90 #       dh_install
91 #       dh_installmenu
92 #       dh_installdebconf
93 #       dh_installlogrotate
94 #       dh_installemacsen
95 #       dh_installpam
96 #       dh_installmime
97 #       dh_python
98 #       dh_installinit
99 #       dh_installcron
100 #       dh_installinfo
101         dh_installman
102         dh_link
103         dh_strip --dbg-package=$(Package)-dbg
104         dh_compress
105         dh_fixperms
106 #       dh_perl
107 #       dh_makeshlibs
108         dh_installdeb
109         dh_shlibdeps
110         dh_gencontrol
111         dh_md5sums
112         dh_builddeb
113
114 binary: binary-indep binary-arch
115 .PHONY: build clean binary-indep binary-arch binary install configure