Changeset 947 for spec/trunk/SPECS/libvpx.spec
- Timestamp:
- Feb 2, 2017, 11:21:14 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
spec/trunk/SPECS/libvpx.spec
r683 r947 1 # Add *.mymod files to the default list of files to be processed 2 %define _strip_opts --debuginfo -i "libvpx2.dll" 3 # whether to use Github, or Netlabs's svn 4 %define _github 0 1 %define svn_url http://svn.netlabs.org/repos/ports/libvpx/trunk 2 %define svn_rev 1355 5 3 6 # define _version 1.5.0 7 %define _version 1.4.0 8 %define github_name libvpx 9 10 %if %_github 11 %define github_url https://github.com/webmproject/%{github_name}/archive 12 %define github_rev %{_version} 13 %else 14 %define github_url http://svn.netlabs.org/repos/ports/libvpx/trunk 15 %define github_rev 1355 16 %endif 17 18 Name: %{github_name} 4 Name: libvpx 19 5 Summary: VP8 Video Codec SDK 20 Version: %{_version}21 Release: 1%{?dist}6 Version: 1.4.0 7 Release: 2%{?dist} 22 8 License: BSD 23 9 Group: System Environment/Libraries 24 10 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot 25 %if %_github 26 Source0: %{github_name}-%{github_rev}.zip 27 #Source0: http://webm.googlecode.com/files/%{name}-%{version}.tar.bz2 28 %else 29 Source0: %{name}-%{version}%{?github_rev:-r%{github_rev}}.zip 30 %endif 31 # Thanks to debian. 32 #Source2: libvpx.ver 33 Source1: donation.txt 34 Source2: libvpx-1.4.0.txt 35 Patch0: %{name}-rtcd.patch 36 # uncomment for version 1.4.0 or below 37 Patch1: %{name}-komh.patch 38 Patch2: %{name}-conf.patch 11 Source0: %{name}-%{version}%{?svn_rev:-r%{svn_rev}}.zip 39 12 URL: http://www.webmproject.org/tools/vp8-sdk/ 40 13 BuildRequires: nasm … … 61 34 # %setup -q 62 35 63 %if %_github 64 65 %if %(sh -c 'if test -f "%{_sourcedir}/%{github_name}-%{github_rev}.zip" ; then echo 1 ; else echo 0 ; fi') 66 %setup -n "%{github_name}-%{github_rev}" -q 67 %else 68 %setup -n "%{github_name}-%{github_rev}" -Tc 69 rm -f "%{_sourcedir}/%{github_name}-%{github_rev}.zip" 70 curl -sSL "%{github_url}/v%{github_rev}.zip" -o "%{_sourcedir}/%{github_name}-%{github_rev}.zip" 71 unzip -oC "%{_sourcedir}/%{github_name}-%{github_rev}.zip" -d .. 72 %endif 73 74 %else 75 76 %if %{?github_rev:%(sh -c 'if test -f "%{_sourcedir}/%{name}-%{version}-r%{github_rev}.zip" ; then echo 1 ; else echo 0 ; fi')}%{!?github_rev):0} 36 %if %{?svn_rev:%(sh -c 'if test -f "%{_sourcedir}/%{name}-%{version}-r%{svn_rev}.zip" ; then echo 1 ; else echo 0 ; fi')}%{!?svn_rev):0} 77 37 %setup -q 78 38 %else 79 39 %setup -n "%{name}-%{version}" -Tc 80 svn export %{?github_rev:-r %{github_rev}} %{github_url} . --force 81 rm -f "%{_sourcedir}/%{name}-%{version}%{?github_rev:-r%{github_rev}}.zip" 82 (cd .. && zip -SrX9 "%{_sourcedir}/%{name}-%{version}%{?github_rev:-r%{github_rev}}.zip" "%{name}-%{version}") 83 %endif 84 85 %endif 86 87 #autoreconf -fi 88 89 %if %_github 90 91 %patch0 -p1 92 # uncomment for version 1.4.0 or below 93 %patch1 -p1 94 95 %patch2 -p1 96 40 svn export %{?svn_rev:-r %{svn_rev}} %{svn_url} . --force 41 rm -f "%{_sourcedir}/%{name}-%{version}%{?svn_rev:-r%{svn_rev}}.zip" 42 (cd .. && zip -SrX9 "%{_sourcedir}/%{name}-%{version}%{?svn_rev:-r%{svn_rev}}.zip" "%{name}-%{version}") 97 43 %endif 98 44 … … 108 54 %endif 109 55 110 export LDFLAGS="-Z high-mem -lsocket -lmmap -g" \111 CFLAGS="-g" CXXFLAGS="-g"ASFLAGS="-g -f aout" AS=nasm56 export LDFLAGS="-Zomf -Zhigh-mem" \ 57 ASFLAGS="-g -f aout" AS=nasm 112 58 113 59 ./configure \ 60 --extra-cflags="%{optflags}" \ 114 61 --prefix=%{_prefix} \ 115 62 --libdir=%{_libdir} \ … … 130 77 --enable-small 131 78 132 # Hack our optflags in.133 #sed -i "s|\"vpx_config.h\"|\"vpx_config.h\" %{optflags} -fPIC|g" libs-%{vpxtarget}.mk134 ##sed -i "s|\"vpx_config.h\"|\"vpx_config.h\" %{optflags} -fPIC|g" examples-%{vpxtarget}.mk135 #sed -i "s|\"vpx_config.h\"|\"vpx_config.h\" %{optflags} -fPIC|g" docs-%{vpxtarget}.mk136 137 79 %{__make} %{?_smp_mflags} verbose=true target=libs 138 139 # Really? You couldn't make this a shared library? Ugh.140 # Oh well, I'll do it for you.141 #mkdir tmp142 #cd tmp143 #ar x ../libvpx_g.a144 #cd ..145 # gcc -fPIC -shared -pthread -lm -Wl,--no-undefined -Wl,-soname,libvpx.so.0 -Wl,--version-script,%{SOURCE2} -Wl,-z,noexecstack -o libvpx.so.0.0.0 tmp/*.o146 #rm -rf tmp147 # Temporarily dance the static libs out of the way148 #mv libvpx.a libNOTvpx.a149 #mv libvpx_g.a libNOTvpx_g.a150 # We need to do this so the examples can link against it.151 #ln -sf libvpx.so.0.0.0 libvpx.so152 ##make %{?_smp_mflags} verbose=true target=examples153 #make %{?_smp_mflags} verbose=true target=docs154 # Put them back so the install doesn't fail155 #mv libNOTvpx.a libvpx.a156 #mv libNOTvpx_g.a libvpx_g.a157 80 158 81 %install … … 160 83 %{__make} DIST_DIR=%{buildroot}%{_prefix} install 161 84 mkdir -p %{buildroot}%{_includedir}/vpx/ 162 #install -p libvpx.so.0.0.0 %{buildroot}%{_libdir} 163 #pushd %{buildroot}%{_libdir} 164 #ln -sf libvpx.so.0.0.0 libvpx.so 165 #ln -sf libvpx.so.0.0.0 libvpx.so.0 166 #ln -sf libvpx.so.0.0.0 libvpx.so.0.0 167 #popd 168 #pushd %{buildroot} 169 # Stuff we don't need. 170 rm -rf usr/build/ usr/md5sums.txt usr/lib*/*.a usr/CHANGELOG usr/README 171 #popd 172 emxomf -o %{buildroot}%{_libdir}/libvpx.lib %{buildroot}%{_libdir}/libvpx.a 173 emximp -o %{buildroot}%{_libdir}/libvpx_dll.lib %{buildroot}%{_libdir}/libvpx2.dll 85 # No static library 86 rm -rf %{buildroot}%{_libdir}/libvpx.a 174 87 175 88 %clean 176 89 rm -rf $RPM_BUILD_ROOT 177 178 #%post -p /sbin/ldconfig179 180 #%postun -p /sbin/ldconfig181 90 182 91 %files … … 192 101 %{_libdir}/pkgconfig/vpx.pc 193 102 %{_libdir}/libvpx*.a 194 %{_libdir}/libvpx*.lib195 #%{_libdir}/libvpx*.dbg196 103 197 104 %changelog 198 * Tue Nov 17 2015 Valery Sedletski <_valerius@mail.ru> - 1.4.0 OS/2 initial build 105 * Fri Feb 3 2017 Dmitriy Kuminov <coding@dmik.org> 1.4.0-2 106 - Use -Zomf to preserve HLL debug info and significantly reduce DLL size. 107 - Use per-platform optimization flags. 108 - Remove static library and OMF libraries. 109 110 * Tue Nov 17 2015 Valery Sedletski <_valerius@mail.ru> 1.4.0-1 199 111 - initial OS/2 build
Note:
See TracChangeset
for help on using the changeset viewer.