File: rules

package info (click to toggle)
tuxmath 2.0.3-10
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 19,488 kB
  • sloc: ansic: 18,791; sh: 4,416; makefile: 778; xml: 51; sed: 16
file content (40 lines) | stat: -rwxr-xr-x 1,750 bytes parent folder | download | duplicates (3)
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

PKG=tuxmath

%:
	dh $@

override_dh_auto_configure:
	dh_auto_configure -- \
                          --host=$(DEB_HOST_GNU_TYPE) \
                          --build=$(DEB_BUILD_GNU_TYPE) \
                          --prefix=/usr \
                          --mandir=\$${prefix}/share/man \
                          --infodir=\$${prefix}/share/info \
                          --bindir=\$${prefix}/lib/tuxmath

override_dh_auto_install:
	dh_auto_install --destdir=$(CURDIR)/debian/tmp

override_dh_install:
	dh_install -X*.ico -X*.icns

override_dh_installchangelogs:
	dh_installchangelogs doc/changelog

MAN_NAME=a math game for kids with Tux
tuxmath.6:
	help2man --no-discard-stderr --no-info --name="$(MAN_NAME)" src/tuxmath > $@
	perl -0 \
             -E 's{\s+(It was generated by help2man)}{ $$1};      # correct help2man comment'                  \
             -E 's{^Tux,}{$(MAN_NAME)};                           # correct DESCRIPTION section'               \
             -E 's{^\.PP\s*Run the game with:}{\n.SH OPTIONS}sm;  # create OPTIONS section'                    \
             -E 's{^(\\fB\\-\\-)}{.TP\n$$1}mg;                    # prepend each option with .TP'              \
             -E 's{\\fR(?:\s\w+)?\K\s*\\-\s*}{\n}mg;              # separate options and their descriptions'   \
             -E 's{^.IP\s*(?!\\)}{}smg;                           # merge short lines'                         \
             -E 's{^([a-z\\-]+:\s)}{    $$1}mg;                   # pad list elements'                         \
             -E 's{^\.PP\s*\.TP}{.TP}mg;                          # clean-up redundant .PP before .TP'         \
          -pi $@