upload tizen1.0 source
[framework/multimedia/gst-plugins-good0.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
11 CFLAGS ?= -Wall -g -fPIC
12 LDFLAGS ?= 
13 PREFIX ?= /usr
14 DATADIR ?= /opt
15
16 CONFIGURE_OPTION += --disable-static \
17 --disable-nls \
18 --with-html-dir=/tmp/dump \
19 --disable-examples \
20 --disable-gconftool    \
21 --disable-alpha    \
22 --disable-apetag   \
23 --disable-audiofx  \
24 --disable-auparse  \
25 --disable-cutter   \
26 --disable-debugutils    \
27 --disable-deinterlace  \
28 --disable-effectv  \
29 --disable-equalizer    \
30 --disable-icydemux \
31 --disable-flx  \
32 --disable-goom \
33 --disable-goom2k1  \
34 --disable-level    \
35 --disable-monoscope    \
36 --disable-multipart    \
37 --disable-replaygain   \
38 --disable-smpte    \
39 --disable-spectrum \
40 --disable-videobox \
41 --disable-videomixer   \
42 --disable-y4m  \
43 --disable-directsound  \
44 --disable-oss  \
45 --disable-sunaudio \
46 --disable-osx_aidio    \
47 --disable-osx_video    \
48 --disable-aalib    \
49 --disable-aalibtest    \
50 --disable-annodex  \
51 --disable-cairo    \
52 --disable-esd  \
53 --disable-esdtest  \
54 --disable-flac \
55 --disable-gconf    \
56 --disable-hal  \
57 --disable-libcaca  \
58 --disable-libdv    \
59 --disable-dv1394   \
60 --disable-shout2   \
61 --disable-shout2test   \
62 --disable-speex \
63 --disable-taglib
64
65 #--disable-wavenc   \
66 #--disable-bz2 \
67 #--disable-jpeg \
68 #--disable-autodetext \
69 #--disable-wavpack \
70 #--disable-avi \
71 #--disable-soup \
72 #--disable-id3demux \
73 #--disable-qtdemux \
74 #--disable-rtp \
75 #--disable-rtpmanager \
76 #--disable-udp \
77 #--disable-gst_v4l2 \
78 #--disable-taglib \
79 #--disable-zlib \
80 #--disable-wavparse \
81 #--disable-videofilter \
82 #--disable-libpng \
83 #--disable-x \
84 #--disable-xshm \
85 #--disable-xvideo \
86 #--disable-videocrop \
87
88
89 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
90         CFLAGS += -O0
91 else
92         CFLAGS += -O2
93 endif
94
95 #ifneq (,$(findstring arm, $(DEB_HOST_GNU_TYPE)))
96 #endif
97
98 # architecture is not arm
99 ifneq (, $(findstring arm, $(DEB_HOST_ARCH)))
100         # ARM
101         CONFIGURE_OPTION += --enable-divx-drm
102 else
103         # OTHER
104 endif
105
106 LDFLAGS += -Wl,--hash-style=both -Wl,--as-needed
107
108 config.status: configure
109         dh_testdir
110         ./autogen.sh
111         # Add here commands to configure the package.
112         ./configure $(CONFIGURE_OPTION) --prefix=$(PREFIX) CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)"
113
114 #configure:
115 #       dh_testdir
116 #       ./autogen.sh
117
118 build: build-stamp
119 build-stamp:  config.status
120         dh_testdir
121
122         # Add here commands to compile the package.
123         $(MAKE)
124
125         for f in `find $(CURDIR)/debian/ -name "*.in"`; do \
126                 cat $$f > $${f%.in}; \
127                 sed -i -e "s#@PREFIX@#$(PREFIX)#g" $${f%.in}; \
128                 sed -i -e "s#@DATADIR@#$(DATADIR)#g" $${f%.in}; \
129         done
130
131         touch $@
132
133 clean::
134         dh_testdir
135         dh_testroot
136         rm -f build-stamp stamp-h1
137         # Add here commands to clean up after the build process.
138         -$(MAKE) clean
139
140 ifneq "$(wildcard /usr/share/misc/config.sub)" ""
141         cp -f /usr/share/misc/config.sub config.sub
142 endif
143 ifneq "$(wildcard /usr/share/misc/config.guess)" ""
144         cp -f /usr/share/misc/config.guess config.guess
145 endif
146
147         find ./ -depth -name "Makefile" -exec rm {} -f \;
148         find ./ -depth -name ".deps" -exec rm {} -rf \;
149         rm -f common/shave
150         rm -f common/shave-libtool
151         rm -f docs/version.entities
152         rm -f gconf/gstreamer.schemas
153         rm -f pkgconfig/gstreamer-plugins-good-uninstalled.pc
154         rm -f po/Makefile.in
155         rm -f po/POTFILES
156         rm -f tests/check/elements/.dirstamp
157         rm -f win32/common/config.h-new
158         rm -f _stdint.h
159         rm -f config.h
160         rm -f config.log
161         rm -f config.status
162         rm -f libtool
163
164         for f in `find $(CURDIR)/debian/ -name "*.in"`; do \
165                 rm -f $${f%.in}; \
166         done
167
168         dh_clean 
169
170 install: build
171         dh_testdir
172         dh_testroot
173         dh_clean -k 
174         dh_installdirs
175
176         # Add here commands to install the package into debian/tmp
177         $(MAKE) DESTDIR=$(CURDIR)/debian/tmp install
178
179 # Build architecture-independent files here.
180 binary-indep: build install
181 # We have nothing to do by default.
182
183 # Build architecture-dependent files here.
184 binary-arch: build install
185         dh_testdir
186         dh_testroot
187         dh_installchangelogs
188         dh_installdocs
189         dh_installexamples
190         dh_install --sourcedir debian/tmp --list-missing
191 #       dh_installmenu
192 #       dh_installdebconf       
193 #       dh_installlogrotate
194 #       dh_installemacsen
195 #       dh_installpam
196 #       dh_installmime
197 #       dh_python
198 #       dh_installinit
199 #       dh_installcron
200 #       dh_installinfo
201         dh_installman
202         dh_link
203         dh_strip --dbg-package=gstreamer0.10-plugins-good-dbg
204         dh_compress
205         dh_fixperms
206         dh_perl
207         dh_makeshlibs
208         dh_installdeb
209         dh_shlibdeps 
210         dh_gencontrol
211         dh_md5sums
212         dh_builddeb
213
214 binary: binary-indep binary-arch
215 .PHONY: build clean binary-indep binary-arch binary install