File: rules

package info (click to toggle)
leave 1.12-6
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 84 kB
  • sloc: ansic: 251; makefile: 29
file content (38 lines) | stat: -rwxr-xr-x 1,094 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
#!/usr/bin/make -f

-include /usr/share/dpkg/buildtools.mk
STRIP ?= strip

tmp=$(shell pwd)/debian/leave

ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
  stripflag=-s --strip-program=$(STRIP)
endif

leave: leave.c
	$(CC) $(shell dpkg-buildflags --get CFLAGS) -D__COPYRIGHT\(x\)= -D__RCSID\(x\)= leave.c -o leave
# used to have 'pmake CFLAGS="..." leave' here, but why?

build: leave
build-arch: build
build-indep: build

clean:
	rm -f build-stamp leave leave.o leave.cat1 debian/files debian/substvars
	rm -rf $(tmp)

binary-arch binary: build
	rm -rf $(tmp)
	install -d -m 755 $(tmp)/usr/bin $(tmp)/usr/share/man/man1 \
		$(tmp)/DEBIAN $(tmp)/usr/share/doc/leave
	install $(stripflag) -m 755 leave $(tmp)/usr/bin
	gzip -c9n leave.1 > $(tmp)/usr/share/man/man1/leave.1.gz
	gzip -c9n debian/changelog > $(tmp)/usr/share/doc/leave/changelog.Debian.gz
	install -m 644 debian/copyright $(tmp)/usr/share/doc/leave
	dpkg-shlibdeps $(tmp)/usr/bin/leave
	dpkg-gencontrol -isp -P$(tmp)
	chmod -R g-ws $(tmp)
	dpkg-deb --root-owner-group --build $(tmp) ..

binary-indep:
# do nothing, successfully!