File: rules

package info (click to toggle)
pakcs 2.1.1-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 2,976 kB
  • sloc: perl: 11,602; lisp: 3,174; sh: 835; makefile: 586
file content (202 lines) | stat: -rwxr-xr-x 13,714 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
#!/usr/bin/make -f
# -*- makefile -*-

VERBOSE=1

DISTPKGINSTALL=yes
CURRYFRONTEND=/usr/bin/curry-frontend
CURRYLIBSDIR=$(CURDIR)/debian/build/curry-libs
CURRYTOOLSDIR=$(CURDIR)/debian/build/curry-tools
PAKCSINSTALLDIR=/usr/lib/pakcs

# Only run unit tests on 64bit architectures for the reason given below.
#
# Quoting... http://www.swi-prolog.org/pldoc/man?section=64bits
#
# First of all, SWI-Prolog's addressing of the Prolog stacks does not
# cover the whole address space due to the use of type tag bits and
# garbage collection flags. On 32-bit hardware the stacks are limited to
# 128 MB each. This tends to be too low for demanding applications on
# modern hardware. On 64-bit hardware the limit is 2^32 times higher,
# exceeding the addressing capabilities of today's CPUs and operating
# systems. This implies Prolog can be started with stack sizes that use
# the full capabilities of your hardware.

ifeq (,$(filter 32,$(DEB_HOST_ARCH_BITS)))
DEB_MAKE_CHECK_TARGET = runtestverbose
else
DEB_MAKE_CHECK_TARGET =
endif
DEB_MAKE_BUILD_TARGET = all DISTPKGINSTALL=$(DISTPKGINSTALL) CURRYFRONTEND=$(CURRYFRONTEND) CURRYLIBSDIR=$(CURRYLIBSDIR) CURRYTOOLSDIR=$(CURRYTOOLSDIR) PAKCSINSTALLDIR=$(PAKCSINSTALLDIR)
DEB_MAKE_CLEAN_TARGET = cleanall

DEB_DH_INSTALLCHANGELOGS_ARGS = RELNOTES.txt

include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/class/makefile.mk

pre-build::
	# obtain lib-trunk folder content...
	if [ ! -d "debian/build/curry-libs" ]; then \
	    mkdir -p debian/build/curry-libs/; \
	    cd debian/build/curry-libs && tar xf /usr/src/curry-libs-source.tar.xz && cd - 1>/dev/null; \
	fi

	# obtain currytools folder content...
	if [ ! -d "debian/build/curry-tools" ]; then \
	    mkdir -p debian/build/curry-tools/; \
	    cd debian/build/curry-tools && tar xf /usr/src/curry-tools-source.tar.xz && cd - 1>/dev/null; \
	fi

	sed -i "$(CURRYTOOLSDIR)/cpm/Makefile" -e "s@packagePath\ =\ .*\"@packagePath\ =\ \\\\\"/usr/lib/pakcs/currytools/cpm\\\\\"\"@"

	# deploy Debianic pakcsinitrc into source tree...
	cp debian/pakcsinitrc .

	# make sure cleancurry is available in PAKCSHOME/bin, required for test suite
	mkdir -p bin/
	ln -fs ../scripts/cleancurry.sh bin/cleancurry

