view debian/rules @ 536:9fa452580f94

2004-8-17 Brian Masney <masneyb@gftp.org> * src/gtk/gftp-gtk.c - removed local shortcuts for Disconnect and Open URL. These conflicted with other items
author masneyb
date Wed, 18 Aug 2004 02:52:19 +0000
parents a2ec3572dea2
children 2311d02b07bc
line wrap: on
line source

#!/usr/bin/make -f
# Sample debian/rules that uses debhelper.
# GNU copyright 1997 to 1999 by Joey Hess.

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

# These are used for cross-compiling and for saving the configure script
# from having to guess our platform (since we know it already)
DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
DEB_ARCH_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_BUILD_ARCH)

ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
	CFLAGS += -g
endif
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
	INSTALL_PROGRAM += -s
endif
ifeq ($(DEB_ARCH_GNU_TYPE), "alpha")
	CFLAGS += -mieee
endif

config.status: configure
	dh_testdir
	
	-test -r /usr/share/misc/config.sub && \
	cp -f /usr/share/misc/config.sub config.sub
	-test -r /usr/share/misc/config.guess && \
	cp -f /usr/share/misc/config.guess config.guess
				
	./configure \
		--host=$(DEB_HOST_GNU_TYPE) \
		--build=$(DEB_BUILD_GNU_TYPE) \
		--prefix=/usr \
		--mandir=\$${prefix}/share/man \
		--infodir=\$${prefix}/share/info \
		--enable-textport=yes 

build: build-stamp
build-stamp: config.status
	dh_testdir
	$(MAKE) 
	touch build-stamp

clean: debian-clean
	dh_clean

debian-clean:
	dh_testdir
	dh_testroot
	-$(MAKE) distclean
	-rm -f *-stamp
	-rm -f config.sub config.guess

install: build
	dh_testdir
	dh_testroot
	dh_clean -k
	dh_installdirs
	
	# Main install.
	$(MAKE) install DESTDIR=$(CURDIR)/debian/tmp
	
	# Install icon
	convert -geometry 32x32 $(CURDIR)/debian/tmp/usr/share/pixmaps/gftp.png $(CURDIR)/debian/tmp/usr/share/pixmaps/gftp.xpm

	# Move all files in their corresponding package
	dh_install --sourcedir=debian/tmp

	# Install parse-netrc.pl
	install -m 755 $(CURDIR)/docs/parse-netrc.pl $(CURDIR)/debian/gftp-common/usr/share/doc/gftp-common/examples
	
# Build architecture-independent files here.
binary-indep: build install
	dh_testdir -i
	dh_testroot -i
#	dh_installdebconf
	dh_installdocs -i
#	dh_installexamples
#	dh_installmenu
#	dh_installlogrotate
#	dh_installemacsen
#	dh_installpam
#	dh_installmime
#	dh_installinit
#	dh_installcron
#	dh_installman
#	dh_installinfo
	dh_installchangelogs -i ChangeLog
	dh_link -i
#	dh_strip
	dh_compress -i
	dh_fixperms -i
#	dh_makeshlibs
	dh_installdeb -i
#	dh_perl
#	dh_shlibdeps
	dh_gencontrol -i
	dh_md5sums -i
	dh_builddeb -i
	

# Build architecture-dependent files here.
binary-arch: build install
	dh_testdir -a
	dh_testroot -a

	# Hack to remove files from the upstream tarball
	-rm -f debian/dirs
	-rm -f debian/docs
	-rm -f debian/menu
	
	dh_installdebconf -a	
	dh_installdocs -a
#	dh_installexamples
	dh_installmenu -a
#	dh_installlogrotate
#	dh_installemacsen
#	dh_installpam
#	dh_installmime
#	dh_installinit
	dh_installcron -a
	dh_installman -a
	dh_installinfo -a	
	dh_installchangelogs -a ChangeLog
	dh_link -a
	dh_strip -a
	dh_compress -a
	dh_fixperms -a
#	dh_makeshlibs
	dh_installdeb -a
#	dh_perl
	dh_shlibdeps -a
	dh_gencontrol -a
	dh_md5sums -a
	dh_builddeb -a
	
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install