/[packages]/cauldron/libvpx/current/SPECS/libvpx.spec
ViewVC logotype

Contents of /cauldron/libvpx/current/SPECS/libvpx.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1798720 - (show annotations) (download)
Fri Mar 18 18:38:10 2022 UTC (3 months, 1 week ago) by umeabot
File size: 4272 byte(s)
Mageia 9 Mass Rebuild
1 %define major 6
2 %define libname %mklibname vpx %{major}
3 %define develname %mklibname vpx -d
4
5 # disable to build without php and doxygen
6 %define build_doc 1
7
8 Name: libvpx
9 Summary: VP8 Video Codec SDK
10 Version: 1.10.0
11 Release: %mkrel 2
12 License: BSD
13 Group: System/Libraries
14 URL: https://www.webmproject.org/tools/#libvpx-sdk
15 Source0: https://github.com/webmproject/libvpx/archive/v%{version}/%{name}-%{version}.tar.gz
16 %ifarch %{ix86} x86_64
17 BuildRequires: yasm
18 %endif
19 %if %{build_doc}
20 BuildRequires: doxygen
21 %endif
22
23 %description
24 libvpx provides the VP8 SDK, which allows you to integrate your applications
25 with the VP8 video codec, a high quality, royalty free, open source codec
26 deployed on millions of computers and devices worldwide.
27
28
29 %package -n %{libname}
30 Summary: VP8 Video Codec SDK
31 Group: System/Libraries
32
33 %description -n %{libname}
34 libvpx provides the VP8 SDK, which allows you to integrate your applications
35 with the VP8 video codec, a high quality, royalty free, open source codec
36 deployed on millions of computers and devices worldwide.
37
38
39 %package -n %{develname}
40 Summary: Development files for libvpx
41 Group: Development/C
42 Requires: %{libname} = %{version}-%{release}
43 Provides: %{name}-devel = %{version}-%{release}
44
45 %description -n %{develname}
46 Development libraries and headers for developing software against
47 libvpx.
48
49 %package utils
50 Summary: VP8 utilities and tools
51 Group: Video/Utilities
52 Requires: %{libname} = %{version}-%{release}
53
54 %description utils
55 A selection of utilities and tools for VP8, including a sample encoder
56 and decoder.
57
58
59 %prep
60 %setup -q
61
62 # fix permissions
63 chmod 644 AUTHORS CHANGELOG LICENSE README
64 %autopatch -p1
65
66 %build
67 %ifarch %{ix86}
68 %global vpxtarget x86-linux-gcc
69 %else
70 %ifarch x86_64
71 %global vpxtarget x86_64-linux-gcc
72 %else
73 %global vpxtarget generic-gnu
74 %endif
75 %endif
76 %set_build_flags
77
78 # The configure script will reject the shared flag on the generic target
79 # This means we need to fall back to the manual creation we did before. :P
80 %if "%{vpxtarget}" == "generic-gnu"
81 %global generic_target 1
82 %else
83 %global generic_target 0
84 %endif
85
86 sh ./configure \
87 --target=%{vpxtarget} \
88 --enable-pic \
89 --disable-install-srcs \
90 --prefix=%{_prefix} \
91 --libdir=%{_libdir} \
92 --enable-shared \
93 --size-limit=16384x16384 \
94 --enable-postproc \
95 --enable-experimental \
96 --enable-vp9-postproc \
97 --enable-vp8 \
98 --enable-vp9
99
100 %make_build verbose=true target=libs
101
102 # Temporarily dance the static libs out of the way
103 mv libvpx.a libNOTvpx.a
104 mv libvpx_g.a libNOTvpx_g.a
105
106 # We need to do this so the examples can link against it.
107 #ln -sf libvpx.so.%%{version} libvpx.so
108
109 %make_build verbose=true target=examples
110 %make_build verbose=true target=docs
111
112 # Put them back so the install doesn't fail
113 mv libNOTvpx.a libvpx.a
114 mv libNOTvpx_g.a libvpx_g.a
115
116 %install
117 make DIST_DIR=%{buildroot}%{_prefix} dist
118
119 # Install the pkg-config file
120 mkdir -p %{buildroot}%{_libdir}/pkgconfig/
121 ln -s vpx.pc %{buildroot}%{_libdir}/pkgconfig/libvpx.pc
122
123 %if %{build_doc}
124 # Simpler to label the dir as %doc.
125 mv %{buildroot}/usr/docs doc/
126 %endif
127
128 pushd %{buildroot}
129 # Stuff we don't need.
130 rm -rf usr/build/ usr/md5sums.txt usr/lib*/*.a usr/CHANGELOG usr/README
131 # Rename a few examples, move all to bindir
132 mv usr/bin/examples/postproc usr/bin/vp8_postproc
133 mv usr/bin/examples/simple_decoder usr/bin/vp8_simple_decoder
134 mv usr/bin/examples/simple_encoder usr/bin/vp8_simple_encoder
135 mv usr/bin/examples/twopass_encoder usr/bin/vp8_twopass_encoder
136 mv usr/bin/examples/decode_to_md5 usr/bin/vpx_decode_to_md5
137 mv usr/bin/examples/decode_with_drops usr/bin/vpx_decode_with_drops
138 mv usr/bin/examples/set_maps usr/bin/vpx_set_maps
139 mv usr/bin/examples/vp9_spatial_svc_encoder usr/bin/
140 mv usr/bin/examples/{vp8cx_set_ref,vp9cx_set_ref,vp9_lossless_encoder,vpx_temporal_svc_encoder} usr/bin/
141 rmdir usr/bin/examples
142 # Fix the binary permissions
143 chmod 755 usr/bin/*
144 popd
145
146 %files -n %{libname}
147 %doc AUTHORS CHANGELOG LICENSE README
148 %{_libdir}/libvpx.so.%{major}{,.*}
149
150 %files -n %{develname}
151 %if %{build_doc}
152 # These are SDK docs, not really useful to an end-user.
153 %doc docs/html
154 %endif
155 %{_libdir}/pkgconfig/*.pc
156 %{_libdir}/libvpx.so
157 # to fix weird header files permissions
158 %defattr(644,root,root,755)
159 %{_includedir}/vpx/
160
161 %files utils
162 %{_bindir}/*

  ViewVC Help
Powered by ViewVC 1.1.28