File: rules

package info (click to toggle)
tclvfs 1.4.2~20121213-2
  • links: PTS
  • area: main
  • in suites: bookworm, bullseye, buster, stretch
  • size: 1,872 kB
  • ctags: 768
  • sloc: tcl: 7,437; ansic: 1,768; sh: 193; makefile: 55; exp: 12
file content (74 lines) | stat: -rwxr-xr-x 2,105 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
#!/usr/bin/make -f

version = 1.4.2
cvsdate = 20121213
reldate = 20080503
DIR = $(shell pwd)/debian/tcl-vfs

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

ifeq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
	CFLAGS += -O0
else
	CFLAGS += -O2
endif
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
	INSTALL_PROGRAM += -s
endif

%:
	dh $@

override_dh_auto_configure:
	dh_auto_configure -- \
			  --with-tcl=/usr/lib \
			  --enable-threads

override_dh_auto_install:
	# Install the package into debian/tcl-vfs.
	$(MAKE) install-binaries install-libraries DESTDIR=$(DIR)
	# Remove #! from non-executable files
	for f in fishvfs.tcl templatevfs.tcl ; do \
	    sed -i -e'1d' $(DIR)/usr/lib/$(DEB_HOST_MULTIARCH)/vfs*/template/$$f || exit 1 ; \
	done
	# Move the library into the multiarch dir
	install -m 755 -d $(DIR)/usr/lib/tcltk/$(DEB_HOST_MULTIARCH)
	mv $(DIR)/usr/lib/$(DEB_HOST_MULTIARCH)/vfs* $(DIR)/usr/lib/tcltk/$(DEB_HOST_MULTIARCH)
	# Remove empty directories
	find $(DIR)/ -empty -prune -exec rmdir \{\} \;
	# Cleanup manpages
	cd doc && \
	for f in *.n ; do \
	    sed -e'/^\.so man.macros/ d' \
	    	-e'/^\.B[SE]$$/ d' \
	    	-e's/^\.TH \([^ ]\+\) n/.TH \1 3tcl/' \
		$$f >$$(basename $$f .n).3tcl || exit 1; \
	done

override_dh_auto_test:
	# Disable tests

override_dh_shlibdeps:
	tcltk-depends
	dh_shlibdeps

get-orig-source: get-orig-source-cvs

get-orig-source-release:
	wget -O tclvfs_$(version)-$(reldate).orig.tar.gz \
		http://heanet.dl.sourceforge.net/sourceforge/tclvfs/tclvfs-$(reldate).tar.gz 

get-orig-source-cvs:
	CURDIR=`pwd` && \
	TMPDIR=`mktemp -d /tmp/tclvfs.XXXXXX` && \
	SCRDIR=`dirname $(MAKEFILE_LIST) | head -n1` && \
	expect $$SCRDIR/checkout $$TMPDIR "$(cvsdate)T23:59:59" && \
	find $$TMPDIR -name CVS -print | xargs rm -rf && \
	cd $$TMPDIR && \
	tar -zcf $$CURDIR/tclvfs_$(version)~$(cvsdate).orig.tar.gz . && \
	rm -rf $$TMPDIR

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