summaryrefslogtreecommitdiffstats
path: root/ubuntu/maverick_automake/applications/rosegarden/debian/rules
blob: a871ea6a6f2f2b2b38064b6e8a18e96556882606 (plain)
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
#!/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

include /usr/share/dpatch/dpatch.make

DEB_CONFIGURE_INCLUDEDIR := /opt/kde3/include/kde
DEB_CONFIGURE_MANDIR := /opt/kde3/share/man
DEB_CONFIGURE_PREFIX := /opt/kde3
DEB_CONFIGURE_INFODIR := /opt/kde3/share/info

cdbs_configure_flags := --with-qt-dir=/usr/share/qt3 --disable-rpath --with-xinerama $(cdbs_kde_enable_final) $(cdbs_kde_enable_debug)

DEB_BUILD_ARCH := $(shell dpkg --print-installation-architecture)
ARCH=$(DEB_BUILD_ARCH)

ifeq ($(ARCH),alpha)
CXXFLAGS+=-O0 -mieee
else
CXXFLAGS+=-O2
endif

# DEBUGGING FLAGS.
# CXXFLAGS+=-g3 -gstabs+ -fexceptions
# DEB_BUILD_OPTIONS+=nostrip
# export CXXFLAGS
# export DEB_BUILD_OPTIONS

###

configure: configure-stamp

configure-stamp:
	dh_testdir
	env PATH=/opt/kde3/bin:$(PATH) CMAKE_LIBRARY_PATH=/opt/kde3/lib CMAKE_INCLUDE_PATH=/opt/kde3/include/kde CMAKE_INSTALL_PREFIX=/usr cmake .
	touch configure-stamp

build: build-stamp

build-stamp: configure-stamp patch-stamp 
	dh_testdir
	env PATH=/opt/kde3/bin:$(PATH) CMAKE_LIBRARY_PATH=/opt/kde3/lib CMAKE_INCLUDE_PATH=/opt/kde3/include/kde make
	touch build-stamp

clean: unpatch
	dh_testdir
	dh_testroot

	[ ! -f Makefile ] || make clean
	rm -rf RGbuild
	rm -rf CMakeCache.txt
	rm -rf CMakeFiles
	rm -f build-stamp
	rm -f configure-stamp
	rm -f config.log
	dh_clean

install: build
	dh_testdir
	dh_testroot
	dh_clean -k
	dh_installdirs

	env PATH=/opt/kde3/bin:$(PATH) CMAKE_LIBRARY_PATH=/opt/kde3/lib CMAKE_INCLUDE_PATH=/opt/kde3/include/kde make install DESTDIR=`pwd`/debian/tmp 
	find debian/tmp/opt/kde3/share -type f -exec chmod 664 {} \;

# 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
	mkdir -p debian/rosegarden-kde3/opt/kde3/share/
	cp -Rp debian/rosegarden-kde3/usr/share/* debian/rosegarden-kde3/opt/kde3/share/
	rm -rf debian/rosegarden-kde3/usr/share/*
	dh_testdir
	dh_testroot
	dh_installexamples
	find debian/rosegarden-kde3/opt/kde3/share/doc/rosegarden -type f -exec chmod 664 {} \;
	dh_installdirs
	dh_installdocs
	dh_installmenu
	dh_installmime
	dh_installcron
	dh_installman debian/rosegarden.1 debian/rosegarden-lilypondview.1 debian/rosegarden-project-package.1 debian/rosegarden-audiofile-importer.1
	dh_desktop
	cp debian/lintianoverrides debian/rosegarden-kde3/opt/kde3/share/lintian/overrides/rosegarden
	dh_installinfo
	dh_installchangelogs
	dh_install
	dh_link
	dh_strip
	dh_compress -X.rg -X.wav -X.docbook
	dh_fixperms
	dh_makeshlibs
	dh_installdeb
	dh_shlibdeps
	dh_gencontrol
	dh_md5sums
	dh_builddeb

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