File: rules

package info (click to toggle)
most 4.10.2-4
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 828 kB
  • ctags: 440
  • sloc: ansic: 5,674; sh: 5,168; makefile: 127
file content (77 lines) | stat: -rwxr-xr-x 2,205 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
#!/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.

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

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
	-test -r /usr/share/misc/config.sub && \
	cp -f /usr/share/misc/config.sub config.sub
	-test -r /usr/share/misc/config.guess && \
	cp -f /usr/share/misc/config.guess config.guess


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 
	dh_testroot 
	dh_clean
	@echo "Making the binary package: $(p)-$(version)-$(debian).deb ..."
	dh_installdirs 
	dh_installchangelogs changes.txt
	dh_installdocs debian/copyright README lesskeys.rc most-fun.txt most.rc
	dh_installmime
	dh_installman most.1
	$(install_binary) src/objs/most debian/most/usr/bin/most
	dh_strip
	dh_compress
	dh_shlibdeps
	dh_installdeb
	dh_fixperms
	dh_md5sums
	dh_gencontrol
	dh_builddeb 

# Below here is fairly generic really.

binary: binary-indep binary-arch

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