diff --git a/x265/x265.spec b/x265/x265.spec new file mode 100644 index 0000000000..b97d860195 --- /dev/null +++ b/x265/x265.spec @@ -0,0 +1,96 @@ +## +## x265.spec -- OpenPKG RPM Package Specification +## Copyright (c) 2000-2014 OpenPKG Foundation e.V. +## +## Permission to use, copy, modify, and distribute this software for +## any purpose with or without fee is hereby granted, provided that +## the above copyright notice and this permission notice appear in all +## copies. +## +## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED +## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR +## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF +## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT +## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +## SUCH DAMAGE. +## + +# package version +%define V_dist 0.7 +%define V_subdir d24e2a8c4326 + +# package information +Name: x265 +Summary: H.265 Codec Library +URL: http://x265.org/ +Vendor: Steve Borho et al. +Packager: OpenPKG Foundation e.V. +Distribution: OpenPKG Community +Class: EVAL +Group: Video +License: GPL +Version: %{V_dist} +Release: 20140214 + +# list of sources +Source0: https://bitbucket.org/multicoreware/x265/get/%{V_dist}.tar.bz2 + +# build information +BuildPreReq: OpenPKG, openpkg >= 20100101, gcc, gcc::with_cxx = yes, yasm, cmake, make +PreReq: OpenPKG, openpkg >= 20100101 + +%description + x265 is an open-source project and free application library for + encoding video streams into the H.265/High Efficiency Video Coding + (HEVC) format + +%track + prog x265 = { + version = %{V_dist} + url = https://bitbucket.org/multicoreware/x265/downloads + regex = (\d+\.\d+)\.tar\.bz2 + } + +%prep + %setup -q -n multicoreware-x265-%{V_subdir} + +%build + cd build + cmake \ + -DCMAKE_BUILD_TYPE="Release" \ + -DCMAKE_INSTALL_PREFIX="%{l_prefix}" \ + -DCMAKE_C_COMPILER="%{l_cc}" \ + -DCMAKE_C_FLAGS="%{l_cflags} %{l_cppflags}" \ + -DCMAKE_EXE_LINKER_FLAGS="%{l_ldflags}" \ + -DCMAKE_CXX_COMPILER="%{l_cxx}" \ + -DENABLE_SHARED=OFF \ + ../source + %{l_make} %{l_mflags} + +%install + %{l_shtool} mkdir -f -p -m 755 \ + $RPM_BUILD_ROOT%{l_prefix}/bin \ + $RPM_BUILD_ROOT%{l_prefix}/lib \ + $RPM_BUILD_ROOT%{l_prefix}/include \ + $RPM_BUILD_ROOT%{l_prefix}/lib/pkgconfig + %{l_shtool} install -c -s -m 775 \ + build/x265 $RPM_BUILD_ROOT%{l_prefix}/bin/ + %{l_shtool} install -c -m 644 \ + build/libx265.a $RPM_BUILD_ROOT%{l_prefix}/lib/ + %{l_shtool} install -c -m 644 \ + source/x265.h build/x265_config.h \ + $RPM_BUILD_ROOT%{l_prefix}/include/ + %{l_shtool} install -c -m 644 \ + build/x265.pc $RPM_BUILD_ROOT%{l_prefix}/lib/pkgconfig/ + %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} + +%files -f files + +%clean +