Ignore:
Timestamp:
Feb 2, 2017, 11:21:14 PM (9 years ago)
Author:
dmik
Message:

spec: libvpx: Release version 1.4.0-2.

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
    53
    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}
     4Name: libvpx
    195Summary: VP8 Video Codec SDK
    20 Version: %{_version}
    21 Release: 1%{?dist}
     6Version: 1.4.0
     7Release: 2%{?dist}
    228License: BSD
    239Group: System Environment/Libraries
    2410BuildRoot: %{_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
     11Source0: %{name}-%{version}%{?svn_rev:-r%{svn_rev}}.zip
    3912URL: http://www.webmproject.org/tools/vp8-sdk/
    4013BuildRequires:  nasm
     
    6134# %setup -q
    6235
    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}
    7737%setup -q
    7838%else
    7939%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 
     40svn export %{?svn_rev:-r %{svn_rev}} %{svn_url} . --force
     41rm -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}")
    9743%endif
    9844
     
    10854%endif
    10955
    110 export LDFLAGS="-Zhigh-mem -lsocket -lmmap -g" \
    111        CFLAGS="-g" CXXFLAGS="-g" ASFLAGS="-g -f aout" AS=nasm
     56export LDFLAGS="-Zomf -Zhigh-mem" \
     57       ASFLAGS="-g -f aout" AS=nasm
    11258
    11359./configure \
     60        --extra-cflags="%{optflags}" \
    11461        --prefix=%{_prefix} \
    11562        --libdir=%{_libdir} \
     
    13077        --enable-small
    13178
    132 # Hack our optflags in.
    133 #sed -i "s|\"vpx_config.h\"|\"vpx_config.h\" %{optflags} -fPIC|g" libs-%{vpxtarget}.mk
    134 ##sed -i "s|\"vpx_config.h\"|\"vpx_config.h\" %{optflags} -fPIC|g" examples-%{vpxtarget}.mk
    135 #sed -i "s|\"vpx_config.h\"|\"vpx_config.h\" %{optflags} -fPIC|g" docs-%{vpxtarget}.mk
    136 
    13779%{__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 tmp
    142 #cd tmp
    143 #ar x ../libvpx_g.a
    144 #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/*.o
    146 #rm -rf tmp
    147 # Temporarily dance the static libs out of the way
    148 #mv libvpx.a libNOTvpx.a
    149 #mv libvpx_g.a libNOTvpx_g.a
    150 # We need to do this so the examples can link against it.
    151 #ln -sf libvpx.so.0.0.0 libvpx.so
    152 ##make %{?_smp_mflags} verbose=true target=examples
    153 #make %{?_smp_mflags} verbose=true target=docs
    154 # Put them back so the install doesn't fail
    155 #mv libNOTvpx.a libvpx.a
    156 #mv libNOTvpx_g.a libvpx_g.a
    15780
    15881%install
     
    16083%{__make} DIST_DIR=%{buildroot}%{_prefix} install
    16184mkdir -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
     86rm -rf %{buildroot}%{_libdir}/libvpx.a
    17487
    17588%clean
    17689rm -rf $RPM_BUILD_ROOT
    177 
    178 #%post -p /sbin/ldconfig
    179 
    180 #%postun -p /sbin/ldconfig
    18190
    18291%files
     
    192101%{_libdir}/pkgconfig/vpx.pc
    193102%{_libdir}/libvpx*.a
    194 %{_libdir}/libvpx*.lib
    195 #%{_libdir}/libvpx*.dbg
    196103
    197104%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
    199111- initial OS/2 build
Note: See TracChangeset for help on using the changeset viewer.