tizen 2.0 init
[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-replaygain            \
37                 --disable-smpte                 \
38                 --disable-spectrum              \
39                 --disable-videobox              \
40                 --disable-videomixer            \
41                 --disable-y4m                   \
42                 --disable-directsound           \
43                 --disable-oss                   \
44                 --disable-sunaudio              \
45                 --disable-osx_aidio             \
46                 --disable-osx_video             \
47                 --disable-aalib                 \
48                 --disable-aalibtest             \
49                 --disable-annodex               \
50                 --disable-cairo                 \
51                 --disable-esd                   \
52                 --disable-esdtest               \
53                 --disable-flac                  \
54                 --disable-gconf                 \
55                 --disable-hal                   \
56                 --disable-libcaca               \
57                 --disable-libdv                 \
58                 --disable-dv1394                \
59                 --disable-shout2                \
60                 --disable-shout2test            \
61                 --disable-speex                 \
62                 --disable-taglib
63
64 #--disable-wavenc   \
65 #--disable-bz2 \
66 #--disable-jpeg \
67 #--disable-autodetext \
68 #--disable-wavpack \
69 #--disable-avi \
70 #--disable-soup \
71 #--disable-id3demux \
72 #--disable-qtdemux \
73 #--disable-rtp \
74 #--disable-rtpmanager \
75 #--disable-udp \
76 #--disable-gst_v4l2 \
77 #--disable-taglib \
78 #--disable-zlib \
79 #--disable-wavparse \
80 #--disable-videofilter \
81 #--disable-libpng \
82 #--disable-x \
83 #--disable-xshm \
84 #--disable-xvideo \
85 #--disable-videocrop \
86
87 CFLAGS += -DGST_EXT_SOUP_MODIFICATION
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