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