File: rules

package info (click to toggle)
ucspi-proxy 0.99-1.1
  • links: PTS
  • area: main
  • in suites: bullseye, buster
  • size: 268 kB
  • sloc: ansic: 1,179; makefile: 51
file content (65 lines) | stat: -rwxr-xr-x 1,686 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
#!/usr/bin/make -f

CC =gcc
CFLAGS =-W -Wall -Wshadow -O2 -g
STRIP =strip
BGINCS =/usr/include/bglibs

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

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

patch: deb-checkdir patch-stamp
patch-stamp:
	for i in `ls -1 debian/diff/*.diff || :`; do \
	  patch -p1 <$$i || exit 1; \
	done
	touch patch-stamp

configure: deb-checkdir configure-stamp
configure-stamp: patch-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) $(CFLAGS)' >conf-cc
	echo '$(CC)' >conf-ld
	echo '/usr/share/man' >conf-man
	touch configure-stamp

build: deb-checkdir build-stamp
build-stamp: configure-stamp
	$(MAKE)
	touch build-stamp

clean: deb-checkdir deb-checkuid patch-stamp
	$(MAKE) clean
	for i in `ls *'{orig}' || :`; do mv -vf $$i $${i%'{orig}'}; done
	test ! -e patch-stamp || \
	  for i in `ls -1r debian/diff/*.diff || :`; do patch -p1 -R <$$i; done
	rm -f build-stamp configure-stamp patch-stamp
	rm -rf '$(DIR)'
	rm -f debian/files debian/substvars changelog

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

binary-indep:

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

binary: binary-indep binary-arch

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

include debian/implicit