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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1716490 - (hide annotations) (download)
Sun Apr 18 07:48:45 2021 UTC (9 months, 1 week ago) by daviddavid
File size: 4272 byte(s)
- new version: 1.10.0

1 daviddavid 1716490 %define major 6
2     %define libname %mklibname vpx %{major}
3     %define develname %mklibname vpx -d
4 ahmad 16735
5     # disable to build without php and doxygen
6 daviddavid 1716490 %define build_doc 1
7 ahmad 16735
8 luigiwalser 468447 Name: libvpx
9     Summary: VP8 Video Codec SDK
10 daviddavid 1716490 Version: 1.10.0
11 luigiwalser 1642960 Release: %mkrel 1
12 luigiwalser 468447 License: BSD
13     Group: System/Libraries
14 daviddavid 1423279 URL: https://www.webmproject.org/tools/#libvpx-sdk
15     Source0: https://github.com/webmproject/libvpx/archive/v%{version}/%{name}-%{version}.tar.gz
16 ahmad 16687 %ifarch %{ix86} x86_64
17 luigiwalser 468447 BuildRequires: yasm
18 ahmad 16687 %endif
19 luigiwalser 468447 %if %{build_doc}
20 ovitters 645572 BuildRequires: doxygen
21 ahmad 16735 %endif
22 ahmad 16687
23     %description
24 cjw 846206 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 ahmad 16687
28 kamil 195985
29 luigiwalser 468447 %package -n %{libname}
30     Summary: VP8 Video Codec SDK
31     Group: System/Libraries
32 ahmad 16687
33 luigiwalser 468447 %description -n %{libname}
34 cjw 846206 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 ahmad 16687
38    
39 luigiwalser 468447 %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 ahmad 16687
45 luigiwalser 468447 %description -n %{develname}
46 cjw 846206 Development libraries and headers for developing software against
47 ahmad 16687 libvpx.
48    
49 luigiwalser 468447 %package utils
50     Summary: VP8 utilities and tools
51     Group: Video/Utilities
52     Requires: %{libname} = %{version}-%{release}
53 ahmad 16687
54 luigiwalser 468447 %description utils
55 ahmad 16687 A selection of utilities and tools for VP8, including a sample encoder
56     and decoder.
57    
58 kamil 195985
59 ahmad 16687 %prep
60 daviddavid 1423279 %setup -q
61 ahmad 16687
62 ahmad 75316 # fix permissions
63     chmod 644 AUTHORS CHANGELOG LICENSE README
64 ovitters 877441 %autopatch -p1
65 ahmad 75316
66 ahmad 16687 %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 wally 1474337 %set_build_flags
77 ahmad 16687
78 ahmad 74533 # 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 ahmad 16687
86 cjw 846206 sh ./configure \
87 ahmad 74533 --target=%{vpxtarget} \
88     --enable-pic \
89     --disable-install-srcs \
90     --prefix=%{_prefix} \
91     --libdir=%{_libdir} \
92 luigiwalser 823142 --enable-shared \
93 cjw 846206 --size-limit=16384x16384 \
94     --enable-postproc \
95 cjw 1230223 --enable-experimental \
96 cjw 846206 --enable-vp9-postproc \
97     --enable-vp8 \
98     --enable-vp9
99 ahmad 16687
100 daviddavid 1423279 %make_build verbose=true target=libs
101 rtp 89409
102 ahmad 16687 # 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 daviddavid 1423279 #ln -sf libvpx.so.%%{version} libvpx.so
108 ahmad 16687
109 daviddavid 1423279 %make_build verbose=true target=examples
110     %make_build verbose=true target=docs
111 ahmad 16687
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 ahmad 74533 make DIST_DIR=%{buildroot}%{_prefix} dist
118 ahmad 16687
119     # Install the pkg-config file
120     mkdir -p %{buildroot}%{_libdir}/pkgconfig/
121 fwang 132868 ln -s vpx.pc %{buildroot}%{_libdir}/pkgconfig/libvpx.pc
122 ahmad 16687
123 luigiwalser 468447 %if %{build_doc}
124 ahmad 74533 # Simpler to label the dir as %doc.
125     mv %{buildroot}/usr/docs doc/
126     %endif
127    
128 ahmad 16687 pushd %{buildroot}
129     # Stuff we don't need.
130     rm -rf usr/build/ usr/md5sums.txt usr/lib*/*.a usr/CHANGELOG usr/README
131 cjw 846206 # 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 tv 992380 mv usr/bin/examples/vp9_spatial_svc_encoder usr/bin/
140 cjw 1097834 mv usr/bin/examples/{vp8cx_set_ref,vp9cx_set_ref,vp9_lossless_encoder,vpx_temporal_svc_encoder} usr/bin/
141 cjw 846206 rmdir usr/bin/examples
142 ahmad 16687 # Fix the binary permissions
143     chmod 755 usr/bin/*
144     popd
145    
146 luigiwalser 468447 %files -n %{libname}
147 ahmad 16687 %doc AUTHORS CHANGELOG LICENSE README
148 ovitters 877441 %{_libdir}/libvpx.so.%{major}{,.*}
149 ahmad 16687
150 luigiwalser 468447 %files -n %{develname}
151     %if %{build_doc}
152 ahmad 16687 # These are SDK docs, not really useful to an end-user.
153     %doc docs/html
154 ahmad 16735 %endif
155 fwang 132868 %{_libdir}/pkgconfig/*.pc
156 ahmad 16687 %{_libdir}/libvpx.so
157 ahmad 75316 # to fix weird header files permissions
158     %defattr(644,root,root,755)
159     %{_includedir}/vpx/
160 ahmad 16687
161     %files utils
162     %{_bindir}/*

  ViewVC Help
Powered by ViewVC 1.1.28