tinycompresssink: add h/w volume set
[platform/upstream/gst-plugins-tizen.git] / packaging / gst-plugins-tizen.spec
1 # Do not create provides fro extension-tm1 because the main package
2 # should anchor any reverse-dependencies
3 %global __provides_exclude_from ^(.*\\.tm1)$
4
5 %bcond_with wayland
6 %bcond_with x
7 %define gst_branch 1.0
8
9 Name:       gst-plugins-tizen
10 Version:    1.0.0
11 Summary:    GStreamer tizen plugins (common)
12 Release:    65
13 Group:      Multimedia/Framework
14 Url:        http://gstreamer.freedesktop.org/
15 License:    LGPL-2.1+
16 Source0:    %{name}-%{version}.tar.gz
17
18 BuildRequires:  pkgconfig(gstreamer-audio-1.0)
19 BuildRequires:  pkgconfig(gstreamer-video-1.0)
20 BuildRequires:  pkgconfig(gstreamer-plugins-base-1.0)
21 BuildRequires:  pkgconfig(gstreamer-allocators-1.0)
22 BuildRequires:  pkgconfig(gstreamer-1.0)
23 BuildRequires:  pkgconfig(libexif)
24 %if %{with x}
25 BuildRequires:  pkgconfig(ecore-x)
26 BuildRequires:  pkgconfig(libdri2)
27 BuildRequires:  pkgconfig(x11)
28 BuildRequires:  pkgconfig(xext)
29 BuildRequires:  pkgconfig(xv)
30 BuildRequires:  pkgconfig(xdamage)
31 BuildRequires:  pkgconfig(xfixes)
32 BuildRequires:  pkgconfig(dri2proto)
33 %endif
34 BuildRequires:  pkgconfig(libdrm)
35 BuildRequires:  pkgconfig(libdrm_exynos)
36 BuildRequires:  pkgconfig(libtbm)
37 BuildRequires:  libdrm-devel
38 BuildRequires:  pkgconfig(vconf)
39 BuildRequires:  pkgconfig(mm-common)
40 BuildRequires:  pkgconfig(gles20)
41 BuildRequires:  pkgconfig(tpl-egl)
42 BuildRequires:  pkgconfig(tinycompress)
43 %if %{with wayland}
44 BuildRequires:  pkgconfig(wayland-client) >= 1.0.0
45 BuildRequires:  pkgconfig(wayland-tbm-client)
46 BuildRequires:  pkgconfig(tizen-extension-client)
47 %endif
48 %if 0%{?gtests:1}
49 BuildRequires:  pkgconfig(gmock)
50 %endif
51 # for tizencamerasrc
52 #BuildRequires:  pkgconfig(camera-hal-interface)
53 BuildRequires:  pkgconfig(capi-media-sound-manager)
54 BuildRequires:  pkgconfig(alsa)
55
56 %description
57 GStreamer tizen plugins (common)
58
59 %ifarch %{arm}
60 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
61 # if mobile || "undefined"
62 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
63 %package extension-TM1
64 Summary:        Extension for mobile TM1
65 Requires:       %{name} = %{version}-%{release}
66 #!BuildIgnore:  kernel-headers
67
68 %description extension-TM1
69 GStreamer tizen plugins Extension for mobile TM1
70 %endif
71 %endif
72
73 %prep
74 %setup -q
75
76
77 %build
78 export CFLAGS+=" -DTIZEN_FEATURE_WLSINK_ENHANCEMENT -DEXPORT_API=\"__attribute__((visibility(\\\"default\\\")))\" \
79                 -fstack-protector-strong -Wl,-z,relro -D_FORTIFY_SOURCE=2"
80 export CFLAGS_DEFAULT="$CFLAGS"
81
82 %ifarch %{arm}
83 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
84 # if mobile || "undefined"
85 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
86 # extension-TM1
87 export CFLAGS="$CFLAGS_DEFAULT -DTIZEN_FEATURE_PRODUCT_TM1"
88
89 ./autogen.sh --disable-static
90 %configure \
91 %if 0%{?gtests:1}
92         --enable-tests \
93 %endif
94 %if 0%{?tinycompresstest:1}
95         --enable-tinycompress_test\
96 %endif
97         --disable-drmdecryptor\
98         --enable-ext-wfdtizenmanager\
99         --enable-ext-alfec\
100         --disable-tizenipc\
101         --disable-tizencamerasrc\
102         --disable-static\
103         --with-tizen-platform \
104         --with-native-formats \
105         --with-gles2
106
107 make %{?jobs:-j%jobs}
108
109 mkdir -p tm1
110
111 %make_install
112 cp -a %{buildroot}%{_libdir}/gstreamer-%{gst_branch}/*.so tm1/
113 cp -a %{buildroot}%{_libdir}/libgstwfdbase.so* tm1/
114 %endif
115 %endif
116
117 # common
118 export CFLAGS="$CFLAGS_DEFAULT"
119
120 ./autogen.sh --disable-static
121 %configure \
122 %if 0%{?gtests:1}
123 i       --enable-tests \
124 %endif
125 %if 0%{?tinycompresstest:1}
126         --enable-tinycompress_test\
127 %endif
128         --disable-drmdecryptor\
129         --enable-ext-wfdtizenmanager\
130         --enable-ext-alfec\
131         --disable-tizenipc\
132         --disable-tizencamerasrc\
133         --disable-static\
134         --with-tizen-platform \
135         --with-native-formats \
136         --with-gles2
137
138 make %{?jobs:-j%jobs}
139
140 %install
141 rm -rf %{buildroot}
142 %make_install
143
144 %ifarch %{arm}
145 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
146 # if mobile || "undefined"
147 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
148 # extension-TM1
149 pushd tm1
150 for FILE in libgstwfdbase.so*; do mv "$FILE" "%{buildroot}%{_libdir}/$FILE.tm1"; done
151 for FILE in *.so; do mv "$FILE" "%{buildroot}%{_libdir}/gstreamer-%{gst_branch}/$FILE.tm1"; done
152 popd
153
154 %post extension-TM1
155 pushd %{_libdir}
156 for FILE in libgstwfdbase.so*.tm1; do mv "$FILE" "${FILE%.tm1}"; done
157 popd
158 pushd %{_libdir}/gstreamer-%{gst_branch}
159 for FILE in *.so.tm1; do mv "$FILE" "${FILE%.tm1}"; done
160 popd
161 /sbin/ldconfig
162
163 %preun extension-TM1
164 case "$1" in
165   0)
166     # This is an un-installation.
167     pushd %{_libdir}
168     for FILE in libgstwfdbase.so*; do mv "$FILE" "${FILE%.tm1}"; done
169     popd
170     pushd %{_libdir}/gstreamer-%{gst_branch}
171     for FILE in *.so; do mv "$FILE" "${FILE%.tm1}"; done
172     popd
173     /sbin/ldconfig
174   ;;
175   1)
176     # This is an upgrade.
177     # Do nothing.
178     :
179   ;;
180 esac
181
182 %files extension-TM1
183 %manifest gst-plugins-tizen1.0.manifest
184 %license COPYING
185 %{_libdir}/gstreamer-%{gst_branch}/*.so.tm1
186 %{_libdir}/libgstwfdbase.so*.tm1
187 %if 0%{?gtests:1}
188 %{_bindir}/gtest*
189 %endif
190 %endif
191 %endif
192
193 %files
194 %manifest gst-plugins-tizen1.0.manifest
195 %license COPYING
196 %defattr(-,root,root,-)
197 %{_libdir}/gstreamer-%{gst_branch}/*.so
198 %{_libdir}/libgstwfdbase.so*
199 %ifarch %{arm}
200 %exclude %{_libdir}/gstreamer-%{gst_branch}/*.so.tm1
201 %exclude %{_libdir}/libgstwfdbase.so*.tm1
202 %endif
203 %if 0%{?gtests:1}
204 %{_bindir}/gtest*
205 %endif
206 %if "%{tinycompresstest}" == "1"
207 %{_bindir}/tinycompress_test
208 %endif
209