File: rules

package info (click to toggle)
tinycdb 0.78
  • links: PTS
  • area: main
  • in suites: bookworm, bullseye, buster, jessie, jessie-kfreebsd, stretch, wheezy
  • size: 212 kB
  • ctags: 220
  • sloc: ansic: 1,714; makefile: 229; sh: 113
file content (78 lines) | stat: -rwxr-xr-x 1,686 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
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
#!/usr/bin/make -f
# -*- makefile -*-

LIBDIR = /usr/lib/$(shell dpkg-architecture -qDEB_HOST_MULTIARCH)

CFLAGS = $(shell dpkg-buildflags --get CFLAGS) \
 $(shell dpkg-buildflags --get CPPFLAGS) \
 -Wall -W
LDFLAGS = $(shell dpkg-buildflags --get LDFLAGS)

SOVER = 1

configure:	# nothing
	dh_testdir

build-arch: libcdb.pc
libcdb.pc:
	dh_testdir
	$(MAKE) CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" \
		staticlib sharedlib cdb-shared nss
	cp -pf nss_cdb-Makefile cdb-Makefile
	cp -pf cdb-shared cdb
	sed 's/@VERSION@/$(shell sed -n 's/^VERSION *= *//p' Makefile)/' debian/libcdb.pc > $@

clean:
	dh_testdir
	rm -f cdb-Makefile libcdb.pc
	$(MAKE) distclean
	dh_clean

build-indep:
build: build-arch

install: build
	dh_testdir
	dh_testroot
	dh_clean
	dh_installdocs -A NEWS

# libcdb$(SOVER)
	dh_install -plibcdb$(SOVER) libcdb.so.$(SOVER) $(LIBDIR)

# libcdb-dev
	dh_install -plibcdb-dev libcdb.a libcdb_pic.a libcdb.so $(LIBDIR)
	dh_install -plibcdb-dev cdb.h usr/include
	dh_install -plibcdb-dev libcdb.pc $(LIBDIR)/pkgconfig
	dh_installman -plibcdb-dev cdb.3
#	dh_installdocs -plibcdb-dev TODO

# tinycdb
	dh_install -ptinycdb cdb usr/bin
	dh_installman -ptinycdb cdb.1 cdb.5

# libnss-cdb
#	dh_install -plibnss-cdb cdb-Makefile etc
#	dh_install -plibnss-cdb libnss_cdb.so.2 lib

binary-indep:

binary-arch: build-arch install
	dh_testdir
	dh_testroot
	dh_installchangelogs
	dh_installdocs
	dh_strip
	dh_compress
	dh_fixperms
	dh_makeshlibs
	dh_installdeb
	dh_shlibdeps -L libcdb$(SOVER) -l debian/libcdb$(SOVER)$(LIBDIR)
	dh_gencontrol
	dh_md5sums
	dh_builddeb

binary: binary-arch

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