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