File: rules

package info (click to toggle)
slib 3b6-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye
  • size: 5,192 kB
  • sloc: lisp: 29,798; makefile: 1,180; sh: 953
file content (50 lines) | stat: -rwxr-xr-x 1,809 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
#!/usr/bin/make -f

export PERL_HASH_SEED = 0

TEXI2HTML = texi2html --init-file debian/texi2html.rc --split chapter --verbose

%:
	dh $@

# configure script does not accept usual --build, etc. options.
# Scheme sources should be installed in /usr/share not /usr/lib.
override_dh_auto_configure:
	./configure --prefix=/usr --libdir=/usr/share

override_dh_auto_build:
	touch clrnamdb.scm  # clrnamdb.scm does not need to be rebuilt
	dh_auto_build
	$(MAKE) slib.info
	$(MAKE) TEXI2HTML="$(TEXI2HTML)" html

override_dh_install:
	dh_install
# 	Remove unwanted info/dir.gz
	rm -f debian/slib/usr/share/info/dir*
# 	Remove configure script, etc. installed by upstream makefile
	for i in configure slib.sh syncase.sh Makefile slib.nsi slib.spec; do \
	  rm -f debian/slib/usr/share/slib/$$i; \
	done
# 	Generate slibcat under /var/lib/slib for each supported Scheme
	for i in gambc chez mitscheme; do \
	  mkdir -p debian/slib/var/lib/slib/$$i; \
	done
# 	Generate slibcat for Gambit
	SCHEME_LIBRARY_PATH=$(CURDIR)/debian/slib/usr/share/slib/ \
	  GAMBIT_IMPLEMENTATION_PATH=debian/slib/var/lib/slib/gambc/ \
	  gsi -f gambit.init -e "(require 'new-catalog)"
#	Generate slibcat for Chez
	echo "(require 'new-catalog)" | \
	  SCHEME_LIBRARY_PATH=$(CURDIR)/debian/slib/usr/share/slib/ \
	  CHEZ_IMPLEMENTATION_PATH=debian/slib/var/lib/slib/chez/ \
	  chezscheme -q chez.init
#	Generate slibcat for MIT Scheme
	echo "(require 'new-catalog)" | \
	  SCHEME_LIBRARY_PATH=$(CURDIR)/debian/slib/usr/share/slib/ \
	  MITSCHEME_IMPLEMENTATION_PATH=debian/slib/var/lib/slib/mitscheme/ \
	  mit-scheme --batch-mode --no-init-file --load mitscheme.init
#	Strip the temporary DESTDIR from the slibcat paths
	for i in gambc chez mitscheme; do \
	  sed -i 's|$(CURDIR)/debian/slib||' debian/slib/var/lib/slib/$$i/slibcat; \
	done