Macro qtTrIdx() replaced by tr() and QT_TRANSLATE_NOOP()
[mafwsubrenderer] / mafw-gst-subtitles-renderer / debian / rules
1 #!/usr/bin/make -f
2 # -*- makefile -*-
3
4 # Uncomment this to turn on verbose mode.
5 #export DH_VERBOSE=1
6
7 # These are used for cross-compiling and for saving the configure script
8 # from having to guess our platform (since we know it already)
9 DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
10 DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
11
12 CFLAGS = -Wall -g
13
14 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
15         CFLAGS += -O0
16 else
17         CFLAGS += -O2
18 endif
19
20 ifneq (,$(findstring thumb,$(DEB_BUILD_OPTIONS)))
21         CFLAGS += -mthumb
22 endif
23
24 ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
25         CFLAGS += -O0 -ggdb3 -finstrument-functions
26 endif
27
28 ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
29         INSTALL_PROGRAM += -s
30 endif
31 maybe_coverage := $(if $(filter lcov,$(DEB_BUILD_OPTIONS)),--enable-coverage,)
32
33 configure-stamp:
34         dh_testdir
35         CFLAGS="$(CFLAGS)" ./autogen.sh \
36                 --host=$(DEB_HOST_GNU_TYPE) \
37                 --build=$(DEB_BUILD_GNU_TYPE) \
38                 --disable-dependency-tracking \
39                 --prefix=/usr \
40                 $(maybe_coverage)
41         touch configure-stamp
42
43 build: build-stamp
44 build-stamp:  configure-stamp
45         dh_testdir
46         $(MAKE)
47 ifeq ($(findstring nocheck,$(DEB_BUILD_OPTIONS)),)
48         $(MAKE) check
49 endif
50         touch build-stamp
51
52 clean:
53         dh_testdir
54         dh_testroot
55         rm -f build-stamp configure-stamp
56         [ ! -f Makefile ] || $(MAKE) distclean
57         dh_clean 
58
59 install: build
60         dh_testdir
61         dh_testroot
62         dh_clean -k 
63         dh_installdirs
64         $(MAKE) install DESTDIR=$(CURDIR)/debian/tmp
65
66 binary-indep: build install
67
68 binary-arch: build install
69         dh_testdir
70         dh_testroot
71         dh_installchangelogs ChangeLog
72         dh_installdocs
73         dh_install --sourcedir=debian/tmp -v
74         dh_link
75         dh_strip --dbg-package=mafw-gst-subtitles-renderer
76         dh_compress
77         dh_fixperms
78         dh_installdeb
79         dh_shlibdeps
80         dh_gencontrol
81         dh_md5sums
82         dh_builddeb
83
84 binary: binary-indep binary-arch
85
86 distcheck: build
87         dh_testdir 
88         $(MAKE) distcheck
89
90 vg:
91         dh_testdir
92         $(MAKE) -C "$(CURDIR)/tests" vg
93                 
94
95 .PHONY: build clean binary-indep binary-arch binary install distcheck vg