renatofilho@905: #!/usr/bin/make -f
renatofilho@905: # -*- makefile -*-
renatofilho@905: # Sample debian/rules that uses debhelper.
renatofilho@905: # This file was originally written by Joey Hess and Craig Small.
renatofilho@905: # As a special exception, when this file is copied by dh-make into a
renatofilho@905: # dh-make output file, you may use that output file without restriction.
renatofilho@905: # This special exception was added by Craig Small in version 0.37 of dh-make.
renatofilho@905: 
renatofilho@905: # Uncomment this to turn on verbose mode.
renatofilho@905: #export DH_VERBOSE=1
renatofilho@905: 
renatofilho@905: 
renatofilho@905: # These are used for cross-compiling and for saving the configure script
renatofilho@905: # from having to guess our platform (since we know it already)
renatofilho@905: DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
renatofilho@905: DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
renatofilho@905: 
renatofilho@905: 
renatofilho@905: CFLAGS = -Wall -g
renatofilho@905: 
renatofilho@905: ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
renatofilho@905: 	CFLAGS += -O0
renatofilho@905: else
renatofilho@905: 	CFLAGS += -O2
renatofilho@905: endif
renatofilho@905: 
renatofilho@905: config.status: configure
renatofilho@905: 	dh_testdir
renatofilho@905: 	# Add here commands to configure the package.
renatofilho@905: 	./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info CFLAGS="$(CFLAGS)" LDFLAGS="-Wl,-z,defs"
renatofilho@905: 
renatofilho@905: 
renatofilho@905: build: build-stamp
renatofilho@905: 
renatofilho@905: build-stamp:  config.status
renatofilho@905: 	dh_testdir
renatofilho@905: 
renatofilho@905: 	# Add here commands to compile the package.
renatofilho@905: 	$(MAKE)
renatofilho@905: 	#docbook-to-man debian/gmencoder.sgml > gmencoder.1
renatofilho@905: 
renatofilho@905: 	touch $@
renatofilho@905: 
renatofilho@905: clean:
renatofilho@905: 	dh_testdir
renatofilho@905: 	dh_testroot
renatofilho@905: 	rm -f build-stamp 
renatofilho@905: 
renatofilho@905: 	# Add here commands to clean up after the build process.
renatofilho@905: 	-$(MAKE) distclean
renatofilho@905: ifneq "$(wildcard /usr/share/misc/config.sub)" ""
renatofilho@905: 	cp -f /usr/share/misc/config.sub config.sub
renatofilho@905: endif
renatofilho@905: ifneq "$(wildcard /usr/share/misc/config.guess)" ""
renatofilho@905: 	cp -f /usr/share/misc/config.guess config.guess
renatofilho@905: endif
renatofilho@905: 
renatofilho@905: 
renatofilho@905: 	dh_clean 
renatofilho@905: 
renatofilho@905: install: build
renatofilho@905: 	dh_testdir
renatofilho@905: 	dh_testroot
renatofilho@905: 	dh_clean -k 
renatofilho@905: 	dh_installdirs
renatofilho@905: 
renatofilho@905: 	# Add here commands to install the package into debian/gmencoder.
renatofilho@905: 	$(MAKE) DESTDIR=$(CURDIR)/debian/gmencoder install
renatofilho@905: 
renatofilho@905: 
renatofilho@905: # Build architecture-independent files here.
renatofilho@905: binary-indep: build install
renatofilho@905: # We have nothing to do by default.
renatofilho@905: 
renatofilho@905: # Build architecture-dependent files here.
renatofilho@905: binary-arch: build install
renatofilho@905: 	dh_testdir
renatofilho@905: 	dh_testroot
renatofilho@905: 	dh_installchangelogs ChangeLog
renatofilho@905: 	dh_installdocs
renatofilho@905: 	dh_installexamples
renatofilho@905: 	dh_install
renatofilho@905: #	dh_installmenu
renatofilho@905: #	dh_installdebconf	
renatofilho@905: #	dh_installlogrotate
renatofilho@905: #	dh_installemacsen
renatofilho@905: #	dh_installpam
renatofilho@905: #	dh_installmime
renatofilho@905: #	dh_python
renatofilho@905: #	dh_installinit
renatofilho@905: #	dh_installcron
renatofilho@905: #	dh_installinfo
renatofilho@905: 	dh_installman
renatofilho@905: 	dh_link
renatofilho@905: 	dh_strip
renatofilho@905: 	dh_compress
renatofilho@905: 	dh_fixperms
renatofilho@905: #	dh_perl
renatofilho@905: #	dh_makeshlibs
renatofilho@905: 	dh_installdeb
renatofilho@905: 	dh_shlibdeps
renatofilho@905: 	dh_gencontrol
renatofilho@905: 	dh_md5sums
renatofilho@905: 	dh_builddeb
renatofilho@905: 
renatofilho@905: binary: binary-indep binary-arch
renatofilho@905: .PHONY: build clean binary-indep binary-arch binary install