File: rules

package info (click to toggle)
slang2 2.3.2-5
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 10,864 kB
  • sloc: ansic: 100,108; sh: 3,373; makefile: 1,044; pascal: 143
file content (62 lines) | stat: -rwxr-xr-x 2,025 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
#!/usr/bin/make -f

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

# Add -O0 to workaround 675125, a bug that appeared with gcc-4.7.
# Probably to do with uninitialized memory somewhere ?
# "src/tests/sltest ./utf8" triggers the bug; works fine in UTF-8 mode, fails otherwise.
# - amck, 2012-06-30

CFLAGS:= $(CFLAGS) -D_XOPEN_SOURCE=500 $(CPPFLAGS) -O0 -fsigned-char

# #890545:
OBJDIR:=src/objs
ifeq ($(ARCH), x32)
  OBJDIR:=src/x32objs
endif

# Magic debhelper rule
%:
	dh $@ --no-parallel

override_dh_auto_configure:
	cd autoconf \
        && autoconf \
        && mv configure ..
	dh_auto_configure -- --libdir=\$${prefix}/lib/${DEB_HOST_MULTIARCH}

override_dh_auto_build:
	dh_auto_build
	${MAKE} -C src static
	ar cqv libslang_pic.a `LC_ALL=C ls src/elfobjs/*.o`
	INSTANT_OPT=" " docbook-to-man debian/slsh.sgml > slsh.1

override_dh_auto_clean:
	dh_auto_clean
	rm -f slsh.1 libslang_pic.a src/test/sltest

override_dh_auto_install:
	dh_auto_install --no-parallel
	cp  /usr/share/unicode/EastAsianWidth.txt utf8/tools
	cp /usr/share/unicode/UnicodeData.txt utf8/tools
	cp src/slang.ver debian/libslang2-pic/usr/lib/libslang_pic.map
	mkdir -p debian/tmp/usr/lib/${DEB_HOST_MULTIARCH}
	cp -a ${OBJDIR}/libslang.a debian/tmp/usr/lib/${DEB_HOST_MULTIARCH}
	ln -sf /usr/lib/${DEB_HOST_MULTIARCH}/libslang.so.2 debian/tmp/usr/lib/${DEB_HOST_MULTIARCH}/libslang.so
	chrpath -d debian/tmp/usr/lib/${DEB_HOST_MULTIARCH}/slang/v2/modules/*.so
	chrpath -d debian/tmp/usr/bin/slsh
	mkdir -p debian/libslang2-modules/usr/lib/${DEB_HOST_MULTIARCH}/slang/v2/modules
	mv debian/tmp/usr/lib/*/slang/v2/modules/* debian/libslang2-modules/usr/lib/${DEB_HOST_MULTIARCH}/slang/v2/modules

override_dh_installchangelogs:
	dh_installchangelogs -a changes.txt

override_dh_makeshlibs:
	dh_makeshlibs -a -V --add-udeb="libslang2-udeb"

override_dh_gencontrol:
	dh_gencontrol -- -VBuilt-Using="`dpkg-query -f'$${source:Package} (= $${source:Version})' -W unicode-data`"

override_dh_compress:
	dh_compress -a -X.sl -X.c -X.h