File: rules

package info (click to toggle)
gs 6.53-3
  • links: PTS
  • area: main
  • in suites: woody
  • size: 27,752 kB
  • ctags: 36,025
  • sloc: ansic: 255,138; sh: 6,990; cpp: 4,576; tcl: 1,814; asm: 968; lisp: 405; python: 405; makefile: 244; perl: 207; awk: 66
file content (91 lines) | stat: -rwxr-xr-x 2,117 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
#!/usr/bin/make -f
# Sample debian/rules that uses debhelper.
# This file is public domain software, originally written by Joey Hess. 

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

PACKAGE         := $(shell dpkg-parsechangelog|                 \
			sed -n 's/^Source: \(.*\)$$/\1/p')
ifeq ($(PACKAGE),gs)
BINNAME		:= gs-gnu
else
BINNAME		:= $(PACKAGE)
endif
VERSION         := $(shell dpkg-parsechangelog|                 \
			sed -n 's/^Version: \([^-]*\).*$$/\1/p')

bindir	= debian/$(PACKAGE)/usr/bin
mandir	= debian/$(PACKAGE)/usr/share/man
docdir	= debian/$(PACKAGE)/usr/share/doc/$(PACKAGE)

# This is the debhelper compatibility version to use.
export DH_COMPAT=2

build: build-stamp
build-stamp:
	dh_testdir
	# Add here commands to compile the package.
	perl debian/gen-makefile
	$(MAKE)
	touch build-stamp

clean:
	dh_testdir
	dh_testroot
	-$(MAKE) distclean
	rm -f build-stamp Makefile


	dh_clean

install: build
	dh_testdir
	dh_testroot
	dh_clean -k
	dh_installdirs

	# Add here commands to install the package into debian/<packagename>
	$(MAKE) prefix=`pwd`/debian/$(PACKAGE)/usr install
	rm $(docdir)/COPYING		# a single copyright file suffices
	html2text doc/History[56].htm >$(docdir)/changelog 

	# Install the docs for the pcl3 driver
	mkdir $(docdir)/pcl3 
	cp -a pcl3/doc pcl3/lib pcl3/ppd pcl3/ps pcl3/README $(docdir)/pcl3/
	

# Build architecture-independent files here.
binary-indep: build install
# We have nothing to do by default.

# Build architecture-dependent files here.
binary-arch: build install
	dh_testdir
	dh_testroot

	# We only want to have the gs binary in /usr/bin
	rm $(bindir)/*
	cp bin/* $(bindir)/$(BINNAME)
	# And accordingly only that manpage
	rm -R $(mandir)/man1/*
	cp man/gs.1 $(mandir)/man1/$(BINNAME).1

#	dh_installdebconf	
	dh_installdocs
#	dh_undocumented
	dh_installchangelogs
	dh_link
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
	dh_strip
endif
	dh_compress
	dh_fixperms
	dh_installdeb
	dh_shlibdeps
	dh_gencontrol
	dh_md5sums
	dh_builddeb

binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install