File: rules

package info (click to toggle)
ucbmpeg 1r2-6
  • links: PTS
  • area: non-free
  • in suites: hamm, potato, slink
  • size: 9,504 kB
  • ctags: 7,643
  • sloc: ansic: 79,920; tcl: 2,985; perl: 313; asm: 284; makefile: 269; csh: 13
file content (98 lines) | stat: -rwxr-xr-x 3,395 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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
#!/usr/bin/make -f
# Made with the aid of debmake, by Christoph Lameter,
# based on the sample debian/rules file for GNU hello by Ian Jackson.

package=ucbmpeg

CCOPTS = -O2 -DSIG_ONE_PARAM

build:
	$(checkdir)
	$(MAKE) -C mpeg_blocks \
		CC="gcc -DDEBIAN -Dtk_NumMainWindows=Tk_GetNumMainWindows \
		-DTk_CreateMainWindow=TkCreateMainWindow $(CCOPTS)" \
		CFLAGS="-DBLOCKS_LIB=\\\"/usr/lib/$(package)/blocks\\\"" \
		LIBS="-L/usr/X11R6/lib -ltk8.0 -ltcl8.0 -lX11 -lm -ldl"
	$(MAKE) -C mpeg_encode/jpeg CC="gcc $(CCOPTS)"
	$(MAKE) -C mpeg_encode DEBUGFLAG="$(CCOPTS) -DDEBIAN"
	$(MAKE) -C mpeg_bits LDFLAGS="-L/usr/X11R6/lib" \
		CC="gcc -Dtk_NumMainWindows=Tk_GetNumMainWindows \
		-DTk_CreateMainWindow=TkCreateMainWindow $(CCOPTS)" \
		CFLAGS="-DBITS_DIR=\\\"/usr/lib/$(package)/bits\\\"" \
		LIBS="-ltk8.0 -ltcl8.0 -lX11 -ldl" DEBUGFLAG=""
	$(MAKE) -C mpeg_stat DEBUGFLAG="$(CCOPTS)"
	$(MAKE) -C convert DEBUGFLAG="$(CCOPTS)"
	touch build


clean:
	$(checkdir)
	$(MAKE) -C convert clean
	$(MAKE) -C mpeg_bits clean
	$(MAKE) -C mpeg_stat clean
	$(MAKE) -C mpeg_encode/jpeg clean
	rm -f mpeg_blocks/{core,*.a,*.o,mpeg_blocks}
	rm -f mpeg_encode/{core,gmon.out,mpeg_encode,jpeg/libjpeg.a}
	rm -f  $$(find mpeg_encode -name "*.o" -o -name "*~")
	rm -rf $$(find . -name "*~") $$(find debian/* -type d)
	rm -f debian/files* debian/*substvars build
	find .. -name $(package)*.asc -size 0 -maxdepth 1 -exec rm {} ";"


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


binary-arch:	checkroot build
	$(checkdir)
	rm -rf debian/tmp && install -d debian/tmp
	cd debian/tmp && install -d $$(cat ../dirs)
	install mpeg_stat/mpeg_stat debian/tmp/usr/bin
	install mpeg_stat/block2spec debian/tmp/usr/bin
	install mpeg_encode/mpeg_encode debian/tmp/usr/bin
	install mpeg_blocks/mpeg_blocks debian/tmp/usr/bin
	install convert/eyuvtoppm debian/tmp/usr/bin
	install convert/eyuvtojpeg debian/tmp/usr/bin
	install convert/ppmtoeyuv debian/tmp/usr/bin
	install convert/mpeg_demux debian/tmp/usr/bin
	install mpeg_bits/mpeg_bits debian/tmp/usr/bin
	install -m 644 mpeg_bits/{*elp*,*tcl} \
		debian/tmp/usr/lib/$(package)/bits
	cp -a mpeg_bits/bitmaps debian/tmp/usr/lib/$(package)/bits
	cp -a mpeg_blocks/bitmaps debian/tmp/usr/lib/$(package)/blocks
	install -m 644 mpeg_blocks/*tcl \
		debian/tmp/usr/lib/$(package)/blocks
	cp doc/*.1 debian/tmp/usr/man/man1
	rm debian/tmp/usr/man/man1/mpeg_play.1
	cp mpeg_encode/docs/{E*,I*,*param*,*ps} \
		debian/tmp/usr/doc/$(package)/mpeg_encode
	cp mpeg_encode/examples/* \
		debian/tmp/usr/doc/$(package)/examples/mpeg_encode
	ln -s ../man7/undocumented.7.gz debian/tmp/usr/man/man1/mpeg_demux.1.gz
	ln -s ../man7/undocumented.7.gz debian/tmp/usr/man/man1/ppmtoeyuv.1.gz
	ln -s ../man7/undocumented.7.gz debian/tmp/usr/man/man1/eyuvtoppm.1.gz
	ln -s ../man7/undocumented.7.gz debian/tmp/usr/man/man1/eyuvtojpeg.1.gz
	ln -s ../man7/undocumented.7.gz debian/tmp/usr/man/man1/block2spec.1.gz
	debstd -m ANNOUNCE
	dpkg-gencontrol
	chown -R root.root debian/tmp
	chmod -R go=rX debian/tmp
	dpkg --build debian/tmp ..


define checkdir
	test -f debian/rules
endef

# Below here is fairly generic really

binary:		binary-indep binary-arch

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

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