File: rules

package info (click to toggle)
gnustep-back 0.9.5-1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 3,056 kB
  • ctags: 952
  • sloc: objc: 33,086; ansic: 5,994; makefile: 127; sh: 71
file content (208 lines) | stat: -rwxr-xr-x 5,104 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
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
#! /usr/bin/make -f
# -*- makefile -*-

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

export SHELL=/bin/bash

##################### VERSION NUMBERS ###########################

# GNUstep Make version :
#v_make	:=

# GNUstep Base version :
#v_base	:=

# GNUstep Gui version :
v_gui	:= 0.9.5

#################################################################

# These are used for cross-compiling and for saving the configure script
# from having to guess our platform (since we know it already)
DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
#DEB_HOST_ARCH		:= $(shell dpkg-architecture -qDEB_HOST_ARCH)

# make some files executable
dummy := $(shell chmod +x configure)

# package names
p_back		= gnustep-back
#p_doc		= gnustep-back-doc

# package temp dirs
d_back		= $(CURDIR)/debian/$(p_back)
#d_doc		= $(CURDIR)/debian/$(p_doc)


#------------------------------------------------------------------------------
# GNUstep SETTINGS

# Dirs
GS_ROOT			= usr/lib/GNUstep
GS_SYSTEM_ROOT		= $(GS_ROOT)/System
GS_DOC_DIR		= $(GS_SYSTEM_ROOT)/Library/Documentation
GS_MAKEFILES_DIR	= $(GS_SYSTEM_ROOT)/Library/Makefiles
GS_HEADERS_DIR		= $(GS_SYSTEM_ROOT)/Library/Headers
GS_LIBS_DIR		= $(GS_SYSTEM_ROOT)/Library/Libraries
# Library combo
GS_LIBRARY_COMBO	= gnu-gnu-gnu

# Compiler
CC	:= $(shell sed -n -e '/^CC[ 	]*=/s,.*= *\(.*\),\1,p' \
			/$(GS_MAKEFILES_DIR)/config.make)

#------------------------------------------------------------------------------

foo:
	echo $(CC)

control-file:
	m4 \
	    -DV_MAKE='$(v_make)' \
	    -DV_BASE='$(v_base)' \
	    -DV_GUI='$(v_gui)' \
	    -DWITH_DEBUG \
		debian/control.m4 | uniq > debian/control.tmp
	[ -e debian/control ] \
	  && cmp -s debian/control debian/control.tmp \
	  && rm -f debian/control.tmp && exit 0; \
	  mv debian/control.tmp debian/control

config.status: configure
	dh_testdir
	. /$(GS_MAKEFILES_DIR)/GNUstep.sh; \
	CC="$(CC)" \
	CPPFLAGS=" -I/usr/X11R6/include" \
	    ./configure \
		--build=$(DEB_BUILD_GNU_TYPE) \
		--host=$(DEB_HOST_GNU_TYPE) \
		--target=$(DEB_HOST_GNU_TYPE) \
		--with-x \
		--enable-graphics=art

build: build-stamp

build-stamp: config.status
	dh_testdir
	. /$(GS_MAKEFILES_DIR)/GNUstep.sh; \
	    $(MAKE) messages=yes
	
	. /$(GS_MAKEFILES_DIR)/GNUstep.sh; \
	    $(MAKE) -C Documentation messages=yes
	
	#. /$(GS_MAKEFILES_DIR)/GNUstep.sh; \
	#    $(MAKE) -C Documentation/Back
	
	touch build-stamp

clean: config.status
	dh_testdir
	dh_testroot
	rm -f build-stamp
	
	-. /$(GS_MAKEFILES_DIR)/GNUstep.sh; \
		$(MAKE) -C Documentation clean
	
	-. /$(GS_MAKEFILES_DIR)/GNUstep.sh; \
		$(MAKE) clean
	
	-. /$(GS_MAKEFILES_DIR)/GNUstep.sh; \
		$(MAKE) -C Documentation distclean
	
	-. /$(GS_MAKEFILES_DIR)/GNUstep.sh; \
		$(MAKE) distclean
	
	rm -f Documentation/version.texi
	rm -rf Source/*.bundle
	-find -name obj | xargs rm -f
	rm -f gnustep-xlib gnustep-back
	rm -f Tools/xdnd.c Tools/XGCommonFont.m
	rm -f config.h
	
	dh_clean

install: build
	dh_testdir
	dh_testroot
	dh_clean -k
	dh_installdirs
	
	. /$(GS_MAKEFILES_DIR)/GNUstep.sh; \
	    $(MAKE) install fonts=no \
		INSTALL_ROOT_DIR=$(d_back) \
	  	GNUSTEP_INSTALLATION_DIR=$(d_back)/$(GS_SYSTEM_ROOT)
	
	: # override lintian warnings
	dh_installdirs -p$(p_back) usr/share/lintian/overrides
	cp -p \
	    $(CURDIR)/debian/$(p_back).lintian-overrides \
	    $(d_back)/usr/share/lintian/overrides/$(p_back)
	
	: # override linda warnings
	dh_installdirs -p$(p_back) usr/share/linda/overrides
	cp -p \
	    $(CURDIR)/debian/$(p_back).linda-overrides \
	    $(d_back)/usr/share/linda/overrides/$(p_back)
	
	
	. /$(GS_MAKEFILES_DIR)/GNUstep.sh; \
	    $(MAKE) -C Documentation install \
		INSTALL_ROOT_DIR=$(d_back) \
	  	GNUSTEP_INSTALLATION_DIR=$(d_back)/$(GS_SYSTEM_ROOT)
		
	# : Symlink
	dh_link -p$(p_back) \
	$(GS_DOC_DIR)/Developer usr/share/doc/$(p_back)/Developer
	
	# : Install Fonts
	dh_install debian/Fonts $(GS_SYSTEM_ROOT)/Library
	
	: # Wrapper scripts
	for i in gpbs; do \
	  dh_link -p$(p_back) usr/bin/gnustep-tool-wrapper usr/bin/$$i; \
	done


# Build architecture-independent files here.
binary-indep:
# We have nothing to do by default.

# Build architecture-dependent files here.
binary-arch: control-file build install
	dh_testdir
	dh_testroot
	dh_installchangelogs ChangeLog
	dh_installdocs Documentation/{ANNOUNCE,NEWS,README}
	dh_installman Tools/gpbs.1
	dh_link
	dh_strip
	
	strip \
	  --remove-section=.comment --remove-section=.note --strip-unneeded \
	    $(d_back)/$(GS_SYSTEM_ROOT)/Library/Bundles/*.bundle/libgnu*
	
	dh_compress
	dh_fixperms
	dh_makeshlibs -V
	dh_installdeb
	
	dh_shlibdeps -a \
		-l$(d_back)/$(GS_LIBS_DIR)
	
	dh_gencontrol
	dh_md5sums
	dh_builddeb

upstream: build-stamp
	dh_testdir
	dh_testroot
	. /$(GS_MAKEFILES_DIR)/GNUstep.sh; \
	    $(MAKE) install fonts=no \
		INSTALL_ROOT_DIR=$(CURDIR)/debian/upstream \
	  	GNUSTEP_INSTALLATION_DIR=$(CURDIR)/debian/upstream/$(GS_SYSTEM_ROOT)

binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install control-file upstream