debian / ruleson commit Merge http://www.kernel.org/pub/scm/gitk/gitk (302ebfe)
   1#!/usr/bin/make -f
   2# -*- makefile -*-
   3
   4# Uncomment this to turn on verbose mode.
   5#export DH_VERBOSE=1
   6
   7CFLAGS = -g -Wall
   8ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
   9       CFLAGS += -O0
  10else
  11       CFLAGS += -O2
  12endif
  13export CFLAGS
  14
  15#
  16# On PowerPC we compile against the hand-crafted assembly, on all
  17# other architectures we compile against GPL'ed sha1 code lifted
  18# from Mozilla.  OpenSSL is strangely licensed and best avoided
  19# in Debian.
  20#
  21HOST_ARCH=$(shell dpkg-architecture -qDEB_HOST_ARCH)
  22ifeq (${HOST_ARCH},powerpc)
  23        export PPC_SHA1=YesPlease
  24else
  25        export MOZILLA_SHA1=YesPlease
  26endif
  27
  28# We do have the requisite perl modules in the mainline, and
  29# have no reason to shy away from this script.
  30export WITH_SEND_EMAIL=YesPlease
  31
  32PREFIX := /usr
  33MANDIR := /usr/share/man/
  34
  35SRC    := ./
  36DOC    := Documentation/
  37DESTDIR  := $(CURDIR)/debian/tmp
  38DOC_DESTDIR := $(DESTDIR)/usr/share/doc/git-core/
  39MAN_DESTDIR := $(DESTDIR)/$(MANDIR)
  40
  41build: debian/build-stamp
  42debian/build-stamp:
  43        dh_testdir
  44        $(MAKE) prefix=$(PREFIX) PYTHON_PATH=/usr/bin/python2.4 all test doc
  45        touch debian/build-stamp
  46
  47debian-clean:
  48        dh_testdir
  49        dh_testroot
  50        rm -f debian/build-stamp
  51        dh_clean
  52
  53clean: debian-clean
  54        $(MAKE) clean
  55
  56install: build
  57        dh_testdir
  58        dh_testroot
  59        dh_clean -k 
  60        dh_installdirs 
  61
  62        make DESTDIR=$(DESTDIR) prefix=$(PREFIX) mandir=$(MANDIR) \
  63                install install-doc
  64
  65        make -C Documentation DESTDIR=$(DESTDIR) prefix=$(PREFIX) \
  66                WEBDOC_DEST=$(DOC_DESTDIR) install-webdoc
  67
  68        dh_movefiles -p git-arch
  69        dh_movefiles -p git-cvs
  70        dh_movefiles -p git-svn
  71        dh_movefiles -p git-tk
  72        dh_movefiles -p git-email
  73        dh_movefiles -p git-doc
  74        dh_movefiles -p git-core
  75        find debian/tmp -type d -o -print | sed -e 's/^/? /'
  76
  77binary-arch: build install
  78        dh_testdir
  79        dh_testroot
  80        dh_installchangelogs -a
  81        dh_installdocs -a
  82        dh_strip -a
  83        dh_compress  -a
  84        dh_fixperms -a
  85        dh_perl -a
  86        dh_makeshlibs -a
  87        dh_installdeb -a
  88        dh_shlibdeps -a
  89        dh_gencontrol -a
  90        dh_md5sums -a
  91        dh_builddeb -a
  92
  93binary-indep: build install
  94        dh_testdir
  95        dh_testroot
  96        dh_installchangelogs -i
  97        dh_installdocs -i
  98        dh_compress  -i
  99        dh_fixperms -i
 100        dh_makeshlibs -i
 101        dh_installdeb -i
 102        dh_shlibdeps -i
 103        dh_gencontrol -i
 104        dh_md5sums -i
 105        dh_builddeb -i
 106
 107binary: binary-arch binary-indep
 108
 109.PHONY: build clean binary install clean debian-clean