Git init
[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         --disable-pango                         \
29         --with-audioresample-format=int 
30
31 CFLAGS += -Wall -g -fPIC \
32         -DGST_EXT_TEXTRENDER_ENHANCEMENT \
33         -DGST_EXT_XV_ENHANCEMENT
34
35 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
36         CFLAGS += -O0
37 else
38         CFLAGS += -O2 
39 endif
40
41 # shared library versions, option 1
42 version=0.1
43 major=0
44 # option 2, assuming the library is created as src/.libs/libfoo.so.2.0.5 or so
45 #version=`ls src/.libs/lib*.so.* | \
46 # awk '{if (match($$0,/[0-9]+\.[0-9]+\.[0-9]+$$/)) print substr($$0,RSTART)}'`
47 #major=`ls src/.libs/lib*.so.* | \
48 # awk '{if (match($$0,/\.so\.[0-9]+$$/)) print substr($$0,RSTART+4)}'`
49
50 LDFLAGS += -Wl,--hash-style=both -Wl,--as-needed
51
52 config.status: configure
53         dh_testdir
54         # Add here commands to configure the package.
55         ./autogen.sh
56         ./configure $(CONFIGURE_OPTION) CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)"
57
58 configure:
59         dh_testdir
60
61 build: build-stamp
62 build-stamp:  config.status
63         dh_testdir
64
65         # Add here commands to compile the package.
66         $(MAKE)
67
68         touch $@
69
70 clean:
71         dh_testdir
72         dh_testroot
73         rm -f build-stamp stamp-h1
74         # Add here commands to clean up after the build process.
75         -$(MAKE) distclean
76
77         dh_clean 
78
79 install: build
80         dh_testdir
81         dh_testroot
82         dh_clean -k 
83         dh_installdirs
84
85         # Add here commands to install the package into debian/tmp
86         $(MAKE) DESTDIR=$(CURDIR)/debian/tmp install
87
88 # Build architecture-independent files here.
89 binary-indep: build install
90 # We have nothing to do by default.
91
92 # Build architecture-dependent files here.
93 binary-arch: build install
94         dh_testdir
95         dh_testroot
96         dh_installchangelogs
97         dh_install --sourcedir debian/tmp --list-missing
98         dh_link
99         dh_strip --dbg-package=gstreamer0.10-plugins-base-dbg
100         dh_compress
101         dh_fixperms
102         dh_makeshlibs
103         dh_installdeb
104         dh_shlibdeps 
105         dh_gencontrol
106         dh_md5sums
107         dh_builddeb
108
109 binary: binary-indep binary-arch
110 .PHONY: build clean binary-indep binary-arch binary install