]> git.pld-linux.org Git - packages/gpac.git/blob - gpac.spec
- repairs with amr bcond return
[packages/gpac.git] / gpac.spec
1 #
2 # TODO: soname for libm4systems(?)
3 # - use system mozilla includes
4 #
5 # Conditional build:
6 %bcond_with     amr
7 %bcond_without  faad
8 %bcond_without  ffmpeg
9 %bcond_without  freetype
10 %bcond_without  jpeg
11 %bcond_without  js
12 %bcond_without  mad
13 %bcond_without  png
14 %bcond_without  xvid
15 %bcond_with     wx
16 #
17 Summary:        GPAC - an implementation of the MPEG-4 Systems standard (ISO/IEC 14496-1)
18 Summary(pl):    GPAC - implementacja standardu MPEG-4 Systems (ISO/IEC 14496-1)
19 Name:           gpac
20 Version:        0.4.0
21 Release:        1
22 License:        LGPL
23 Group:          Applications
24 Source0:        http://dl.sourceforge.net/gpac/%{name}-%{version}.tar.gz
25 # Source0-md5:  a8b4b3206cabda946850240f1e7aea93
26 Source1:        http://www.3gpp.org/ftp/Specs/archive/26_series/26.073/26073-530.zip
27 # Source1-md5:  705f6993fbf890e92eb7a331e7c716d1
28 Patch0:         %{name}-install.patch
29 Patch1:         %{name}-wxWidgets.patch
30 URL:            http://gpac.sourceforge.net/
31 BuildRequires:  SDL-devel
32 %{?with_faad:BuildRequires:     faad2-devel}
33 %{?with_ffmpeg:BuildRequires:   ffmpeg-devel}
34 %{?with_freetype:BuildRequires: freetype-devel}
35 %{?with_js:BuildRequires:       js-devel}
36 %{?with_jpeg:BuildRequires:     libjpeg-devel}
37 %{?with_mad:BuildRequires:      libmad-devel}
38 %{?with_png:BuildRequires:      libpng-devel}
39 BuildRequires:  libxml2-devel
40 BuildRequires:  rpmbuild(macros) >= 1.236
41 %{?with_wx:BuildRequires:       wxGTK2-devel >= 2.5.4}
42 %{?with_xvid:BuildRequires:     xvid-devel}
43 Requires:       SDL
44 %{?with_faad:Requires:  faad2}
45 %{?with_ffmpeg:Requires:        ffmpeg}
46 %{?with_freetype:Requires:      freetype}
47 %{?with_js:Requires:    js}
48 %{?with_jpeg:Requires:  libjpeg}
49 %{?with_mad:Requires:   libmad}
50 %{?with_png:Requires:   libpng}
51 %{?with_xvid:Requires:  xvid}
52 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
53
54 %define         _noautoreq   libm4systems.so
55 %define         _plugindir      %{_libdir}/browser-plugins
56
57 %description
58 GPAC is an implementation of the MPEG-4 Systems standard (ISO/IEC
59 14496-1) developed from scratch in ANSI C.
60
61 The main development goal is to provide a clean (a.k.a. readable by as
62 many people as possible), small and flexible alternative to the MPEG-4
63 Systems reference software (known as IM1 and distributed in ISO/IEC
64 14496-5). The MPEG-4 Reference software is indeed a very large piece
65 of software, designed to verify the standard rather than provide a
66 small, production-stable software. GPAC is written in ANSI C for
67 portability reasons (embedded platforms and DSPs) with a simple goal:
68 keep the memory footprint as low as possible. The project will at term
69 provide player(s), systems encoders and publishing tools for content
70 distribution.
71
72 %description -l pl
73 GPAC to implementacja standardu MPEG-4 Systems (ISO/IEC 14496-1)
74 stworzona od zera w ANSI C.
75
76 G³ównym celem tworzenia jej jest dostarczenie czystej (tzn. czytelnej
77 dla jak najwiêkszej liczby ludzi), ma³ej i elastycznej alternatywy dla
78 wzorcowego oprogramowania MPEG-4 Systems (znanego jako IM1 i
79 rozprowadzanego w ISO/IEC 14496-5). Wzorcowe oprogramowanie MPEG-4
80 jest bardzo du¿± porcj± kodu, zaprojektowan± raczej do zweryfikowania
81 standardu ni¿ dostarczenia ma³ej, stabilnej wersji produkcyjnej. GPAC
82 jest pisany w ANSI C ze wzglêdu na przeno¶no¶æ (platformy wbudowane i
83 DSP) z prostym celem: wymagaæ tak ma³o pamiêci, jak to tylko mo¿liwe.
84 Projekt docelowo dostarczy odtwarzacz(e), kodery systemowe i narzêdzia
85 do publikacji w celu dystrybucji materia³ów.
86
87 %package -n browser-plugin-%{name}
88 Summary:        GPAC browser plugin
89 Summary(pl):    Wtyczka GPAC do przegl±derek WWW
90 Group:          X11/Libraries
91 Requires:       %{name} = %{version}-%{release}
92 Requires:       browser-plugins(%{_target_cpu})
93
94 %define browsers mozilla, mozilla-firefox
95
96 %description -n browser-plugin-%{name}
97 GPAC plugin for Netscape-compatible WWW browsers.
98
99 Supported browsers: %{browsers}.
100
101 %description -n browser-plugin-%{name} -l pl
102 Wtyczka GPAC dla przegl±darek WWW zgodnych z Netscape.
103
104 Obs³ugiwane przegl±darki: %{browsers}.
105
106 %prep
107 %setup -q -n %{name}
108 %patch0 -p1
109 %{?with_wx:%patch1 -p1}
110 %if %{with amr}
111 mkdir -p Plugins/amr_dec/AMR_NB
112 cd Plugins/amr_dec/AMR_NB
113 unzip -j %{SOURCE1}
114 unzip -j 26073-530_ANSI_C_source_code.zip
115 cd ../../..
116 %endif
117 chmod a+x configure
118
119 # files for w32 and Linux were swapped
120 rm -rf applications/osmozilla/nsIOsmozilla.xpt_linux
121 mv applications/osmozilla/nsIOsmozilla.xpt_w32 applications/osmozilla/nsIOsmozilla.xpt_linux
122
123 %build
124 %configure \
125         --extra-cflags="-fPIC" \
126         --extra-ldflags="-fPIC" \
127         --enable-oss-audio \
128         %{?with_amr:--enable-amr-nb} \
129         %{!?with_faad:--disable-faad} \
130         %{!?with_ffmpeg:--disable-ffmpeg} \
131         %{!?with_freetype:--disable-ft} \
132         %{!?with_jpeg:--disable-jpeg} \
133         %{!?with_js:--disable-js} \
134         %{!?with_mad:--disable-mad} \
135         %{!?with_png:--disable-png} \
136         %{!?with_xvid:--disable-xvid}
137
138 %{__make} \
139         DESTDIR=$RPM_BUILD_ROOT
140
141 %install
142 rm -rf $RPM_BUILD_ROOT
143
144 %{__make} install \
145         bindir=$RPM_BUILD_ROOT%{_bindir} \
146         libdir=$RPM_BUILD_ROOT%{_libdir} \
147         mandir=$RPM_BUILD_ROOT%{_mandir} \
148         plugdir=$RPM_BUILD_ROOT%{_libdir}/gpac \
149         real_plugdir=%{_libdir}/gpac \
150         prefix=$RPM_BUILD_ROOT%{_prefix} \
151         MOZILLA_DIR=$RPM_BUILD_ROOT%{_plugindir}
152
153 %clean
154 rm -rf $RPM_BUILD_ROOT
155
156 %post   -p /sbin/ldconfig
157 %postun -p /sbin/ldconfig
158
159 %triggerin -n browser-plugin-%{name} -- mozilla-firefox
160 %nsplugin_install -d %{_libdir}/mozilla-firefox/plugins nposmozilla.so nposmozilla.xpt
161
162 %triggerun -n browser-plugin-%{name} -- mozilla-firefox
163 %nsplugin_uninstall -d %{_libdir}/mozilla-firefox/plugins nposmozilla.so nposmozilla.xpt
164
165 %triggerin -n browser-plugin-%{name} -- mozilla
166 %nsplugin_install -d %{_libdir}/mozilla/plugins nposmozilla.so nposmozilla.xpt
167 if [ -d /usr/%{_lib}/mozilla ]; then
168         umask 022
169         rm -f /usr/%{_lib}/mozilla/components/{compreg,xpti}.dat
170         if [ -x /usr/bin/regxpcom ]; then
171                 MOZILLA_FIVE_HOME=/usr/%{_lib}/mozilla /usr/bin/regxpcom
172         fi
173 fi
174
175 %triggerun -n browser-plugin-%{name} -- mozilla
176 %nsplugin_uninstall -d %{_libdir}/mozilla/plugins nposmozilla.so nposmozilla.xpt
177 if [ -d /usr/%{_lib}/mozilla ]; then
178         umask 022
179         rm -f /usr/%{_lib}/mozilla/components/{compreg,xpti}.dat
180         if [ -x /usr/bin/regxpcom ]; then
181                 MOZILLA_FIVE_HOME=/usr/%{_lib}/mozilla /usr/bin/regxpcom
182         fi
183 fi
184
185 %files
186 %defattr(644,root,root,755)
187 %doc AUTHORS BUGS Changelog README TODO
188 %attr(755,root,root) %{_bindir}/*
189 %attr(755,root,root) %{_libdir}/lib*.so
190 %dir %{_libdir}/gpac
191 %attr(755,root,root) %{_libdir}/gpac/*.so
192 %{_mandir}/man1/*
193
194 %files -n browser-plugin-%{name}
195 %defattr(644,root,root,755)
196 %attr(755,root,root) %{_plugindir}/nposmozilla.so
197 %{_plugindir}/nposmozilla.xpt
This page took 0.103956 seconds and 4 git commands to generate.