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