debian / ruleson commit [PATCH] Fixed/Extended example for update hook (c65a947)
   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
  29PREFIX := /usr
  30MANDIR := /usr/share/man/
  31
  32SRC    := ./
  33DOC    := Documentation/
  34DESTDIR  := $(CURDIR)/debian/tmp
  35DOC_DESTDIR := $(DESTDIR)/usr/share/doc/git-core/
  36MAN_DESTDIR := $(DESTDIR)/$(MANDIR)
  37
  38build: debian/build-stamp
  39debian/build-stamp:
  40        dh_testdir
  41        $(MAKE) prefix=$(PREFIX) all doc
  42        touch debian/build-stamp
  43
  44debian-clean:
  45        dh_testdir
  46        dh_testroot
  47        rm -f debian/build-stamp
  48        dh_clean
  49
  50clean: debian-clean
  51        $(MAKE) clean
  52
  53install: build
  54        dh_testdir
  55        dh_testroot
  56        dh_clean -k 
  57        dh_installdirs 
  58
  59        make DESTDIR=$(DESTDIR) prefix=$(PREFIX) mandir=$(MANDIR) \
  60                install install-doc
  61
  62        mkdir -p $(DOC_DESTDIR)
  63        find $(DOC) '(' -name '*.txt' -o -name '*.html' ')' -exec install {} $(DOC_DESTDIR) ';'
  64
  65        dh_movefiles -p git-tk
  66        dh_movefiles -p git-core
  67        find debian/tmp -type d -o -print | sed -e 's/^/? /'
  68
  69binary-arch: build install
  70        dh_testdir
  71        dh_testroot
  72        dh_installchangelogs -a
  73        dh_installdocs -a
  74        dh_strip -a
  75        dh_compress  -a
  76        dh_fixperms -a
  77        dh_perl -a
  78        dh_makeshlibs -a
  79        dh_installdeb -a
  80        dh_shlibdeps -a
  81        dh_gencontrol -a
  82        dh_md5sums -a
  83        dh_builddeb -a
  84
  85binary-indep: build install
  86        dh_testdir
  87        dh_testroot
  88        dh_installchangelogs -i
  89        dh_installdocs -i
  90        dh_compress  -i
  91        dh_fixperms -i
  92        dh_makeshlibs -i
  93        dh_installdeb -i
  94        dh_shlibdeps -i
  95        dh_gencontrol -i
  96        dh_md5sums -i
  97        dh_builddeb -i
  98
  99binary: binary-arch binary-indep
 100
 101.PHONY: build clean binary install clean debian-clean