view debian/rules @ 73:c226809c03c8

2002-12-2 Brian Masney <masneyb@gftp.org> * src/gtk/bookmarks.c (run_bookmark) - don't override the value of need_userpass for SSH transfers * ChangeLog-old - clean up list of changes from 2.0.13 to 2.0.14rc1 * README - minor fixes * configure.in - increment version to 2.0.14 * debian/copyright - change my email address and webpage * debian/rules - 2 small changes * TODO - added 1 item
author masneyb
date Tue, 03 Dec 2002 02:36:37 +0000
parents c8ec7877432e
children e599812712f0
line wrap: on
line source

#!/usr/bin/make -f
# Derived from dh_make example.

arch := $(shell dpkg-architecture -qDEB_BUILD_ARCH)

#export DH_VERBOSE=1
export DH_COMPAT=3

ggtmp := $(CURDIR)/debian/gftp-gtk
gttmp := $(CURDIR)/debian/gftp-text

CFLAGS := -O2
ifneq "$(findstring debug,$(DEB_BUILD_OPTIONS))" ""
CFLAGS += -g
endif
ifeq "$(arch)" "alpha"
CFLAGS += -mieee
endif

build: build-stamp
build-stamp:
	dh_testdir
	CFLAGS="$(CFLAGS)" ./configure --prefix=/usr --mandir='$${prefix}/share/man' 
	$(MAKE) 
	touch $@

clean:
	dh_testdir
	dh_testroot
#	rm -f debian/dirs debian/docs
	rm -f debian/dirs
	[ ! -f Makefile ] || $(MAKE) distclean
	dh_clean build-stamp

install: build-stamp
	dh_testdir
	dh_testroot
	dh_clean -k
	$(MAKE) install prefix=$(ggtmp)/usr
	ln -s gftp.1.gz $(ggtmp)/usr/share/man/man1/gftp-gtk.1.gz
	dh_movefiles --sourcedir=debian/gftp-gtk -pgftp-common \
          usr/share/locale usr/share/gftp/gftprc usr/share/gftp/bookmarks \
          usr/share/man/man1/gftp.1 usr/bin/gftp
	dh_installdirs -pgftp-common usr/lib/menu

	# Install menu file manualy into the gftp-common file because
	# dh_installmenu cannot do it for me
	install -p -m644 debian/menu debian/gftp-common/usr/lib/menu/gftp
	echo "# Automatically added by dh_installmenu">> debian/gftp-common.postinst.debhelper
	sed "" /usr/share/debhelper/autoscripts/postinst-menu >> debian/gftp-common.postinst.debhelper
	echo '# End automatically added section' >> debian/gftp-common.postinst.debhelper
	echo "# Automatically added by dh_installmenu">> debian/gftp-common.postrm.debhelper
	sed "" /usr/share/debhelper/autoscripts/postrm-menu >> debian/gftp-common.postrm.debhelper
	echo '# End automatically added section' >> debian/gftp-common.postrm.debhelper

	dh_movefiles --sourcedir=debian/gftp-gtk -pgftp-text usr/bin/gftp-text
	dh_installdirs -pgftp-text usr/share/man/man1
	ln -s gftp.1.gz $(gttmp)/usr/share/man/man1/gftp-text.1.gz
	rm -f $(ggtmp)/usr/share/gftp/COPYING # we have the GPL elsewhere
	find $(ggtmp)/usr -type d -empty | xargs -r rmdir -p --ignore-fail-on-non-empty

binary-indep:
# Nothing to do, no architecture independent packages here.
# locales (gftp-common) have endianness

binary-arch: install
	dh_testdir
	dh_testroot
	dh_installdocs -a
	dh_installdocs -An -pgftp-gtk -pgftp-text README
	dh_installchangelogs -a ChangeLog
	#dh_installmenu -a --package=gftp-common
ifeq "$(findstring nostrip,$(DEB_BUILD_OPTIONS))" ""
	dh_strip -a
endif
	dh_compress -a
	dh_fixperms -a
	dh_installdeb -a
	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