1#!/usr/bin/make -f
2
3# Copyright 2007 Alain Knaff.
4# This file is part of mtools.
5#
6# Mtools is free software: you can redistribute it and/or modify
7# it under the terms of the GNU General Public License as published by
8# the Free Software Foundation, either version 3 of the License, or
9# (at your option) any later version.
10#
11# Mtools is distributed in the hope that it will be useful,
12# but WITHOUT ANY WARRANTY; without even the implied warranty of
13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14# GNU General Public License for more details.
15#
16# You should have received a copy of the GNU General Public License
17# along with Mtools.  If not, see <http://www.gnu.org/licenses/>.
18
19
20# Sample debian/rules that uses debhelper.
21# This file is public domain software, originally written by Joey Hess. 
22
23# Uncomment this to turn on verbose mode.
24#export DH_VERBOSE=1
25
26buildroot=`pwd`/debian/mtools
27_prefix=/usr
28_infodir=/usr/share/info
29_mandir=/usr/share/man
30
31
32build: build-stamp
33build-stamp:
34	dh_testdir
35
36	# Add here commands to compile the package.
37	#$(MAKE)
38	./configure --prefix=$(buildroot)$(_prefix) --sysconfdir=/etc --infodir=$(buildroot)$(_infodir) --mandir=$(buildroot)$(_mandir)
39	$(MAKE)
40
41	touch build-stamp
42
43clean:
44	dh_testdir
45	dh_testroot
46	rm -f build-stamp
47
48	# Add here commands to clean up after the build process.
49	#-$(MAKE) clean
50	#-$(MAKE) distclean
51	if [ -f Makefile ] ; then $(MAKE) clean ; fi
52	if [ -f Makefile ] ; then $(MAKE) distclean ; fi
53	rm -f config.status Makefile config.log config.h build-stamp
54
55	dh_clean
56
57install: build
58	dh_testdir
59	dh_testroot
60	dh_clean -k
61	dh_installdirs
62
63	# Add here commands to install the package into debian/<packagename>
64	#$(MAKE) prefix=`pwd`/debian/`dh_listpackages`/usr install
65	$(MAKE) install
66	rm -f $(buildroot)$(_infodir)/dir.gz
67	rm -f $(buildroot)$(_infodir)/dir.old.gz
68	rm -f $(buildroot)$(_infodir)/dir
69	rm -f $(buildroot)$(_infodir)/dir.old
70
71# Build architecture-independent files here.
72binary-indep: build install
73# We have nothing to do by default.
74
75# Build architecture-dependent files here.
76binary-arch: build install
77	dh_testdir
78	dh_testroot
79	dh_installchangelogs
80	dh_installdocs
81	dh_installexamples
82#	dh_install
83#	dh_installmenu
84#	dh_installdebconf	
85#	dh_installlogrotate
86#	dh_installemacsen
87#	dh_installcatalogs
88#	dh_installpam
89#	dh_installmime
90#	dh_installinit
91#	dh_installcron
92#	dh_installinfo
93#	dh_installwm
94#	dh_installudev
95#	dh_undocumented
96	dh_installman
97	dh_link
98	dh_strip
99	dh_compress
100	dh_fixperms
101#	dh_perl
102#	dh_python
103#	dh_makeshlibs
104	dh_installdeb
105	dh_shlibdeps
106	dh_gencontrol
107	dh_md5sums
108	dh_builddeb
109
110binary: binary-indep binary-arch
111.PHONY: build clean binary-indep binary-arch binary install
112