File: rules

package info (click to toggle)
libtioga-ruby 1.11-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 10,460 kB
  • ctags: 3,986
  • sloc: ansic: 38,451; ruby: 16,774; sh: 172; makefile: 111
file content (151 lines) | stat: -rwxr-xr-x 3,951 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
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
#!/usr/bin/make -f
# -*- makefile -*-
# Sample debian/rules that uses debhelper.
#
# This file was originally written by Joey Hess and Craig Small.
# As a special exception, when this file is copied by dh-make into a
# dh-make output file, you may use that output file without restriction.
# This special exception was added by Craig Small in version 0.37 of dh-make.
#
# Modified to make a template file for a multi-binary package with separated
# build-arch and build-indep targets  by Bill Allombert 2001

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

# This has to be exported to make some magic below work.
export DH_OPTIONS

SRCDIR=split
RUBY=ruby1.8

CFLAGS = -Wall -g
# The target directory for examples:
EXAMPLES_TARGET_DIR=usr/share/doc/libtioga-ruby-examples
DOC_TARGET_DIR=usr/share/doc/libtioga-ruby/html



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

configure: configure-stamp
configure-stamp: patch-stamp
	dh_testdir
	# Add here commands to configure the package.
	cd $(SRCDIR); $(RUBY) extconf.rb --dist;
# Fix painfull file permission
	chmod 644 samples/plots/data/builder.c
	touch $@


#Architecture 
build: build-arch build-indep

build-arch: build-arch-stamp
build-arch-stamp: configure-stamp

	# Add here commands to compile the arch part of the package.
	cd $(SRCDIR); $(MAKE)
	touch $@

build-indep: build-indep-stamp
build-indep-stamp: configure-stamp 

	# Add here commands to compile the indep part of the package.
	#$(MAKE) doc
# Creating rdoc documentation:
	rdoc1.8 
	mkdir doc/images
	cp -R images/*.png doc/images
	touch $@

clean::  clean-patched unpatch
clean-patched: 
	dh_testdir
	dh_testroot
	rm -f build-arch-stamp build-indep-stamp configure-stamp

	# Add here commands to clean up after the build process.
	cd $(SRCDIR);  [ ! -f Makefile ] || $(MAKE) distclean
	rm -f $(SRCDIR)/mkmf2.log $(SRCDIR)/mkmf.log
	rm -rf doc/
# Some additional cleanup, as per #442655
	rm -f samples.tar.gz split/Tioga/lib/TexPreamble.rb tioga.sty
	dh_clean 

CP_EXAMPLES=cp -t $(CURDIR)/debian/libtioga-ruby-examples/$(EXAMPLES_TARGET_DIR)

samples.tar.gz:
	tar cvzf $@ samples/

install: install-indep install-arch
install-indep: samples.tar.gz
	dh_testdir
	dh_testroot
	dh_clean -k -i 
	dh_installdirs -i
# Simply copy the sample directory to the target dir
	install -d $(CURDIR)/debian/libtioga-ruby-examples/$(EXAMPLES_TARGET_DIR)
	$(CP_EXAMPLES) -r $(CURDIR)/samples.tar.gz
	$(CP_EXAMPLES) $(CURDIR)/README.examples $(CURDIR)/irbrc
# And do the same for the rdoc-generated documentation:
	install -d $(CURDIR)/debian/libtioga-ruby-doc/$(DOC_TARGET_DIR)
	cp -r doc/* $(CURDIR)/debian/libtioga-ruby-doc/$(DOC_TARGET_DIR)
	dh_install -i

install-arch:
	dh_testdir
	dh_testroot
	dh_clean -k -s 
	dh_installdirs -s

	# Add here commands to install the arch part of the package into 
	# debian/tmp.
	cd $(SRCDIR); $(MAKE) install DESTDIR=$(CURDIR)/debian/libtioga-ruby1.8

	dh_install -s
# Must not depend on anything. This is to be called by
# binary-arch/binary-indep
# in another 'make' thread.
binary-common:
	dh_testdir
	dh_testroot
	dh_installchangelogs Changelog
	dh_installdocs
	dh_installexamples
	dh_installman
	dh_link
	dh_strip
	dh_compress 
	dh_fixperms
	dh_makeshlibs
	dh_installdeb
	dh_shlibdeps
	dh_gencontrol
	dh_md5sums
	dh_builddeb
# Build architecture independant packages using the common target.
binary-indep: build-indep install-indep
	$(MAKE) -f debian/rules DH_OPTIONS=-i binary-common

# Build architecture dependant packages using the common target.
binary-arch: build-arch install-arch
	$(MAKE) -f debian/rules DH_OPTIONS=-s binary-common

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

# targets for dpatch, taken from dpatch(1)
patch: patch-stamp

patch-stamp:
	dpatch apply-all
	touch $@

unpatch:
	dpatch deapply-all
	rm -rf patch-stamp debian/patched