tizen 2.3 release
[framework/multimedia/gst-plugins-base0.10.git] / debian / rules
1 #!/usr/bin/make -f
2
3 # Uncomment this to turn on verbose mode.
4 #export DH_VERBOSE=1
5
6 # These are used for cross-compiling and for saving the configure script
7 # from having to guess our platform (since we know it already)
8 DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
9 DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
10 DEB_HOST_ARCH       ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
11
12 CONFIGURE_OPTION +=--prefix=/usr                \
13                 --disable-static                \
14                 --disable-nls                   \
15                 --with-html-dir=/tmp/dump       \
16                 --disable-examples              \
17                 --disable-audiorate             \
18                 --disable-gdp                   \
19                 --disable-cdparanoia            \
20                 --disable-gnome_vfs             \
21                 --disable-libvisual             \
22                 --disable-freetypetest          \
23                 --disable-rpath                 \
24                 --disable-valgrind              \
25                 --disable-gcov                  \
26                 --disable-gtk-doc               \
27                 --disable-debug                 \
28                 --with-audioresample-format=int
29
30 CFLAGS += -Wall -g -fPIC                        \
31                 -DGST_EXT_XV_ENHANCEMENT        \
32                 -DGST_EXT_LINK_FIMCCONVERT      \
33                 -DGST_EXT_MIME_TYPES            \
34                 -DGST_EXT_ENABLE_SMI
35
36 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
37         CFLAGS += -O0
38 else
39         CFLAGS += -O2 
40 endif
41
42 # shared library versions, option 1
43 version=0.1
44 major=0
45 # option 2, assuming the library is created as src/.libs/libfoo.so.2.0.5 or so
46 #version=`ls src/.libs/lib*.so.* | \
47 # awk '{if (match($$0,/[0-9]+\.[0-9]+\.[0-9]+$$/)) print substr($$0,RSTART)}'`
48 #major=`ls src/.libs/lib*.so.* | \
49 # awk '{if (match($$0,/\.so\.[0-9]+$$/)) print substr($$0,RSTART+4)}'`
50
51 LDFLAGS += -Wl,--hash-style=both -Wl,--as-needed
52
53 config.status: configure
54         dh_testdir
55         # Add here commands to configure the package.
56         ./autogen.sh
57         ./configure $(CONFIGURE_OPTION) CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)"
58
59 configure:
60         dh_testdir
61
62 build: build-stamp
63 build-stamp:  config.status
64         dh_testdir
65
66         # Add here commands to compile the package.
67         $(MAKE)
68
69         touch $@
70
71 clean:
72         dh_testdir
73         dh_testroot
74         rm -f build-stamp stamp-h1
75         # Add here commands to clean up after the build process.
76         -$(MAKE) distclean
77
78         dh_clean 
79
80 install: build
81         dh_testdir
82         dh_testroot
83         dh_clean -k 
84         dh_installdirs
85
86         # Add here commands to install the package into debian/tmp
87         $(MAKE) DESTDIR=$(CURDIR)/debian/tmp install
88
89 # Build architecture-independent files here.
90 binary-indep: build install
91 # We have nothing to do by default.
92
93 # Build architecture-dependent files here.
94 binary-arch: build install
95         dh_testdir
96         dh_testroot
97         dh_installchangelogs
98         dh_install --sourcedir debian/tmp --list-missing
99         dh_link
100         dh_strip --dbg-package=gstreamer0.10-plugins-base-dbg
101         dh_compress
102         dh_fixperms
103         dh_makeshlibs
104         dh_installdeb
105         dh_shlibdeps 
106         dh_gencontrol
107         dh_md5sums
108         dh_builddeb
109
110 binary: binary-indep binary-arch
111 .PHONY: build clean binary-indep binary-arch binary install