]> git.pld-linux.org Git - SPECS.git/blob - w32codec.spec
SPECS updated Tue 30 Apr 15:13:02 CEST 2024
[SPECS.git] / w32codec.spec
1 # TODO
2 # - http://security.gentoo.org/glsa/glsa-200803-08.xml
3 #
4 # Conditional build:
5 %bcond_with     license_agreement       # generates package
6 %define         source_url      http://www.mplayerhq.hu/MPlayer/releases/codecs
7
8 %define         base_name       w32codec
9 %define         rel     1
10 Summary:        Binary compression/decompression libraries used by movie players
11 Summary(pl.UTF-8):      Binarne biblioteki do kompresji/dekompresji dla odtwarzaczy filmów
12 %if %{with license_agreement}
13 Name:           %{base_name}
14 %else
15 Name:           %{base_name}-installer
16 %endif
17 Version:        20110131
18 Release:        %{rel}%{?with_license_agreement:wla}
19 License:        Free for non-commercial use
20 Group:          Libraries
21 %if %{with license_agreement}
22 Source0:        %{source_url}/all-%{version}.tar.bz2
23 # NoSource0-md5:        303cf3cbf15e7084d1cfed3f0e3ef8e4
24 NoSource:       0
25 Provides:       avi-codecs
26 Obsoletes:      avi-codecs
27 Obsoletes:      w32codec-qt
28 %else
29 Source1:        http://svn.pld-linux.org/svn/license-installer/license-installer.sh
30 # Source1-md5:  329c25f457fea66ec502b7ef70cb9ede
31 Requires:       rpm-build-tools >= 4.4.37
32 Requires:       rpmbuild(macros) >= 1.544
33 Provides:       %{base_name}
34 %endif
35 ExclusiveArch:  %{ix86}
36 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
37 AutoReqProv:    no
38
39 # avoid empty debuginfo package
40 %define         _enable_debug_packages  0
41
42 %description
43 Libraries required to compress/decompress content of movie files. They
44 are used by movie players, but can be used to create compressed movie
45 files.
46
47 %description -l pl.UTF-8
48 Biblioteki niezbędne do kompresji/dekompresji filmów. Są one
49 wykorzystywane przez odtwarzacze, ale mogą być użyte do tworzenia
50 kompresowanych plików z filmami.
51
52 %prep
53 %if %{with license_agreement}
54 %setup -q -n all-%{version}
55 %endif
56
57 %install
58 rm -rf $RPM_BUILD_ROOT
59
60 %if %{without license_agreement}
61 install -d $RPM_BUILD_ROOT{%{_bindir},%{_datadir}/%{base_name}}
62
63 sed -e '
64         s/@BASE_NAME@/%{base_name}/g
65         s/@TARGET_CPU@/%{_target_cpu}/g
66         s-@VERSION@-%{version}-g
67         s-@RELEASE@-%{release}-g
68         s,@SPECFILE@,%{_datadir}/%{base_name}/%{base_name}.spec,g
69         s,@DATADIR@,%{_datadir}/%{base_name},g
70 ' %{SOURCE1} > $RPM_BUILD_ROOT%{_bindir}/%{base_name}.install
71 chmod +x $RPM_BUILD_ROOT%{_bindir}/%{base_name}.install
72
73 cp -a %{_specdir}/%{base_name}.spec $RPM_BUILD_ROOT%{_datadir}/%{base_name}
74
75 %else
76 install -d $RPM_BUILD_ROOT%{_libdir}/codecs
77 cp -a *.* $RPM_BUILD_ROOT%{_libdir}/codecs
78 # essential of these are in in linuxcodec.spec
79 # (i.e. all except {atrc,cook,ddnt,dnet,drv[234]}.so.6.0 from rp9codecs-20050115 and vid_{cvid,cyuv,h26[13],iv{32,41,50}}.xa from xanimdlls-20040626
80 rm -f $RPM_BUILD_ROOT%{_libdir}/codecs/*.so*
81 rm -f $RPM_BUILD_ROOT%{_libdir}/codecs/*.xa
82 %endif
83
84 %if %{without license_agreement}
85 %post
86 %{_bindir}/%{base_name}.install
87 %endif
88
89 %clean
90 rm -rf $RPM_BUILD_ROOT
91
92 %files
93 %defattr(644,root,root,755)
94 %if %{with license_agreement}
95 %{_libdir}/codecs
96 %else
97 %attr(755,root,root) %{_bindir}/w32codec.install
98 %{_datadir}/%{base_name}
99 %endif
This page took 1.128291 seconds and 3 git commands to generate.