File: rules

package info (click to toggle)
xmobar 0.24.3-2
  • links: PTS, VCS
  • area: main
  • in suites:
  • size: 1,152 kB
  • ctags: 15
  • sloc: haskell: 4,658; makefile: 46; sh: 38
file content (40 lines) | stat: -rwxr-xr-x 1,060 bytes parent folder | download
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
#!/usr/bin/make -f
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

DEB_HOST_ARCH := $(shell dpkg-architecture -qDEB_HOST_ARCH)
DEB_HOST_ARCH_OS := $(shell dpkg-architecture -qDEB_HOST_ARCH_OS)

CONFIGURE_OPTS = --ghc-options="-optl -Wl,-z,relro -optl -Wl,-z,now -optl -Wl,--as-needed"

ifneq ($(DEB_HOST_ARCH), arm64)
    WITH_CONDUIT="with_conduit"
else
    WITH_CONDUIT=""
endif

ifeq ($(DEB_HOST_ARCH_OS),linux)
    CONFIGURE_OPTS += --flags="with_xft with_inotify with_iwlib with_mpris with_dbus with_xpm with_uvmeter $(WITH_CONDUIT)"
else
    CONFIGURE_OPTS += --flags="with_xft with_xpm"
endif

%:
	dh $@

override_dh_auto_configure:
	ghc --make Setup.*hs -o setup-ghc
	./setup-ghc configure --ghc --prefix=/usr $(CONFIGURE_OPTS)

override_dh_auto_build:
	./setup-ghc build

override_dh_auto_install:
	./setup-ghc copy --destdir=debian/tmp/

override_dh_auto_clean:
	-./setup-ghc clean
	-rm -f Setup.o Setup.hi setup-ghc

.PHONY: override_dh_auto_configure override_dh_auto_build \
        override_dh_auto_install override_dh_auto_clean