File: rules

package info (click to toggle)
rpncalc 1.31.13
  • links: PTS
  • area: main
  • in suites: woody
  • size: 828 kB
  • ctags: 262
  • sloc: sh: 2,624; ansic: 1,836; lex: 335; sed: 312; yacc: 118; makefile: 88
file content (72 lines) | stat: -rwxr-xr-x 2,234 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
#!/usr/bin/make -f
#                                                            -*- Makefile -*-
#
# This rules file was adapted from the
#   Sample debian.rules file - for GNU Hello (1.3).
#   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

# The name of the package (for example, `emacs').
package	:= $(shell sed -n -e 's/Package: *\([a-z]\)/\1/p' debian/control)

tmp	:= $(PWD)/debian/tmp

prefix	:= usr
bin	:= $(prefix)/bin
doc	:= $(prefix)/share/doc/$(package)
manroot := $(prefix)/share/man
locale	:= $(prefix)/share/locale/
man	:= $(manroot)/man1

ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
CFLAGS += -g
endif
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
AM_INSTALL_PROGRAM_FLAGS += -s
endif

build:
	automake && autoconf2.50 && \
	./configure --prefix=/$(prefix) && $(MAKE) &&\
	touch build

clean:
	-rm -f build
	-[ -r Makefile ] && $(MAKE) maintainer-clean
	-rm -rf .deps config.cache *~ $(tmp) debian/*~ debian/files*

binary-indep:	build
# There are no architecture-independent files.
# If there were any they would be made here.

binary-arch:	build
	-rm -rf $(tmp)
	mkdir $(tmp) $(tmp)/$(prefix) $(tmp)/$(bin)
	cd $(tmp) && install -d $(doc) $(manroot) $(locale)
	$(MAKE) AM_INSTALL_PROGRAM_FLAGS=-s DESTDIR=$(tmp) install
	strip --strip-all $(tmp)/$(bin)/$(package)
	cp debian/changelog $(tmp)/$(doc)/changelog
	gzip -9f $(tmp)/$(doc)/changelog
	gzip -9  $(tmp)/$(man)/$(package).1 \
	         $(tmp)/$(manroot)/*/man1/$(package).1
	rm -rf $(tmp)/$(manroot)/es
	cp debian/copyright $(tmp)/$(doc)
	dpkg-shlibdeps $(package)
	install -d $(tmp)/DEBIAN
	cd debian && install -m 755 postinst prerm tmp/DEBIAN
	dpkg-gencontrol -isp
	chown -R root.root $(tmp)
	chmod -R g-ws,go=rX $(tmp)
	dpkg --build $(tmp) ..

# Below here is fairly generic really
binary:		binary-indep binary-arch

source diff:
	@echo >&2 'source and diff are obsolete - use dpkg-source -b'; false

.PHONY: binary binary-arch binary-indep clean