File: rules

package info (click to toggle)
dialog 1.0-20060221-3
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 2,040 kB
  • ctags: 1,239
  • sloc: ansic: 11,308; sh: 7,591; perl: 355; makefile: 238; python: 164
file content (86 lines) | stat: -rwxr-xr-x 2,478 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
#!/usr/bin/make -f

package = dialog
docdir = debian/tmp/usr/share/doc/$(package)
examples = yesno msgbox inputbox checklist menubox menubox1 menubox2 \
	infobox textbox radiolist gauge gauge2 \
	msgbox1 msgbox2 inputbox1 inputbox2 inputbox3 calendar timebox \
	calendar2 fselect2 infobox2 infobox3 infobox4 menubox3 menubox4 \
	menubox5 password textbox2 timebox2 yesno2 yesno3 \
	fselect fselect1 inputbox4 inputbox5 \
	inputmenu1 inputmenu2 inputmenu3 inputmenu4 \
	checklist-utf8 msgbox4-utf8 inputbox6-utf8 menubox-utf8 msgbox4-eucjp \
	form1 form2 gauge3 inputbox7 \
	calendar-stdout calendar2-stdout gauge0-input-fd \
	fselect-stdout fselect1-stdout fselect2-stdout \
	password1 password2 inputmenu-stdout \
	timebox-stdout timebox2-stdout \
	menubox10 checklist10 radiolist10 \
	pause

CC = gcc
CFLAGS = -g -Wall
INSTALL_PROGRAM = install
STRIP = true

ifeq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
  CFLAGS += -O2
endif
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
  INSTALL_PROGRAM += -s
  STRIP = strip --strip-debug
endif

build:
	$(checkdir)
	CC="$(CC)" CFLAGS="$(CFLAGS)" ./configure --prefix=/usr \
		--enable-nls --with-ncursesw
	$(MAKE)
	touch build

clean:
	$(checkdir)
	rm -f build
	-$(MAKE) distclean
	rm -f `find . -name "*~"`
	rm -rf debian/tmp debian/files* core debian/substvars

binary-indep: checkroot build
	$(checkdir)

binary-arch: checkroot build
	$(checkdir)
	rm -rf debian/tmp
	install -d debian/tmp/DEBIAN $(docdir)/examples
	cd debian/tmp && install -d usr/bin usr/man/man1 usr/lib/perl5
	$(MAKE) install install-lib DESTDIR=`pwd`/debian/tmp prefix=/usr \
		INSTALL_PROGRAM="$(INSTALL_PROGRAM)"
	cp -p dialog.pl debian/tmp/usr/lib/perl5
	cp -p debian/changelog $(docdir)/changelog.Debian
	cp -p README CHANGES debian/copyright $(docdir)
	cd samples && cp -p $(examples) ../$(docdir)/examples
	chmod -R u+w $(docdir) debian/tmp/usr/lib
	cd $(docdir) && gzip -9 CHANGES changelog.Debian
	ln -s CHANGES.gz $(docdir)/changelog.gz
	gzip -r9 debian/tmp/usr/man
	cd debian/tmp && mv usr/man usr/share
	$(STRIP) debian/tmp/usr/lib/libdialog.a
	dpkg-shlibdeps dialog
	dpkg-gencontrol -isp
	cd debian/tmp && \
		md5sum `find * -type f ! -regex "DEBIAN/.*"` > DEBIAN/md5sums
	chown -R root:root debian/tmp
	chmod -R go=rX debian/tmp
	dpkg --build debian/tmp ..

define checkdir
	test -f debian/rules
endef

binary: binary-indep binary-arch

checkroot:
	$(checkdir)
	test root = "`whoami`"

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