File: rules

package info (click to toggle)
libctk 3.0.24.6
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 3,316 kB
  • ctags: 1,201
  • sloc: ansic: 10,623; sh: 10,438; makefile: 102
file content (126 lines) | stat: -rwxr-xr-x 3,958 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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
#!/usr/bin/make -f
# Sample debian/rules that uses debhelper.
# GNU copyright 1997 to 1999 by Joey Hess.

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

# This is the debhelper compatability version to use.
export DH_COMPAT=1

export DEB_HOST_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
export DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)

dc       := ${shell cat ctk/configure.in | egrep "^CTK_DEATH_COUNT=[0-9]+$$" | cut -d= -f2}
current  := ${shell cat ctk/configure.in | egrep "^CTK_CURRENT=[0-9]+$$"     | cut -d= -f2}
age      := ${shell cat ctk/configure.in | egrep "^CTK_AGE=[0-9]+$$"         | cut -d= -f2}
revision := ${shell cat ctk/configure.in | egrep "^CTK_REVISION=[0-9]+$$"    | cut -d= -f2}
major    := ${shell expr $(current) - $(age)}

build: build-stamp
build-stamp:
	dh_testdir
	
	(cd ctk && chmod +x autogen.sh config.guess config.sub install-sh \
		ltconfig missing mkinstalldirs)
	(cd ctk && touch configure.in aclocal.m4 configure)
	(cd ctk && ./configure --build=$(DEB_BUILD_GNU_TYPE) \
	  --host=$(DEB_HOST_GNU_TYPE) --prefix=/usr && SED=/bin/sed $(MAKE))
	
	touch build-stamp

clean:
	dh_testdir
	dh_testroot
	rm -f build-stamp

	# Add here commands to clean up after the build process.
	-(cd ctk/ && if [ -e Makefile ]; then $(MAKE) clean; fi; )
	-(cd ctk/ && rm -f Makefile config.cache config.status config.log libtool )
	
	dh_clean

install: build
	dh_testdir
	dh_testroot
	dh_clean -k
	dh_installdirs

	# Add here commands to install the package into debian/tmp.
	# (cd ctk && $(MAKE) prefix=`pwd`/../debian/tmp/usr install)
	
	# This is what goes in libctk<dc>
	install -m0755 ctk/.libs/libctk-$(dc).so.$(major).$(age).$(revision) \
		`pwd`/debian/tmp/usr/lib
	(cd debian/tmp/usr/lib; \
	 ln -s libctk-$(dc).so.$(major).$(age).$(revision) libctk-$(dc).so.$(major))

	# These files go into libctk<dc>-dev
	install -d `pwd`/debian/libctk$(dc)-dev/usr/include/ctk-$(dc)
	install -d `pwd`/debian/libctk$(dc)-dev/usr/lib
	install -m0644 ctk/*.h \
	 `pwd`/debian/libctk$(dc)-dev/usr/include/ctk-$(dc)
	install -m0644 ctk/.libs/libctk.a \
	 `pwd`/debian/libctk$(dc)-dev/usr/lib/libctk-$(dc).a.$(major).$(age).$(revision)
	install -m0644 ctk/.libs/libctk.lai \
	 `pwd`/debian/libctk$(dc)-dev/usr/lib/libctk-$(dc).la.$(major).$(age).$(revision)
	(cd debian/libctk$(dc)-dev/usr/lib; \
	 ln -s libctk-$(dc).so.$(major).$(age).$(revision) libctk-$(dc).so; \
	 ln -s libctk-$(dc).a.$(major).$(age).$(revision) libctk-$(dc).a;   \
	 ln -s libctk-$(dc).la.$(major).$(age).$(revision) libctk-$(dc).la)

	# These files go into libctk-dev
	install -d `pwd`/debian/libctk-dev/usr/include
	install -d `pwd`/debian/libctk-dev/usr/lib
	(cd debian/libctk-dev/usr/include; ln -s ctk-$(dc) ctk)
	(cd debian/libctk-dev/usr/lib; \
	 ln -s libctk-$(dc).so libctk.so; \
	 ln -s libctk-$(dc).la libctk.la; \
	 ln -s libctk-$(dc).a  libctk.a)
	
# Build architecture-independent files here.
binary-indep: build install
# We have nothing to do by default.

# Build architecture-dependent files here.
binary-arch: build install
#	dh_testversion
	dh_testdir
	dh_testroot
	#
	# build libctk${major} package by moving files from libctk-dev
	#
	#dh_movefiles -plibctk$(major)             \
	#       usr/lib/libctk.so.$(major)        \
	#       usr/lib/libctk.so.$(version)

	dh_movefiles -plibctk-dev
	dh_movefiles -plibctk$(dc)-dev
#	dh_installdebconf	
	dh_installdocs
	dh_installexamples -plibctk3-dev examples/*.c examples/Makefile
#	dh_installmenu
#	dh_installemacsen
#	dh_installpam
#	dh_installinit
#	dh_installcron
#	dh_installmanpages
#	dh_installinfo
#	dh_undocumented
	dh_installchangelogs 
	dh_link
	dh_strip
	dh_compress
	dh_fixperms
	# You may want to make some executables suid here.
#	dh_suidregister
	dh_makeshlibs
	dh_installdeb
#	dh_perl
	dh_shlibdeps
	dh_gencontrol
	dh_md5sums
	dh_builddeb

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