0 | 0 |
#!/usr/bin/make -f
|
1 | 1 |
# Uncomment this to turn on verbose mode.
|
2 | 2 |
#export DH_VERBOSE=1
|
3 | |
|
4 | |
# Find ghc. The ghc in the path might point to some other version of
|
5 | |
# GHC, so use ghc6 if it exists (which it ought to when building for
|
6 | |
# Debian)
|
7 | |
GHC := $(firstword $(shell bash -c "type -p ghc6 ghc"))
|
8 | 3 |
|
9 | 4 |
DEB_HOST_ARCH_OS := $(shell dpkg-architecture -qDEB_HOST_ARCH_OS)
|
10 | 5 |
|
|
14 | 9 |
CONFIGURE_OPTS += --flags="with_xft"
|
15 | 10 |
endif
|
16 | 11 |
|
17 | |
build: build-arch build-indep
|
18 | |
build-arch: build-stamp
|
19 | |
build-indep: build-stamp
|
20 | |
build-stamp:
|
21 | |
dh_testdir
|
|
12 |
%:
|
|
13 |
dh $@
|
22 | 14 |
|
23 | |
$(GHC) --make Setup.*hs -o setup-ghc
|
24 | |
./setup-ghc configure --ghc --with-compiler=$(GHC) --prefix=/usr $(CONFIGURE_OPTS)
|
|
15 |
override_dh_auto_configure:
|
|
16 |
ghc --make Setup.*hs -o setup-ghc
|
|
17 |
./setup-ghc configure --ghc --prefix=/usr $(CONFIGURE_OPTS)
|
|
18 |
|
|
19 |
override_dh_auto_build:
|
25 | 20 |
./setup-ghc build
|
26 | 21 |
|
27 | |
touch $@
|
|
22 |
override_dh_auto_install:
|
|
23 |
./setup-ghc copy --destdir=debian/tmp/
|
28 | 24 |
|
29 | |
install: install-stamp
|
30 | |
install-stamp: build-stamp
|
31 | |
dh_testdir
|
32 | |
dh_testroot
|
33 | |
dh_prep
|
34 | |
dh_installdirs
|
35 | |
|
36 | |
./setup-ghc copy --destdir=debian/tmp/
|
37 | |
rm -rf debian/tmp/usr/share/xmobar-* debian/tmp/usr/share/doc/xmobar-*
|
38 | |
find debian/tmp/usr/bin -type f > debian/xmobar.install
|
39 | |
find debian/tmp -type d -empty >> debian/xmobar.install
|
40 | |
|
41 | |
touch $@
|
42 | |
|
43 | |
clean:
|
44 | |
dh_testdir
|
45 | |
dh_testroot
|
46 | |
rm -f build-stamp install-stamp binary-common-stamp
|
47 | |
|
|
25 |
override_dh_auto_clean:
|
48 | 26 |
-./setup-ghc clean
|
49 | 27 |
-rm -f Setup.o Setup.hi setup-ghc
|
50 | |
-rm -f debian/*.install
|
51 | 28 |
|
52 | |
dh_clean
|
53 | |
|
54 | |
# Build architecture-dependent files here.
|
55 | |
binary-common: binary-common-stamp
|
56 | |
binary-common-stamp: install-stamp
|
57 | |
dh_testdir
|
58 | |
dh_testroot
|
59 | |
dh_installchangelogs
|
60 | |
dh_installdocs
|
61 | |
dh_installexamples
|
62 | |
dh_install --fail-missing
|
63 | |
|
64 | |
dh_installman debian/xmobar.1
|
65 | |
dh_strip
|
66 | |
dh_fixperms
|
67 | |
dh_installdeb
|
68 | |
dh_shlibdeps
|
69 | |
dh_gencontrol
|
70 | |
dh_compress
|
71 | |
dh_md5sums
|
72 | |
dh_builddeb
|
73 | |
|
74 | |
# binary-indep and binary-arch both build everything, as otherwise
|
75 | |
# # "dh_install --fail-missing" falls over
|
76 | |
|
77 | |
# Build architecture-independent files here.
|
78 | |
binary-indep: binary-common-stamp
|
79 | |
# We have nothing to do by default.
|
80 | |
|
81 | |
# Build architecture-dependent files here.
|
82 | |
binary-arch: binary-common-stamp
|
83 | |
|
84 | |
binary: binary-indep binary-arch
|
85 | |
.PHONY: build clean binary-indep binary-arch binary-common binary install
|
|
29 |
.PHONY: override_dh_auto_configure override_dh_auto_build \
|
|
30 |
override_dh_auto_install override_dh_auto_clean
|