File: rules

package info (click to toggle)
alex 3.5.4.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 824 kB
  • sloc: haskell: 4,772; makefile: 148; yacc: 56; ansic: 4
file content (32 lines) | stat: -rwxr-xr-x 928 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
#!/usr/bin/make -f
# debian/rules for alex
# This file is public domain software, originally written by Joey Hess.
# Adapted for alex by Ian Lynagh.
# Largely rewritten for cdbs and hlibrary.mk by Joachim Breitner in 2009.

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

DEB_BUILD_DEPENDENCIES = build-arch

export DEB_ENABLE_TESTS = yes

ifneq (,$(filter stage1,$(DEB_BUILD_PROFILES)))
export DEB_SETUP_GHC_CONFIGURE_ARGS := --with-alex=/bin/true
endif

execute_after_dh_auto_build-arch:
	# used in build to stick version into man page
	ghc --make debian/get_version.hs -o debian/get_version

	sed -e "s#@LIBDIR@#/usr/lib/alex-`debian/get_version`#g" \
	    -e "s#@DOCDIR@#/usr/share/doc/alex#g" \
	    -e "s#@VERSION@#`debian/get_version`#g" \
	  debian/alex.1.in > debian/alex.1

# Set the path for the alex binary, used by
# tests/Makefile to run tests.
export ALEX = ../dist-ghc/build/alex/alex

%:
	dh $@