Tizen 2.0 Release
[external/epson-laser-printer-escpage.git] / debian / rules.in
1 #!/usr/bin/make -f
2 # -*- makefile -*-
3 # rules.in -- templete file to create Debian package
4 #
5 # Epson Inkjet Printer Driver (ESC/Page) for Linux
6 # Copyright (C) Seiko Epson Corporation 2012.
7 #  This program is free software; you can redistribute it and/or modify
8 # it under the terms of the GNU General Public License as published by
9 # the Free Software Foundation; either version 2 of the License, or
10 # (at your option) any later version.
11 #
12 # This program is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 # GNU General Public License for more details.
16 #
17 # You should have received a copy of the GNU General Public License
18 # along with this program; if not, write to the Free Software
19 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA.
20
21 # Uncomment this to turn on verbose mode.
22 #export DH_VERBOSE=1
23
24
25 # These are used for cross-compiling and for saving the configure script
26 # from having to guess our platform (since we know it already)
27 DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
28 DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
29
30
31 CFLAGS = -Wall
32
33 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
34         CFLAGS += -O0
35 else
36         CFLAGS += -O2
37 endif
38
39 config.status: configure
40         dh_testdir
41         # Add here commands to configure the package.
42         ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) \
43                 --prefix=/usr \
44                 --with-cupsfilterdir=@CUPS_FILTER_DIR@ \
45                 --with-cupsppddir=@CUPS_PPD_DIR@
46
47 build: build-stamp
48
49 build-stamp:  config.status
50         dh_testdir
51
52         # Add here commands to compile the package.
53         $(MAKE)
54
55         touch $@
56
57 clean:
58         dh_testdir
59         dh_testroot
60         rm -f build-stamp
61
62         # Add here commands to clean up after the build process.
63         -$(MAKE) distclean
64 ifneq "$(wildcard /usr/share/misc/config.sub)" ""
65         cp -f /usr/share/misc/config.sub config.sub
66 endif
67 ifneq "$(wildcard /usr/share/misc/config.guess)" ""
68         cp -f /usr/share/misc/config.guess config.guess
69 endif
70
71
72         dh_clean
73
74 install: build
75         dh_testdir
76         dh_testroot
77         dh_clean -k
78         dh_installdirs
79
80         # Add here commands to install the package into debian/@PACKAGE_TARNAME@.
81         $(MAKE) DESTDIR=$(CURDIR)/debian/@PACKAGE_TARNAME@ install
82
83
84 # Build architecture-dependent files here.
85 binary-arch: build install
86         dh_testdir
87         dh_testroot
88 #       dh_installchangelogs ChangeLog
89         dh_installdocs
90 #       dh_installexamples
91 #       dh_install
92 #       dh_installmenu
93 #       dh_installdebconf
94 #       dh_installlogrotate
95 #       dh_installemacsen
96 #       dh_installpam
97 #       dh_installmime
98 #       dh_python
99 #       dh_installinit
100 #       dh_installcron
101 #       dh_installinfo
102 #       dh_installman
103         dh_link
104         dh_strip
105         dh_compress
106         dh_fixperms
107 #       dh_perl
108         dh_makeshlibs
109         dh_installdeb
110         dh_shlibdeps
111         dh_gencontrol
112         dh_md5sums
113         dh_builddeb
114
115 binary: binary-indep binary-arch
116 .PHONY: build clean binary-indep binary-arch binary install