File: rules

package info (click to toggle)
freecdb 0.75
  • links: PTS
  • area: main
  • in suites: bullseye, buster, etch, etch-m68k, jessie, jessie-kfreebsd, lenny, sid, squeeze, stretch, wheezy
  • size: 712 kB
  • ctags: 250
  • sloc: ansic: 1,731; sh: 360; makefile: 57
file content (49 lines) | stat: -rwxr-xr-x 1,163 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
#!/usr/bin/make -f

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

CC=gcc
ifneq (,$(findstring diet,$(DEB_BUILD_OPTIONS)))
  CC =diet -v -Os gcc -nostdinc
endif

DIR =$(shell pwd)/debian/freecdb

build: deb-checkdir build-stamp
build-stamp: 
	$(MAKE) CC='$(CC)'
	$(MAKE) check
	touch build-stamp

clean: deb-checkdir deb-checkuid
	$(MAKE) clean
	rm -f build-stamp
	rm -rf '$(DIR)'
	rm -f debian/files debian/substvars

install: deb-checkdir deb-checkuid build-stamp
	rm -rf '$(DIR)'
	install -d -m0755 '$(DIR)'/usr/bin
	install -m0755 cdbdump cdbget cdbmake cdbstats '$(DIR)'/usr/bin/
	$(STRIP) -R .comment -R .note '$(DIR)'/usr/bin/*
	# man pages
	install -d -m0755 '$(DIR)'/usr/share/man/man1
	install -m0644 cdbdump.1 cdbget.1 cdbmake.1 cdbstats.1 \
	  '$(DIR)'/usr/share/man/man1/
	gzip -9 '$(DIR)'/usr/share/man/man1/*.1

binary-indep:

binary-arch: install freecdb.deb
	test '$(CC)' != 'gcc' || dpkg-shlibdeps '$(DIR)'/usr/bin/*
	dpkg-gencontrol -isp -pfreecdb -P'$(DIR)'
	dpkg -b '$(DIR)' ..

binary: binary-indep binary-arch

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

include debian/implicit