File: rules

package info (click to toggle)
haskell-intern 0.9.1.4-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 156 kB
  • ctags: 10
  • sloc: haskell: 933; makefile: 23
file content (59 lines) | stat: -rwxr-xr-x 2,474 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#!/usr/bin/make -f
# -*- mode: makefile; coding: utf-8 -*-
# Copyright © 2013-2016 Jonas Smedegaard <dr@jones.dk>
# Description: Main Debian packaging script for intern
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.

include /usr/share/cdbs/1/rules/upstream-tarball.mk
include /usr/share/cdbs/1/rules/utils.mk
include /usr/share/cdbs/1/rules/debhelper.mk
-include /usr/share/cdbs/1/class/hlibrary.mk

DEB_UPSTREAM_PACKAGE = intern
DEB_UPSTREAM_URL = http://hackage.haskell.org/packages/archive/$(DEB_UPSTREAM_PACKAGE)/$(DEB_UPSTREAM_TARBALL_VERSION)

# Build-depend unversioned on debhelper
#  TODO: Drop when adopted in cdbs
CDBS_BUILD_DEPENDS_rules_debhelper_v9 = debhelper

# helper macros used below
expand-ghc-dep = $(comma) libghc-$2-$1 $(if $3,($3 $4)$(if $5,$(comma) libghc-$2-$1 ($5 $6)))
strip-ghc-deps = $(foreach dep,$2,$(call expand-ghc-dep,$1,$(word 1,$(subst $(comma),$(space),$(dep)))))
expand-ghc-deps = $(foreach dep,$2,$(call expand-ghc-dep,$1,$(word 1,$(subst $(comma),$(space),$(dep))),$(word 2,$(subst $(comma),$(space),$(dep))),$(word 3,$(subst $(comma),$(space),$(dep))),$(word 4,$(subst $(comma),$(space),$(dep))),$(word 5,$(subst $(comma),$(space),$(dep)))))

# Needed by upstream build
ghc-deps += text,<<,1.3
ghc-deps += hashable,<<,1.3
ghc-deps += unordered-containers,<<,0.3
#ghc-deps += intern,<<,1.0
bdeps = ghc
bdeps +=, $(call expand-ghc-deps,dev,$(ghc-deps))

# Needed by upstream profiling build
bdeps-prof = ghc-prof
bdeps-prof +=, $(call strip-ghc-deps,prof,$(ghc-deps))

# Needed by upstream documentation build
bdeps-indep = ghc-doc
bdeps-indep +=, $(call strip-ghc-deps,doc,$(ghc-deps))

# Needed for our packaging
bdeps +=, haskell-devscripts

# TODO: actually use CDBS_BUILD_DEPENDS_INDEP, instead of hardcoding
CDBS_BUILD_DEPENDS +=, $(bdeps), $(bdeps-prof)
CDBS_BUILD_DEPENDS_INDEP +=, $(bdeps-indep)

DEB_INSTALL_EXAMPLES_libghc-intern-dev = examples/*