e8625fcfee5648d0ccafc5e00350967a187b2343
[framework/multimedia/gstreamer0.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 # Include dpatch stuff
7 include /usr/share/dpatch/dpatch.make
8
9 # These are used for cross-compiling and for saving the configure script
10 # from having to guess our platform (since we know it already)
11 DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
12 DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
13
14 # fixit : need to check 
15 CFLAGS += -Wall -g -fPIC                        \
16                 -DGST_EXT_AV_RECORDING          \
17                 -DGST_EXT_QUEUE_ENHANCEMENT     \
18                 -DGST_EXT_CURRENT_BYTES         \
19                 -DGST_EXT_MODIFIED_DQBUF
20
21 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
22         CFLAGS += -O0
23 else
24         CFLAGS += -O2
25 endif
26
27 # shared library versions, option 1
28 version=0.10.22
29 major=1
30 # option 2, assuming the library is created as src/.libs/libfoo.so.2.0.5 or so
31 #version=`ls src/.libs/lib*.so.* | \
32 # awk '{if (match($$0,/[0-9]+\.[0-9]+\.[0-9]+$$/)) print substr($$0,RSTART)}'`
33 #major=`ls src/.libs/lib*.so.* | \
34 # awk '{if (match($$0,/\.so\.[0-9]+$$/)) print substr($$0,RSTART+4)}'`
35
36 LDFLAGS += -Wl,--hash-style=both -Wl,--as-needed
37
38 config.status:
39         dh_testdir
40         ./autogen.sh
41
42         ./configure --prefix=/usr               \
43                 --disable-valgrind              \
44                 --without-check                 \
45                 --disable-static                \
46                 --disable-rpath                 \
47                 --disable-libtool-lock          \
48                 --disable-alloc-trace           \
49                 --disable-gcov                  \
50                 --disable-nls                   \
51                 --disable-examples              \
52                 --disable-tests                 \
53                 --disable-failing-tests         \
54                 --disable-docbook               \
55                 --disable-gtk-doc               \
56                 --disable-registry-update       \
57                 --disable-loadsave              \
58                 --with-html-dir=/tmp/dump       \
59                 $(CONFIGURE_OPTIONS)            \
60                 CFLAGS="$(CFLAGS)"              \
61                 LDFLAGS="$(LDFLAGS)"
62
63
64 build: build-stamp
65 build-stamp: patch-stamp config.status
66         dh_testdir
67
68         $(MAKE) 
69         touch build-stamp
70
71 clean: clean1 unpatch   
72 clean1:
73         dh_testdir
74         dh_testroot
75         rm -f build-stamp patch-stamp
76
77         -$(MAKE) distclean
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_installdocs
99         dh_installexamples
100         dh_install --sourcedir=debian/tmp --list-missing
101         dh_link
102         dh_strip --dbg-package=libgstreamer0.10-0-dbg
103         dh_compress
104         dh_fixperms
105         dh_makeshlibs
106         dh_installdeb
107         dh_shlibdeps
108         dh_gencontrol
109         dh_md5sums
110         dh_builddeb
111
112 binary: binary-indep binary-arch
113 .PHONY: build clean binary-indep binary-arch binary install patch unpatch clean clean1