Merge from master bf883501679502d078aa719efed53ca4b2d4328c.
[tagua/paolo.git] / debian / rules
blob33e3ef94353546a92d72110d612f89088d90a4a9
1 #!/usr/bin/make -f
2 # -*- makefile -*-
3 # Sample debian/rules that uses debhelper.
5 # This file was originally written by Joey Hess and Craig Small.
6 # As a special exception, when this file is copied by dh-make into a
7 # dh-make output file, you may use that output file without restriction.
8 # This special exception was added by Craig Small in version 0.37 of dh-make.
10 # Modified to make a template file for a multi-binary package with separated
11 # build-arch and build-indep targets by Bill Allombert 2001
13 # Uncomment this to turn on verbose mode.
14 #export DH_VERBOSE=1
16 # This has to be exported to make some magic below work.
17 export DH_OPTIONS
19 configure: CMakeCache.txt
20 CMakeCache.txt:
21 dh_testdir
22 rm -rf CMakeCache.txt BUILD
23 mkdir BUILD
24 cd BUILD && cmake \
25 -DSYSTEM_LUA=yes \
26 -DCMAKE_INSTALL_PREFIX:PATH=/usr \
27 -DQT_QMAKE_EXECUTABLE:FILEPATH=/usr/bin/qmake-qt4 ..
30 #Architecture
31 build: build-arch build-indep
33 build-arch: build-stamp
34 build-stamp: BUILD/CMakeCache.txt
36 $(MAKE) -C BUILD
37 touch $@
39 build-indep:
40 # nothing to do here
42 clean:
43 dh_testdir
44 dh_testroot
45 rm -f build-stamp
47 rm -f CMakeCache.txt
48 rm -rf CMakeTmp
49 $(MAKE) -C BUILD clean
51 dh_clean
53 install: SHELL=/bin/bash
54 install:
55 dh_testdir
56 dh_testroot
57 dh_clean -k
59 $(MAKE) -C BUILD DESTDIR=$(CURDIR)/debian/tmp install
60 cd debian/tmp && mv usr/bin usr/games
62 dh_movefiles
63 test -z "$$(find debian/tmp ! -type d | tee >(cat >&2))"
65 dh_install
67 # Must not depend on anything. This is to be called by
68 # binary-arch/binary-indep
69 # in another 'make' thread.
70 binary-common:
71 dh_testdir
72 dh_testroot
73 dh_installchangelogs CHANGELOG
74 dh_installdocs
75 dh_installexamples
76 dh_installmenu
77 # dh_installdebconf
78 # dh_installmime
79 # dh_python
80 # dh_installinfo
81 dh_installman
82 dh_link
83 dh_strip
84 dh_compress
85 dh_fixperms
86 # dh_perl
87 dh_makeshlibs
88 dh_installdeb
89 dh_shlibdeps
90 dh_gencontrol
91 dh_md5sums
92 dh_builddeb
94 # Build architecture independant packages using the common target.
95 binary-indep: build-indep install
96 $(MAKE) -f debian/rules DH_OPTIONS=-i binary-common
98 # Build architecture dependant packages using the common target.
99 binary-arch: build-arch install
100 $(MAKE) -f debian/rules DH_OPTIONS=-s binary-common
102 binary: binary-arch binary-indep
103 .PHONY: build clean binary-indep binary-arch binary install configure