File: rules

package info (click to toggle)
ucspi-proxy 0.99-7
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 372 kB
  • sloc: ansic: 1,917; makefile: 46
file content (60 lines) | stat: -rwxr-xr-x 1,670 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
#!/usr/bin/make -f

CC =gcc
CPPFLAGS := `dpkg-buildflags --get CPPFLAGS`
CFLAGS := `dpkg-buildflags --get CFLAGS`
LDFLAGS := `dpkg-buildflags --get LDFLAGS`

STRIP =strip
BGINCS =/usr/include/bglibs

ifneq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
  STRIP =: nostrip
endif

DIR =$(shell pwd)/debian/ucspi-proxy

configure: deb-checkdir configure-stamp
configure-stamp:
	for i in conf-*; do \
	  test -e $${i%'{orig}'}'{orig}' || cp -v $$i $$i'{orig}'; \
	done
	echo '/usr/bin' >conf-bin
	echo '$(BGINCS)' >conf-bgincs
	echo '$(CC) $${CPPFLAGS} $${CFLAGS}' >conf-cc
	echo '$(CC) $${LDFLAGS}' >conf-ld
	echo '/usr/share/man' >conf-man
	touch configure-stamp

build: deb-checkdir build-stamp
build-stamp: configure-stamp
	$(MAKE) CPPFLAGS="$(CPPFLAGS)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)"
	touch build-stamp

clean: deb-checkdir
	$(MAKE) clean
	for i in `ls *'{orig}' || :`; do mv -vf $$i $${i%'{orig}'}; done
	rm -f build-stamp configure-stamp
	rm -rf '$(DIR)'
	rm -f debian/files debian/substvars changelog

install: deb-checkdir build-stamp
	rm -rf '$(DIR)'
	$(MAKE) install install_prefix='$(DIR)'
	$(STRIP) -R .comment -R .note '$(DIR)'/usr/bin/ucspi-proxy*
	gzip -9n '$(DIR)'/usr/share/man/man1/*.1
	chmod u=rwx,og=rx '$(DIR)' '$(DIR)/usr' '$(DIR)/usr/bin' '$(DIR)/usr/share' '$(DIR)/usr/share/man'
	test -r changelog || ln -s ChangeLog changelog

binary-indep:

binary-arch: deb-checkdir install ucspi-proxy.deb
	dpkg-shlibdeps '$(DIR)'/usr/bin/*
	dpkg-gencontrol -isp -pucspi-proxy -P'$(DIR)'
	dpkg-deb --root-owner-group -b '$(DIR)' ..

binary: binary-indep binary-arch

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

include debian/implicit