1#!/usr/bin/make -f
2# -*- makefile -*-
3# Sample debian/rules that uses debhelper.
4# GNU copyright 1997 to 1999 by Joey Hess.
5
6# Uncomment this to turn on verbose mode.
7#export DH_VERBOSE=1
8
9builddir=$(CURDIR)/debian/mp3-archive-tools/
10
11CFLAGS = -Wall -g
12
13ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
14	CFLAGS += -O0
15else
16	CFLAGS += -O2
17endif
18ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
19	INSTALL_PROGRAM += -s
20endif
21
22configure: configure-stamp
23configure-stamp:
24	dh_testdir
25	# Add here commands to configure the package.
26	perl Makefile.PL INSTALLDIRS=vendor
27	touch configure-stamp
28
29
30build: build-stamp
31
32build-stamp: configure-stamp
33	dh_testdir
34
35	# Add here commands to compile the package.
36	$(MAKE) DESTDIR=$(builddir)  INSTALLVENDORMAN1DIR=/usr/share/man/man1
37
38	touch build-stamp
39
40clean:
41	dh_testdir
42	dh_testroot
43	rm -f build-stamp configure-stamp
44
45	# Add here commands to clean up after the build process.
46	-$(MAKE) clean
47
48	dh_clean
49
50install: build
51	dh_testdir
52	dh_testroot
53	dh_clean -k
54	dh_installdirs
55
56	# Add here commands to install the package into debian/mp3lint.
57	$(MAKE) pure_install DESTDIR=$(builddir)  INSTALLVENDORMAN1DIR=/usr/share/man/man1
58	# get rid of .packlist associated dirs, and empty perl5 dir
59	-rm -fr $(builddir)usr/lib
60	-rmdir $(builddir)usr/share/perl5
61
62
63# Build architecture-independent files here.
64binary-indep: build install
65# We have nothing to do by default.
66
67# Build architecture-dependent files here.
68binary-arch: build install
69	dh_testdir
70	dh_testroot
71	dh_installchangelogs
72	dh_installdocs README examples/pmv-examples.sh
73#	dh_installexamples
74#	dh_install
75#	dh_installmenu
76#	dh_installdebconf
77#	dh_installlogrotate
78#	dh_installemacsen
79#	dh_installpam
80#	dh_installmime
81#	dh_installinit
82#	dh_installcron
83#	dh_installinfo
84	dh_installman
85	dh_link
86#	dh_strip
87	dh_compress
88	dh_fixperms
89	dh_perl
90#	dh_python
91#	dh_makeshlibs
92	dh_installdeb
93	dh_shlibdeps
94	dh_gencontrol
95	dh_md5sums
96	dh_builddeb
97
98binary: binary-indep binary-arch
99.PHONY: build clean binary-indep binary-arch binary install configure
100