binary-post-install/pakcs::
	chmod a+x debian/pakcs/usr/lib/pakcs/bin/cleancurry
	chmod a+x debian/pakcs/usr/lib/pakcs/bin/pakcs
	chmod a+x debian/pakcs/usr/lib/pakcs/bin/pakcs-fcypp
	chmod a+x debian/pakcs/usr/lib/pakcs/bin/pakcs-makecgi
	chmod a+x debian/pakcs/usr/lib/pakcs/scripts/*.sh
	chmod a+x debian/pakcs/usr/lib/pakcs/scripts/configure-pakcs
	chmod a+x debian/pakcs/usr/lib/pakcs/scripts/makesavedstate

	# unset PAKCSBUILDDIR, only support PAKCSINSTALLDIR
	for script in  debian/pakcs/usr/lib/pakcs/bin/pakcs debian/pakcs/usr/lib/pakcs/bin/pakcs-fcypp debian/pakcs/usr/lib/pakcs/bin/pakcs-makecgi; do \
		sed -i "$$script" -e "s|^PAKCSBUILDDIR=.*$$|PAKCSBUILDDIR=\"<unset>\"|"; \
	done

	# similarly for buildDir Prolog variable
	for script in debian/pakcs/usr/lib/pakcs/src/pakcsversion.pl; do \
		sed -i "$$script" -e "s|buildDir('.*')|buildDir('<unset>')|g"; \
	done

	chmod a-x debian/pakcs/usr/lib/pakcs/scripts/pakcsinitrc.sh

	# remove superfluous LICENSE files
	find debian/pakcs/usr/lib/pakcs/currytools/ -type f -name LICENSE -delete

	cd $(CURDIR)/debian/pakcs/usr/share/doc/pakcs/docs && tar --clamp-mtime --mtime="$(SOURCE_DATE)" --mode=go=rX,u+rw,a-s --sort=name -cv -v -z -f $(CURDIR)/debian/pakcs/usr/share/doc/pakcs/curry-docs.tar.gz * && cd - 1>/dev/null
	rm -Rv debian/pakcs/usr/share/doc/pakcs/docs/

	debian/move2docs_and_symlink.sh usr/lib/pakcs/currytools/README.md
	debian/move2docs_and_symlink.sh usr/lib/pakcs/currytools/cpm/README.md
	debian/move2docs_and_symlink.sh usr/lib/pakcs/currytools/cpm/docs/README.txt
	debian/move2docs_and_symlink.sh usr/lib/pakcs/currytools/cpm/src/CPM/Repository/README.txt
	debian/move2docs_and_symlink.sh usr/lib/pakcs/currytools/cpm/vendor/abstract-curry/README.md
	debian/move2docs_and_symlink.sh usr/lib/pakcs/currytools/cpm/vendor/boxes/README.md
	debian/move2docs_and_symlink.sh usr/lib/pakcs/currytools/cpm/vendor/cass-analysis/README.md
	debian/move2docs_and_symlink.sh usr/lib/pakcs/currytools/cpm/vendor/cass/README.md
	debian/move2docs_and_symlink.sh usr/lib/pakcs/currytools/cpm/vendor/cass/docs/Demand.md
	debian/move2docs_and_symlink.sh usr/lib/pakcs/currytools/cpm/vendor/cass/docs/Deterministic.md
	debian/move2docs_and_symlink.sh usr/lib/pakcs/currytools/cpm/vendor/cass/docs/Functional.md
	debian/move2docs_and_symlink.sh usr/lib/pakcs/currytools/cpm/vendor/cass/docs/Groundness.md
	debian/move2docs_and_symlink.sh usr/lib/pakcs/currytools/cpm/vendor/cass/docs/HiOrderConstr.md
	debian/move2docs_and_symlink.sh usr/lib/pakcs/currytools/cpm/vendor/cass/docs/HiOrderFunc.md
	debian/move2docs_and_symlink.sh usr/lib/pakcs/currytools/cpm/vendor/cass/docs/HiOrderType.md
	debian/move2docs_and_symlink.sh usr/lib/pakcs/currytools/cpm/vendor/cass/docs/Indeterministic.md
	debian/move2docs_and_symlink.sh usr/lib/pakcs/currytools/cpm/vendor/cass/docs/NDEffect.md
	debian/move2docs_and_symlink.sh usr/lib/pakcs/currytools/cpm/vendor/cass/docs/NonDetAllDeps.md
	debian/move2docs_and_symlink.sh usr/lib/pakcs/currytools/cpm/vendor/cass/docs/NonDetDeps.md
	debian/move2docs_and_symlink.sh usr/lib/pakcs/currytools/cpm/vendor/cass/docs/Overlapping.md
	debian/move2docs_and_symlink.sh usr/lib/pakcs/currytools/cpm/vendor/cass/docs/PatComplete.md
	debian/move2docs_and_symlink.sh usr/lib/pakcs/currytools/cpm/vendor/cass/docs/Productive.md
	debian/move2docs_and_symlink.sh usr/lib/pakcs/currytools/cpm/vendor/cass/docs/README.txt
	debian/move2docs_and_symlink.sh usr/lib/pakcs/currytools/cpm/vendor/cass/docs/RequiredValue.md
	debian/move2docs_and_symlink.sh usr/lib/pakcs/currytools/cpm/vendor/cass/docs/RequiredValues.md
	debian/move2docs_and_symlink.sh usr/lib/pakcs/currytools/cpm/vendor/cass/docs/Residuation.md
	debian/move2docs_and_symlink.sh usr/lib/pakcs/currytools/cpm/vendor/cass/docs/RightLinear.md
	debian/move2docs_and_symlink.sh usr/lib/pakcs/currytools/cpm/vendor/cass/docs/RootCyclic.md
	debian/move2docs_and_symlink.sh usr/lib/pakcs/currytools/cpm/vendor/cass/docs/RootReplaced.md
	debian/move2docs_and_symlink.sh usr/lib/pakcs/currytools/cpm/vendor/cass/docs/SensibleType.md
	debian/move2docs_and_symlink.sh usr/lib/pakcs/currytools/cpm/vendor/cass/docs/SiblingCons.md
	debian/move2docs_and_symlink.sh usr/lib/pakcs/currytools/cpm/vendor/cass/docs/SolComplete.md
	debian/move2docs_and_symlink.sh usr/lib/pakcs/currytools/cpm/vendor/cass/docs/Terminating.md
	debian/move2docs_and_symlink.sh usr/lib/pakcs/currytools/cpm/vendor/cass/docs/Total.md
	debian/move2docs_and_symlink.sh usr/lib/pakcs/currytools/cpm/vendor/cass/docs/TypesInValues.md
	debian/move2docs_and_symlink.sh usr/lib/pakcs/currytools/cpm/vendor/cass/docs/UnsafeModule.md
	debian/move2docs_and_symlink.sh usr/lib/pakcs/currytools/cpm/vendor/cdbi/README.md
	debian/move2docs_and_symlink.sh usr/lib/pakcs/currytools/cpm/vendor/csv/README.md
	debian/move2docs_and_symlink.sh usr/lib/pakcs/currytools/cpm/vendor/currypath/README.md
	debian/move2docs_and_symlink.sh usr/lib/pakcs/currytools/cpm/vendor/det-parse/README.md
	debian/move2docs_and_symlink.sh usr/lib/pakcs/currytools/cpm/vendor/execpath/README.md
	debian/move2docs_and_symlink.sh usr/lib/pakcs/currytools/cpm/vendor/finite-map/README.md
	debian/move2docs_and_symlink.sh usr/lib/pakcs/currytools/cpm/vendor/flatcurry/README.md
	debian/move2docs_and_symlink.sh usr/lib/pakcs/currytools/cpm/vendor/frontend-exec/README.md
	debian/move2docs_and_symlink.sh usr/lib/pakcs/currytools/cpm/vendor/json/README.md
	debian/move2docs_and_symlink.sh usr/lib/pakcs/currytools/cpm/vendor/opt-parse/README.md
	debian/move2docs_and_symlink.sh usr/lib/pakcs/currytools/cpm/vendor/profiling/README.md
	debian/move2docs_and_symlink.sh usr/lib/pakcs/currytools/cpm/vendor/propertyfile/README.md
	debian/move2docs_and_symlink.sh usr/lib/pakcs/currytools/cpm/vendor/queue/README.md
	debian/move2docs_and_symlink.sh usr/lib/pakcs/currytools/cpm/vendor/random/README.md
	debian/move2docs_and_symlink.sh usr/lib/pakcs/currytools/cpm/vendor/redblacktree/README.md
	debian/move2docs_and_symlink.sh usr/lib/pakcs/currytools/cpm/vendor/scc/README.md
	debian/move2docs_and_symlink.sh usr/lib/pakcs/currytools/cpm/vendor/socket/README.md
	debian/move2docs_and_symlink.sh usr/lib/pakcs/currytools/cpm/vendor/wl-pprint/README.md
	debian/move2docs_and_symlink.sh usr/lib/pakcs/currytools/cpm/vendor/xml/README.md
	debian/move2docs_and_symlink.sh usr/lib/pakcs/currytools/optimize/.cpm/packages/cass-analysis/README.md
	debian/move2docs_and_symlink.sh usr/lib/pakcs/currytools/optimize/.cpm/packages/cass/README.md
	debian/move2docs_and_symlink.sh usr/lib/pakcs/currytools/optimize/.cpm/packages/cass/docs/Demand.md
	debian/move2docs_and_symlink.sh usr/lib/pakcs/currytools/optimize/.cpm/packages/cass/docs/Deterministic.md
	debian/move2docs_and_symlink.sh usr/lib/pakcs/currytools/optimize/.cpm/packages/cass/docs/Functional.md
	debian/move2docs_and_symlink.sh usr/lib/pakcs/currytools/optimize/.cpm/packages/cass/docs/Groundness.md
	debian/move2docs_and_symlink.sh usr/lib/pakcs/currytools/optimize/.cpm/packages/cass/docs/HiOrderConstr.md
	debian/move2docs_and_symlink.sh usr/lib/pakcs/currytools/optimize/.cpm/packages/cass/docs/HiOrderFunc.md
	debian/move2docs_and_symlink.sh usr/lib/pakcs/currytools/optimize/.cpm/packages/cass/docs/HiOrderType.md
	debian/move2docs_and_symlink.sh usr/lib/pakcs/currytools/optimize/.cpm/packages/cass/docs/Indeterministic.md
	debian/move2docs_and_symlink.sh usr/lib/pakcs/currytools/optimize/.cpm/packages/cass/docs/NDEffect.md
	debian/move2docs_and_symlink.sh usr/lib/pakcs/currytools/optimize/.cpm/packages/cass/docs/NonDetAllDeps.md
	debian/move2docs_and_symlink.sh usr/lib/pakcs/currytools/optimize/.cpm/packages/cass/docs/NonDetDeps.md
	debian/move2docs_and_symlink.sh usr/lib/pakcs/currytools/optimize/.cpm/packages/cass/docs/Overlapping.md
	debian/move2docs_and_symlink.sh usr/lib/pakcs/currytools/optimize/.cpm/packages/cass/docs/PatComplete.md
	debian/move2docs_and_symlink.sh usr/lib/pakcs/currytools/optimize/.cpm/packages/cass/docs/Productive.md
	debian/move2docs_and_symlink.sh usr/lib/pakcs/currytools/optimize/.cpm/packages/cass/docs/README.txt
	debian/move2docs_and_symlink.sh usr/lib/pakcs/currytools/optimize/.cpm/packages/cass/docs/RequiredValue.md
	debian/move2docs_and_symlink.sh usr/lib/pakcs/currytools/optimize/.cpm/packages/cass/docs/RequiredValues.md
	debian/move2docs_and_symlink.sh usr/lib/pakcs/currytools/optimize/.cpm/packages/cass/docs/Residuation.md
	debian/move2docs_and_symlink.sh usr/lib/pakcs/currytools/optimize/.cpm/packages/cass/docs/RightLinear.md
	debian/move2docs_and_symlink.sh usr/lib/pakcs/currytools/optimize/.cpm/packages/cass/docs/RootCyclic.md
	debian/move2docs_and_symlink.sh usr/lib/pakcs/currytools/optimize/.cpm/packages/cass/docs/RootReplaced.md
	debian/move2docs_and_symlink.sh usr/lib/pakcs/currytools/optimize/.cpm/packages/cass/docs/SensibleType.md
	debian/move2docs_and_symlink.sh usr/lib/pakcs/currytools/optimize/.cpm/packages/cass/docs/SiblingCons.md
	debian/move2docs_and_symlink.sh usr/lib/pakcs/currytools/optimize/.cpm/packages/cass/docs/SolComplete.md
	debian/move2docs_and_symlink.sh usr/lib/pakcs/currytools/optimize/.cpm/packages/cass/docs/Terminating.md
	debian/move2docs_and_symlink.sh usr/lib/pakcs/currytools/optimize/.cpm/packages/cass/docs/Total.md
	debian/move2docs_and_symlink.sh usr/lib/pakcs/currytools/optimize/.cpm/packages/cass/docs/TypesInValues.md
	debian/move2docs_and_symlink.sh usr/lib/pakcs/currytools/optimize/.cpm/packages/cass/docs/UnsafeModule.md
	debian/move2docs_and_symlink.sh usr/lib/pakcs/currytools/optimize/.cpm/packages/csv/README.md
	debian/move2docs_and_symlink.sh usr/lib/pakcs/currytools/optimize/.cpm/packages/currypath/README.md
	debian/move2docs_and_symlink.sh usr/lib/pakcs/currytools/optimize/.cpm/packages/finite-map/README.md
	debian/move2docs_and_symlink.sh usr/lib/pakcs/currytools/optimize/.cpm/packages/flatcurry/README.md
	debian/move2docs_and_symlink.sh usr/lib/pakcs/currytools/optimize/.cpm/packages/frontend-exec/README.md
	debian/move2docs_and_symlink.sh usr/lib/pakcs/currytools/optimize/.cpm/packages/propertyfile/README.md
	debian/move2docs_and_symlink.sh usr/lib/pakcs/currytools/optimize/.cpm/packages/queue/README.md
	debian/move2docs_and_symlink.sh usr/lib/pakcs/currytools/optimize/.cpm/packages/random/README.md
	debian/move2docs_and_symlink.sh usr/lib/pakcs/currytools/optimize/.cpm/packages/redblacktree/README.md
	debian/move2docs_and_symlink.sh usr/lib/pakcs/currytools/optimize/.cpm/packages/scc/README.md
	debian/move2docs_and_symlink.sh usr/lib/pakcs/currytools/optimize/.cpm/packages/socket/README.md
	debian/move2docs_and_symlink.sh usr/lib/pakcs/currytools/optimize/.cpm/packages/wl-pprint/README.md
	debian/move2docs_and_symlink.sh usr/lib/pakcs/currytools/optimize/.cpm/packages/xml/README.md
	debian/move2docs_and_symlink.sh usr/lib/pakcs/currytools/optimize/README.txt
	debian/move2docs_and_symlink.sh usr/lib/pakcs/currytools/optimize/docs/README.txt
	debian/move2docs_and_symlink.sh usr/lib/pakcs/testsuite/README
	debian/move2docs_and_symlink.sh usr/lib/pakcs/tools/README
	debian/move2docs_and_symlink.sh usr/lib/pakcs/tools/emacs/README
	debian/move2docs_and_symlink.sh usr/lib/pakcs/tools/gedit/README.md

	rdfind -makesymlinks true "$(CURDIR)/debian/pakcs/usr/share/doc/pakcs/"
	symlinks -rc "$(CURDIR)/debian/pakcs/usr/share/doc/pakcs/"

clean::
	-rm -R bin/
	-rm -R currytools/
	-rm -R debian/build/
	-rm  scripts/makesavedstate

get-orig-source:
	uscan --noconf --force-download --rename --download-current-version --destdir=..