git.iko.soy/typeable/pandoc
on 4eec413 help sign in
122 lines 2.7 kB history raw
1#!/usr/bin/make -f
2#
3# debian/rules for pandoc.
4# Copyright © 2006 Recai Oktaş <roktasATdebian.org>
5#
6# This file is based on John Goerzen's Cabal Debian template.
7# See http://www.n-heptane.com/nhlab/repos/cabalDebianTemplate/
8#
9# Licensed under the GNU General Public License, version 2.
10# See the file 'http://www.gnu.org/copyleft/gpl.txt'.
12THIS := $(shell sed -ne 's/^Source: \(.*\)/\1/p' debian/control)
13PREFIX := /usr
14DESTDIR := debian/$(THIS)
16# Uncomment this to turn on verbose mode.
17#export DH_VERBOSE=1
19ifeq (1,$(DH_VERBOSE))
20HCFLAGS+=-v
21endif
23# Handle noopt in DEB_BUILD_OPTIONS. Emulate CFLAGS (as HCFLAGS).
24ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
25HCFLAGS+=-O0
26else
27# No optimisation seems optimum.
28HCFLAGS+=-O0
29endif
31# Export all variables which will be used in various stages of build process.
32export PREFIX DESTDIR HCFLAGS
34configure: configure-stamp
35configure-stamp:
36 dh_testdir
37 $(MAKE) configure
39 touch configure-stamp
41build: build-stamp
42build-stamp: configure-stamp
43 dh_testdir
45 touch build-stamp
47clean:
48 dh_testdir
49 dh_testroot
50 $(MAKE) clean
51 rm -rf setup Setup.hi Setup.ho Setup.o .*config* dist html
52 rm -f build-stamp configure-stamp
54 dh_clean
56install: build
57 dh_testdir
58 dh_testroot
59 dh_clean -k
60 dh_installdirs -a
62 dh_haskell -a
64 # Hack! Cabal builds executables while building libraries. Move these
65 # files to top dir where the Makefile install target expects to find.
66 # See "BUGS" section at the following document:
67 # http://www.n-heptane.com/nhlab/repos/cabalDebianTemplate/INSTRUCTIONS.txt
68 find debian/libghc6-$(THIS)-dev -type d -name 'bin' -true | \
69 while read bin; do mv $$bin/* .; rm -rf $$bin; done
70 $(MAKE) install-program
72build-indep: build-indep-stamp
73build-indep-stamp:
74 dh_testdir
75 $(MAKE) build-lib-doc
77install-indep: build-indep
78 dh_testdir
79 dh_testroot
80 dh_clean -k
81 dh_installdirs -i
83 dh_haskell -i
85# Build architecture-independent files here.
86binary-indep: build-indep install-indep
87 dh_testdir
88 dh_testroot
89 dh_installchangelogs -i
90 dh_installdocs -i
91 dh_installexamples -i
92 dh_installman -i
93 dh_link -i
94 dh_strip -i
95 dh_compress -i
96 dh_fixperms -i
97 dh_installdeb -i
98 dh_shlibdeps -i
99 dh_gencontrol -i
100 dh_md5sums -i
101 dh_builddeb -i
103# Build architecture-dependent files here.
104binary-arch: build install
105 dh_testdir
106 dh_testroot
107 dh_installchangelogs -a
108 dh_installdocs -a
109 dh_installexamples -a
110 dh_installman -a
111 dh_link -a
112 dh_strip -a -Xhtml2 -Xmarkdown2 -Xlatex2
113 dh_compress -a
114 dh_fixperms -a
115 dh_installdeb -a
116 dh_shlibdeps -a
117 dh_gencontrol -a
118 dh_md5sums -a
119 dh_builddeb -a
121binary: binary-indep binary-arch
122.PHONY: build clean binary-indep binary-arch binary install build-indep install-indep