File: rules

package info (click to toggle)
setserial 2.17-16
  • links: PTS
  • area: main
  • in suites: potato
  • size: 340 kB
  • ctags: 190
  • sloc: sh: 2,014; ansic: 993; makefile: 118; csh: 2
file content (67 lines) | stat: -rwxr-xr-x 1,843 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
#!/usr/bin/make -f
# Copyright 1994,1995 by Ian Jackson, 1998 Christoph Lameter
# debian/rules for setserial, by Gordon Russell.

DESTDIR = `pwd`/debian/tmp
arch = $(shell dpkg-architecture -qDEB_BUILD_ARCH)

build: stamp-build
stamp-build:
	dh_testdir
	./configure --prefix=/usr
	$(MAKE) setserial CFLAGS="-O2"
	touch $@

clean:
	dh_testdir
	dh_testroot
	[ ! -f Makefile ] || $(MAKE) distclean
	dh_clean stamp-build debian/conffiles

binary-indep:
# There are no architecture-independent packages here.

binary-arch: build
	dh_testdir
	dh_testroot
	dh_clean -k

	dh_installdirs bin usr/share/man/man8 etc/init.d etc/modutils
	install -g root -m 755 -o root -s setserial   $(DESTDIR)/bin
	install -g root -m 644 -o root    setserial.8 \
		$(DESTDIR)/usr/share/man/man8/setserial.8
	echo ${arch}
	if [ "${arch}" = "m68k" ] ; then \
	  echo "Using rc.serial.m68k" ;\
	  install -g root -m 755 -o root    rc.serial.m68k \
		$(DESTDIR)/etc/init.d/setserial ; \
	else \
	  echo "Using rc.serial" ;\
	  install -g root -m 755 -o root  rc.serial \
		$(DESTDIR)/etc/init.d/setserial ; \
	  install -g root -m 644 -o root    serial.conf $(DESTDIR)/etc ;\
	  install -g root -m 644 -o root    debian/setserial.modutils $(DESTDIR)/etc/modutils/setserial ;\
	fi
	if [ "${arch}" = "sparc" ] ; then \
	  install -g root -m 644 -o root    serial.conf.sparc $(DESTDIR)/etc/serial.conf ;\
	fi

	cd debian && if [ "${arch}" = "m68k" ] ; then \
	  echo "Using m68k setup."; cp conffiles.m68k conffiles; \
	else \
	  echo "Using non-m68k setup."; cp conffiles.i386 conffiles; \
	fi
	dh_installdocs README pcmcia.repair serial.conf
	dh_installchangelogs
	dh_installdebconf
	dh_strip
	dh_compress
	dh_fixperms
	dh_shlibdeps
	dh_gencontrol
	dh_installdeb
	dh_md5sums
	dh_builddeb

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