File: rules

package info (click to toggle)
rplay 3.3.2-18
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 3,928 kB
  • sloc: ansic: 42,161; makefile: 1,281; perl: 742; tcl: 345; sh: 311; java: 220
file content (136 lines) | stat: -rwxr-xr-x 2,992 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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
#!/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.

CPPFLAGS:=$(shell dpkg-buildflags --get CPPFLAGS)
CFLAGS:=$(shell dpkg-buildflags --get CFLAGS)
CXXFLAGS:=$(shell dpkg-buildflags --get CXXFLAGS)
LDFLAGS:=$(shell dpkg-buildflags --get LDFLAGS)

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

CFLAGS += " -D_REENTRANT"
CFLAGS += $CPPFLAGS

SHELL=/bin/bash

include /usr/share/dpkg/architecture.mk

ifeq ($(origin CC),default)
CC = $(DEB_HOST_GNU_TYPE)-gcc
endif
export CC

i = $(shell pwd)/debian/tmp
b = $(shell pwd)/debian/build

package = rplay
soname = 3
l = lib$(package)$(soname)

build: build-arch build-indep
build-arch: build-stamp
build-indep: build-stamp

build-stamp:
	dh_testdir

	./configure --prefix=/usr --sysconfdir=/etc/rplay --without-x \
		--enable-rplayd-user=nobody --enable-rplayd-group=audio

	#XXX $(MAKE) CFLAGS="-O2 -D_REENTRANT"
	$(MAKE)

	#XXX (cd contrib/mailsound; $(MAKE) CFLAGS="-O2 -g")
	(cd contrib/mailsound; $(MAKE))

	touch build-stamp

clean:
	dh_testdir
	dh_testroot

	rm -f build-stamp

	[ ! -f Makefile ] || $(MAKE) distclean

	rm -f contrib/mailsound/mailsound{,.o} \
		gsm/Makefile rx/{config.*,Makefile}

	dh_clean

install:
install: build
	dh_testdir
	dh_testroot
	dh_prep

	$(MAKE) install prefix=$(i)/usr \
		infodir=$(i)/usr/share/info \
		mandir=$(i)/usr/share/man

        # Lintian overrides
	cd debian ; \
	for f in *.lintian ; do \
	  [ -r "$$f" ] && { \
	    mkdir -p "$${f%%.lintian}/usr/share/lintian/overrides" ;\
	    install  -m 644 "$$f" "$${f%%.lintian}/usr/share/lintian/overrides/$${f%%.lintian}" ;\
	  } ;\
	done

	install contrib/mailsound/mailsound $(i)/usr/bin
	mkdir -p $(i)/usr/share/perl5
	install -m 664 perl/{RPlay.pm,rplay.ph,RPTP.pm} $(i)/usr/share/perl5
	install perl/Mailsound $(i)/usr/bin
	install -m 644 contrib/mailsound/mailsound.1 $(i)/usr/share/man/man1
	install -m 644 perl/Mailsound.1 $(i)/usr/share/man/man1
	install -d $(i)/etc/rplay
	install -m 644 etc/rplay.{conf,helpers,hosts,servers} $(i)/etc/rplay

	dh_movefiles

binary: binary-indep binary-arch

binary-indep: build install
	dh_installdocs -i
	dh_installexamples -i
	dh_installmenu -i
	dh_installman -i
	dh_installinfo -i
	dh_installchangelogs -i	ChangeLog
	dh_strip -i
	dh_link -i
	dh_compress -i
	dh_fixperms -i
	dh_makeshlibs -i
	dh_installdeb -i
	dh_perl -i
	dh_shlibdeps -i
	dh_gencontrol -i
	dh_md5sums -i
	dh_builddeb -i

binary-arch: build install
	dh_testdir
	dh_testroot
	dh_installdocs -a
	dh_installexamples -a
	dh_installmenu -a
	dh_installinit -a		-prplay-server --init-script=rplay -- defaults 99 10
	dh_installman -a
	dh_installinfo -a
	dh_installchangelogs -a	ChangeLog
	dh_strip -a
	dh_link -a
	dh_compress -a
	dh_fixperms -a
	dh_makeshlibs -a
	dh_installdeb -a
	dh_perl -a
	dh_shlibdeps -a
	dh_gencontrol -a
	dh_md5sums -a
	dh_builddeb -a

binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install