File: rules

package info (click to toggle)
myodbc 3.51.11-6.1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 5,056 kB
  • ctags: 1,933
  • sloc: ansic: 31,656; sh: 10,955; cpp: 2,439; makefile: 1,120
file content (101 lines) | stat: -rwxr-xr-x 2,508 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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
#!/usr/bin/make -f
#-*- makefile -*-
# Made with the aid of dh_make, by Craig Small
# Sample debian/rules that uses debhelper. GNU copyright 1997 by Joey Hess.
# This version is for a hypothetical package that builds an
# architecture-dependant package, as well as an architecture-independant
# package.

#export DH_VERBOSE=1
export DH_COMPAT=3

# Authoritative build/host types for the Debian archen.
DEB_HOST_GNU_TYPE	:= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
DEB_BUILD_GNU_TYPE	:= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE))
  confflags += --build $(DEB_HOST_GNU_TYPE)
else
  confflags += --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE)
endif

# Support the DEB_BUILD_OPTIONS variable
CFLAGS = -g -Wall

ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
  CFLAGS += -O0
else
  CFLAGS += -O2
endif

build: build-stamp
build-stamp:
	dh_testdir

	CPPFLAGS="-D_REENTRANT -D_GNU_SOURCE" \
	CFLAGS="${CFLAGS}" \
	./configure $(confflags) \
		--prefix=/usr \
		--enable-shared \
		--enable-thread-safe \
		--with-unixODBC=/usr \
		--disable-gui \
		--with-mysql-libs=/usr/lib \
		--with-mysql-includes=/usr/include/mysql
	$(MAKE)

	touch build-stamp

clean:
	dh_testdir
	dh_testroot
	rm -f build-stamp install-stamp

	# Add here commands to clean up after the build process.
	-$(MAKE) clean
	-$(MAKE) distclean

	dh_clean

install: install-stamp
install-stamp: build-stamp
	dh_testdir
	dh_testroot
	dh_clean -k
	dh_installdirs

	# Add here commands to install the package into debian/$(dirname).
	$(MAKE) install prefix=`pwd`/debian/tmp/usr libdir=`pwd`/debian/tmp/usr/lib/odbc

	rm `pwd`/debian/tmp/usr/lib/odbc/libmyodbc3.*
	rm `pwd`/debian/tmp/usr/lib/odbc/libmyodbc3_r.*
	rm `pwd`/debian/tmp/usr/lib/odbc/libmyodbc3-3.*
	mv `pwd`/debian/tmp/usr/lib/odbc/libmyodbc3_r-3.51.11.so `pwd`/debian/tmp/usr/lib/odbc/libmyodbc.so
	mkdir -p `pwd`/debian/tmp/usr/share/libmyodbc
	install -m644 debian/odbcinst.ini `pwd`/debian/tmp/usr/share/libmyodbc
	
	touch install-stamp

binary-indep: build install

binary-arch: build install
	dh_testdir -a
	dh_testroot -a
	dh_installdirs -a 
	dh_movefiles -a
	dh_installdocs -a
	dh_installexamples -a
	dh_installchangelogs -a		ChangeLog
	dh_installdebconf -a
	dh_link -a
	dh_strip -a
	dh_compress -a
	dh_fixperms -a
	dh_installdeb -a
	dh_perl -a
	dh_shlibdeps -a
	dh_gencontrol -a
	dh_md5sums -a
	dh_builddeb -a

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