Add packaging/epson-inkjet-printer-escpr.changes file
[platform/upstream/epson-inkjet-printer-escpr.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/P-R) 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                 --disable-static \
45                 --with-cupsfilterdir=@CUPS_FILTER_DIR@ \
46                 --with-cupsppddir=/opt/etc/cups/ppd/Epson
47
48 build: build-stamp
49
50 build-stamp:  config.status
51         dh_testdir
52
53         # Add here commands to compile the package.
54         $(MAKE)
55
56         touch $@
57
58 clean:
59         dh_testdir
60         dh_testroot
61         rm -f build-stamp
62
63         # Add here commands to clean up after the build process.
64         -$(MAKE) distclean
65 ifneq "$(wildcard /usr/share/misc/config.sub)" ""
66         cp -f /usr/share/misc/config.sub config.sub
67 endif
68 ifneq "$(wildcard /usr/share/misc/config.guess)" ""
69         cp -f /usr/share/misc/config.guess config.guess
70 endif
71
72
73         dh_clean
74
75 install: build
76         dh_testdir
77         dh_testroot
78         dh_clean -k
79         dh_installdirs
80
81         # Add here commands to install the package into debian/@PACKAGE_TARNAME@.
82         $(MAKE) DESTDIR=$(CURDIR)/debian/@PACKAGE_TARNAME@ install
83
84
85 # Build architecture-dependent files here.
86 binary-arch: build install
87         dh_testdir
88         dh_testroot
89 #       dh_installchangelogs ChangeLog
90         dh_installdocs
91 #       dh_installexamples
92 #       dh_install
93 #       dh_installmenu
94 #       dh_installdebconf
95 #       dh_installlogrotate
96 #       dh_installemacsen
97 #       dh_installpam
98 #       dh_installmime
99 #       dh_python
100 #       dh_installinit
101 #       dh_installcron
102 #       dh_installinfo
103 #       dh_installman
104         dh_link
105         dh_strip --dbg-package=epson-inkjet-printer-escpr-dbg
106         dh_compress
107         dh_fixperms
108 #       dh_perl
109         dh_makeshlibs
110         dh_installdeb
111         dh_shlibdeps
112         dh_gencontrol
113         dh_md5sums
114         dh_builddeb
115
116 binary: binary-indep binary-arch
117 .PHONY: build clean binary-indep binary-arch binary install