File: rules

package info (click to toggle)
most 4.9.5-1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 616 kB
  • ctags: 416
  • sloc: ansic: 5,448; sh: 4,903; makefile: 121
file content (68 lines) | stat: -rwxr-xr-x 1,961 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
#!/usr/bin/make -f
# Copyright 1994,1995 by Ian Jackson.
# I hereby give you perpetual unlimited permission to copy,
# modify and relicense this file, provided that you do not remove
# my name from the file itself.  (I assert my moral right of
# paternity under the Copyright, Designs and Patents Act 1988.)
# This file may have to be extensively modified

# There used to be `source' and `diff' targets in this file, and many
# packages also had `changes' and `dist' targets.  These functions
# have been taken over by dpkg-source, dpkg-genchanges and
# dpkg-buildpackage in a package-independent way, and so these targets
# are obsolete.

CC = gcc
CFLAGS = -O2 -g -Wall -DUTF8

install_binary= install -s -o root -g root -m 755
install_script= install    -o root -g root -m 755
install_files=  install    -o root -g root -m 644

# The next section may have to be extensively modified

build: build-stamp
build-stamp:
	dh_testdir
	@echo "Building the binaries ..."
	CC="$(CC)" CFLAGS="$(CFLAGS)" ./configure
	$(MAKE) SYS_INITFILE=/etc/most.conf
	touch $@

clean:
	dh_testdir
	dh_testroot
	@echo "Cleaning up after a build ..."
	-rm -f build-stamp src/config.h
	-$(MAKE) -i distclean
	dh_clean

binary-indep:  build
# There are no architecture-independent files to be uploaded
# generated by this package.  If there were any they would be
# made here.

binary-arch:	build
	dh_testdir -a
	dh_testroot -a
	dh_clean -k -a
	@echo "Making the binary package: $(p)-$(version)-$(debian).deb ..."
	dh_installdirs -a
	dh_installchangelogs -a changes.txt
	dh_installdocs -a debian/copyright README lesskeys.rc most-fun.txt most.rc
	dh_installmanpages -a
	$(install_binary) src/objs/most debian/tmp/usr/bin/most

	dh_compress -a
	dh_shlibdeps -a
	dh_installdeb -a
	dh_fixperms -a
	dh_md5sums -a
	dh_gencontrol -a
	dh_builddeb -a

# Below here is fairly generic really.

binary: binary-indep binary-arch

.PHONY: binary binary-indep binary-arch dist update clean checkroot