blob: 9760d02c40d762db1091fc73e0495d8a8f35c88b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
#! /usr/bin/make -f
# Made with the aid of dh_make, by Craig Small
# debian/rules that uses debhelper. GNU copyright 1997 by Joey Hess.
# Some lines taken from debmake, by Cristoph Lameter.
# Largely rewritten for the Cabalised happy by Ian Lynagh in 2006.
# Largely rewritten for cdbs and hlibrary.mk by Iain Lane in 2009.
DEB_BUILD_DEPENDENCIES = build-arch
include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/class/hlibrary.mk
include /usr/share/cdbs/1/rules/utils.mk
include /usr/share/cdbs/1/rules/patchsys-quilt.mk
clean::
[ ! -f doc/config.mk ] || $(MAKE) -C doc clean
rm -f debian/get_version.o debian/get_version.hi debian/get_version
rm -f doc/happy.1
rm -rf out
# Hacks:
rm -f doc/config.log doc/config.status doc/config.mk
configure/happy::
# doc/configure is not shipped, generate it
cd doc && autoconf && rm -r autom4te.cache && ./configure --prefix=/usr
# make directory for the templates
[ -d out ] || mkdir out
# used in build to stick version into man page
ghc6 --make debian/get_version.hs -o debian/get_version
build/happy:: build-ghc6-stamp
$(MAKE) -C doc html
sed -e "s#@LIBDIR@#/usr/share/happy-`debian/get_version`#g" \
-e "s#@DOCDIR@#/usr/share/doc/happy#g" \
-e "s#@VERSION@#`debian/get_version`#g" \
doc/happy.1.in > doc/happy.1
# install templates to appropriate directory
binary-post-install/happy::
rm -f $(CURDIR)/out/*bak
mkdir -p $(CURDIR)/debian/happy/usr/share/happy-`debian/get_version`/
cp $(CURDIR)/out/* $(CURDIR)/debian/happy/usr/share/happy-`debian/get_version`/
|