File: rules

package info (click to toggle)
tclthread3 3.0.1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, trixie
  • size: 1,752 kB
  • sloc: ansic: 8,253; tcl: 1,711; sh: 436; makefile: 38
file content (56 lines) | stat: -rwxr-xr-x 1,353 bytes parent folder | download | duplicates (2)
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
#!/usr/bin/make -f

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

PDIR=$(CURDIR)/debian/tclthread3

%:
	dh $@

override_dh_auto_clean:
	dh_auto_clean
	#
	# Remove installed files
	rm -rf $(PDIR)
	rm -f threadUuid.h

override_dh_auto_configure:
	dh_auto_configure -- \
		    --host=$(DEB_HOST_GNU_TYPE) \
		    --build=$(DEB_BUILD_GNU_TYPE) \
		    --prefix=/usr \
		    --mandir=\$${prefix}/share/man \
		    --infodir=\$${prefix}/share/info \
		    --with-tcl=/usr/lib/tcl9.0 \
		    --disable-zipfs \
		    --enable-threads

override_dh_auto_install:
	$(MAKE) install DESTDIR=$(PDIR)
	install -m 755 -d $(PDIR)/usr/lib/tcltk
	mv $(PDIR)/usr/lib/$(DEB_HOST_MULTIARCH) $(PDIR)/usr/lib/tcltk
	#
	mv $(PDIR)/usr/include/tclThread.h $(PDIR)/usr/include/tclThread3.h
	#
	# fix up files permissions
	chmod -R u+w $(PDIR)
	#
	# cleanup manpages
	mv $(PDIR)/usr/share/man/mann $(PDIR)/usr/share/man/man3
	cd $(PDIR)/usr/share/man/man3 && \
	  for f in *.n ; do \
	    sed -e's/^\.TH \([^ ]\+\) n/.TH \1 3tcl/' \
		$$f > `basename $$f .n`3.3tcl; \
	    rm $$f; \
	  done
	#
	# remove empty directories
	find $(PDIR) -empty -prune -exec rmdir \{\} \;

override_dh_compress:
	dh_compress -X.tcl

.PHONY: override_dh_auto_configure override_dh_auto_install \
	override_dh_compress override_dh_auto_clean