File: rules

package info (click to toggle)
tcltrf 2.1.4-dfsg3-1
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 9,628 kB
  • sloc: ansic: 73,134; sh: 3,155; tcl: 1,343; makefile: 176; exp: 22
file content (113 lines) | stat: -rwxr-xr-x 3,489 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
#!/usr/bin/make -f
# -*- makefile -*-

version = 2.1.4
cvsdate = 20071113

DIR=$(CURDIR)/debian/tmp

DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/buildflags.mk
include /usr/share/dpkg/architecture.mk

%:
	dh $@

override_dh_auto_clean:
	[ ! -f Makefile ] || $(MAKE) distclean
	rm -f test.setup

override_dh_auto_configure:
	CFLAGS="$(CFLAGS) -DSSL_STATIC_BUILD=1 -D_XOPEN_SOURCE" \
	SHLIB_SUFFIX=.so \
	no_zlibtcl=true \
	dh_auto_configure -- \
		--with-tcl=/usr/lib \
		--with-tclinclude=/usr/include/tcl \
		--enable-static-zlib \
		--enable-static-bzlib \
		--enable-static-md5 \
		--enable-threads

override_dh_auto_build:
	$(MAKE) LIBS="-lz -lbz2 -lcrypt -lcrypto"

override_dh_auto_install:
	$(MAKE) install DESTDIR=$(DIR)
	install -m 755 -d $(DIR)/usr/lib/tcltk/$(DEB_HOST_MULTIARCH)
	mv $(DIR)/usr/lib/$(DEB_HOST_MULTIARCH)/Trf* $(DIR)/usr/lib/tcltk/$(DEB_HOST_MULTIARCH)
	#
	mkdir -p $(DIR)/usr/share/doc/html $(DIR)/usr/share/doc/man
	# Cleanup manpages
	cd doc/man && \
	  for f in *.n ; do \
	    sed -e'/^\.so man.macros/ d' \
	    	-e'/^\.BS/ d' \
	    	-e'/^\.BE/ d' \
	    	-e's/^\.TH \([^ ]\+\) n/.TH \1 3trf/' \
		$$f >$(DIR)/usr/share/doc/man/`basename $$f .n`.3trf || exit 1; \
	  done
	#
	# Cleanup docs
	cd doc/html && \
	  for f in *.html ; do \
	    sed -e's/(n)/(3trf)/g' $$f >$(DIR)/usr/share/doc/html/$$f || exit 1; \
	  done
	#
	# c2man is outdated and removed from Debian. So, a pregenerated manpages
	# and HTML docs are used.
	# A liitle hack to make c2man working
	#cd generic && c2man -D__builtin_va_list=int -DBUFSIZ -I/usr/include/tcl -o../doc/capi/man -Tn transform.h
	#cd generic && c2man -D__builtin_va_list=int -DBUFSIZ -I/usr/include/tcl -o../doc/capi/html -Th transform.h
	#
	# Generate documentation indices
	tclsh debian/gen_index.tcl $(DIR)/usr/share/doc/html doc/capi/html \
	      >$(DIR)/usr/share/doc/html/index.html

override_dh_auto_test:
	# make test doesn't work currently.

override_dh_shlibdeps:
	tcltk-depends -a
	dh_shlibdeps -a

get-orig-source: get-orig-source-release

get-orig-source-release:
	CURDIR=`pwd` && TMPDIR=`mktemp -d /tmp/tcltrf.XXXXXX` && \
	cd $$TMPDIR && \
	wget -O - http://heanet.dl.sourceforge.net/sourceforge/tcltrf/trf$(version).tar.gz | tar zx && \
	rm -rfv trf$(version)/generic/haval \
		trf$(version)/generic/haval.1996 \
		trf$(version)/generic/ripemd \
		trf$(version)/win/msvcrt.dll \
		trf$(version)/doc/painless-guide-to-crc.txt && \
	tar -zcf $$CURDIR/tcltrf_$(version)-dfsg3.orig.tar.gz trf$(version) && \
	rm -rf $$TMPDIR

get-orig-source-cvs:
	CURDIR=`pwd` && \
	TMPDIR=`mktemp -d /tmp/tcltrf.XXXXXX` && \
	SCRDIR=`dirname $(MAKEFILE_LIST)` && \
	expect $$SCRDIR/checkout \
	       :pserver:anonymous@tcltrf.cvs.sourceforge.net:/cvsroot/tcltrf \
	       trf \
	       $$TMPDIR "$(cvsdate)T23:59:59" && \
	echo "Removing CVS stuff and non-free files" && \
	find $$TMPDIR -name '*.orig' \
		      -o -name CVS \
		      -o -name msvcrt.dll \
		      -o -name mpexpand \
		      -o -name patches \
		      -o -name zlib.vc \
		      -o -name painless-guide-to-crc.txt \
		      -o -name haval \
		      -o -name haval.1996 \
		      -o -name ripemd \
		      -o -name mails | xargs rm -rvf && \
	cd $$TMPDIR && \
	tar -zcf $$CURDIR/tcltrf_$(version)~$(cvsdate)-dfsg3.orig.tar.gz . && \
	rm -rf $$TMPDIR

.PHONY: override_dh_auto_clean override_dh_auto_configure override_dh_auto_install override_dh_auto_test \
	override_dh_shlibdeps get-orig-source get-orig-source-release get-orig-source-cvs