49e5ea4c8cfafe432051664cfdcd8255bb5e1f30
[framework/multimedia/gst-plugins-ext0.10.git] / debian / rules
1 #!/usr/bin/make -f
2 # -*- makefile -*-
3 # Sample debian/rules that uses debhelper.
4 # This file was originally written by Joey Hess and Craig Small.
5 # As a special exception, when this file is copied by dh-make into a
6 # dh-make output file, you may use that output file without restriction.
7 # This special exception was added by Craig Small in version 0.37 of dh-make.
8
9 # Uncomment this to turn on verbose mode.
10 #export DH_VERBOSE=1
11
12
13 # These are used for cross-compiling and for saving the configure script
14 # from having to guess our platform (since we know it already)
15 DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
16 DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
17 DEB_HOST_ARCH       ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
18 DEB_HOST_ARCH_OS    ?= $(shell dpkg-architecture -qDEB_HOST_GNU_OS)
19
20 CFLAGS += -Wall -g
21 LDFLAGS ?=
22 PREFIX ?= /usr
23 DATADIR ?= /opt
24
25 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
26         CFLAGS += -O0
27 else
28         CFLAGS += -O2
29 endif
30
31 MODULES=
32 #       --disable-ext-evasimagesink
33
34 LDFLAGS += -Wl,--rpath=$(PREFIX)/lib -Wl,--as-needed
35
36 config.status: configure
37         dh_testdir
38         # Add here commands to configure the package.
39         ./autogen.sh
40         CFLAGS="$(CFLAGS) -DGST_EXT_TIME_ANALYSIS -DEXPORT_API=\"__attribute__((visibility(\\\"default\\\")))\" " LDFLAGS="$(LDFLAGS)" ./configure $(MODULES) $(OPTION) --prefix=$(PREFIX)
41
42 build: build-stamp
43
44 build-stamp:  config.status
45         dh_testdir
46
47         # Add here commands to compile the package.
48         $(MAKE)
49         #docbook-to-man debian/ncurses.sgml > ncurses.1
50
51         for f in `find $(CURDIR)/debian/ -name "*.in"`; do \
52                 cat $$f > $${f%.in}; \
53                 sed -i -e "s#@PREFIX@#$(PREFIX)#g" $${f%.in}; \
54                 sed -i -e "s#@DATADIR@#$(DATADIR)#g" $${f%.in}; \
55         done
56
57         touch $@
58
59 clean:
60         dh_testdir
61         dh_testroot
62         rm -f build-stamp
63
64         # Add here commands to clean up after the build process.
65         -$(MAKE) distclean
66 ifneq "$(wildcard /usr/share/misc/config.sub)" ""
67         cp -f /usr/share/misc/config.sub config.sub
68 endif
69 ifneq "$(wildcard /usr/share/misc/config.guess)" ""
70         cp -f /usr/share/misc/config.guess config.guess
71 endif
72
73         for f in `find $(CURDIR)/debian/ -name "*.in"`; do \
74                 rm -f $${f%.in}; \
75         done
76
77         dh_clean
78
79 install: build
80         dh_testdir
81         dh_testroot
82         dh_clean -k
83         dh_installdirs -s
84
85         # Add here commands to install the package into debian/ncurses.
86         $(MAKE) DESTDIR=$(CURDIR)/debian/tmp install
87 #ifneq (, $(findstring arm, $(DEB_HOST_ARCH)))
88 #       execstack -c $(EXECSTACK_FILES)
89 #endif
90
91
92 # Build architecture-independent files here.
93 binary-indep: build install
94 # We have nothing to do by default.
95
96 # Build architecture-dependent files here.
97 binary-arch: build install
98         dh_testdir
99         dh_testroot
100         dh_installchangelogs -s
101 #       dh_installdocs
102 #       dh_installexamples
103         dh_install -s --list-missing --sourcedir=debian/tmp
104 #       dh_installmenu
105 #       dh_installdebconf
106 #       dh_installlogrotate
107 #       dh_installemacsen
108 #       dh_installpam
109 #       dh_installmime
110 #       dh_python
111 #       dh_installinit
112 #       dh_installcron
113 #       dh_installinfo
114 #       dh_installman
115         dh_link -s
116         dh_strip -s --dbg-package=gstreamer0.10-plugins-ext-dbg
117         dh_compress -s
118         dh_fixperms -s
119 #       dh_perl
120         dh_makeshlibs -s
121         dh_installdeb -s
122         dh_shlibdeps -s
123         dh_gencontrol -s
124         dh_md5sums -s
125         dh_builddeb -s
126
127 binary: binary-indep binary-arch
128 .PHONY: build clean binary-indep binary-arch binary install