File: rules

package info (click to toggle)
gnuserv 3.12.8-7
  • links: PTS
  • area: main
  • in suites: bookworm, bullseye, buster, sid
  • size: 772 kB
  • sloc: ansic: 5,138; lisp: 966; sh: 269; makefile: 240
file content (99 lines) | stat: -rwxr-xr-x 2,508 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
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
#!/usr/bin/make -f
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

lispdir = $(CURDIR)/debian/gnuserv/usr/share/emacs/site-lisp/gnuserv

configure: configure-stamp
configure-stamp:
	dh_testdir

	./configure --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info --x-includes=/usr/include --x-libraries=/usr/lib $(shell dpkg-buildflags --export=configure)

	touch configure-stamp

build: build-arch build-indep
build-arch: build-stamp
build-indep: build-stamp

build-stamp: configure-stamp
	dh_testdir

	$(MAKE)

	touch build-stamp

clean: 
	dh_testdir
	dh_testroot
	rm -f build-stamp configure-stamp

	[ ! -f Makefile ] || $(MAKE) distclean

	dh_clean

install: build
	dh_testdir
	dh_testroot
	dh_prep
	dh_installdirs

#	Deal with brain-damaged Makefile's treatment of manpages
	mkdir -p $(CURDIR)/debian/gnuserv/usr/man/man1

	$(MAKE) install prefix=$(CURDIR)/debian/gnuserv/usr
	cp devices.el gnuserv-compat.el gnuserv.el $(lispdir)

#	Install dtemacs, small wrapper to emacs & gnuclient
	install -m 755 debian/dtemacs $(CURDIR)/debian/gnuserv/usr/bin

#	Now put the manpages where they belong
	mv $(CURDIR)/debian/gnuserv/usr/man/man1/* \
		$(CURDIR)/debian/gnuserv/usr/share/man/man1
	cp $(CURDIR)/debian/dtemacs.1 \
		$(CURDIR)/debian/gnuserv/usr/share/man/man1
	rm -rf $(CURDIR)/debian/gnuserv/usr/man

#	Rename the programs for update-alternatives
	for i in gnuattach gnuclient gnudoit; do\
		mv $(CURDIR)/debian/gnuserv/usr/bin/$$i \
			$(CURDIR)/debian/gnuserv/usr/bin/$${i}.emacs;\
	done

#	Prepare the manpages for update-alternatives. This can't be
#	done in the loop above because they're all symlinks to
#	the one gnuserv manpage.
	for i in gnuattach gnuclient gnudoit; do\
		rm -f $(CURDIR)/debian/gnuserv/usr/share/man/man1/$${i}.1;\
		ln -sf gnuserv.1.gz  $(CURDIR)/debian/gnuserv/usr/share/man/man1/$${i}.emacs.1.gz;\
	done

#	Install .desktop file
	install -m 644 debian/gnuserv.desktop $(CURDIR)/debian/gnuserv/usr/share/applications



# 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
	dh_installdocs
	dh_installemacsen
	dh_installman
	dh_installinfo
	dh_installchangelogs ChangeLog
	dh_strip
	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 configure