File: rules

package info (click to toggle)
gabedit 2.1.8-2
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 11,000 kB
  • ctags: 10,585
  • sloc: ansic: 197,108; asm: 2,157; cpp: 2,081; sh: 1,164; makefile: 447; csh: 181; xml: 91
file content (96 lines) | stat: -rwxr-xr-x 2,388 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
#!/usr/bin/make -f
# -*- makefile -*-
# 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

PACKAGE=gabedit
INSTALL=/usr/bin/install

include /usr/share/dpatch/dpatch.make

GTKLIB        = `pkg-config --libs gtk+-2.0 glib-2.0 gtkgl-2.0 pangox`
GTKCFLAGS     = `pkg-config --cflags gtk+-2.0 glib-2.0 gtkgl-2.0 pangox`
OGLLIB        = -lGL -lGLU
OGLCFLAGS     = -I/usr/include
LIBPTHREAD    = -lpthread

CC            = gcc -g
COMMONCFLAGS  = -Wall

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

build: patch-stamp build-stamp
build-stamp: debian/gabedit.1
	dh_testdir
	cp -a src/OpenGL/Dep.mk src/OpenGL/Dep.mk.orig
	$(MAKE) -C src/OpenGL dep
	$(MAKE) external_gtkglarea=1 \
	        GTKLIB="$(GTKLIB)" \
		GTKCFLAGS="$(GTKCFLAGS)" \
		OGLLIB="$(OGLLIB)" \
	        OGLCFLAGS="$(OGLCFLAGS)" \
		LIBPTHREAD="$(LIBPTHREAD)" \
		COMMONCFLAGS="$(COMMONCFLAGS)" \
		CC="$(CC)"
	touch build-stamp

debian/gabedit.1: debian/gabedit.1.xml
	dh_testdir
	xsltproc --param make.year.ranges 1 \
         --param make.single.year.ranges 1 \
         --param man.charmap.use.subset 0 \
         $< -o debian/

clean: unpatch
	dh_testdir
	dh_testroot
	[ ! -f src/OpenGL/Dep.mk.orig ] || mv src/OpenGL/Dep.mk.orig src/OpenGL/Dep.mk
	$(MAKE) clean
	dh_clean build-stamp patch-stamp

install: build
	dh_testdir
	dh_testroot
	dh_clean -k 
	dh_installdirs
	for size in 16 24 32 48 ; do \
		$(INSTALL) -m 644 icons/Gabedit$${size}.png \
		    $(CURDIR)/debian/$(PACKAGE)/usr/share/icons/hicolor/$${size}x$${size}/apps/gabedit.png ; \
	done

# 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_testdir
	dh_testroot
	dh_install
	dh_installchangelogs 
	dh_installdocs
	dh_installexamples
	# fix permissions to be 0644
	chmod 644 $(CURDIR)/debian/$(PACKAGE)/usr/share/doc/$(PACKAGE)/examples/*
	dh_installman
	dh_installmenu
	dh_installmime
	dh_link
	dh_strip
	dh_compress $(CURDIR)/debian/$(PACKAGE)/usr/share/doc/$(PACKAGE)/examples/exampleGeoConv.gab
	dh_fixperms
	dh_installdeb
	dh_shlibdeps
	dh_gencontrol
	dh_md5sums
	dh_builddeb

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