xvid.spec 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. ##
  2. ## xvid.spec -- OpenPKG RPM Package Specification
  3. ## Copyright (c) 2000-2006 OpenPKG Foundation e.V. <http://openpkg.net/>
  4. ## Copyright (c) 2000-2006 Ralf S. Engelschall <http://engelschall.com/>
  5. ##
  6. ## Permission to use, copy, modify, and distribute this software for
  7. ## any purpose with or without fee is hereby granted, provided that
  8. ## the above copyright notice and this permission notice appear in all
  9. ## copies.
  10. ##
  11. ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  12. ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  13. ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  14. ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
  15. ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  16. ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  17. ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  18. ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  19. ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  20. ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  21. ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  22. ## SUCH DAMAGE.
  23. ##
  24. # package information
  25. Name: xvid
  26. Summary: MPEG-4 Encoding/Decoding Library
  27. URL: http://www.xvid.org/
  28. Vendor: The XVID Team
  29. Packager: OpenPKG Foundation e.V.
  30. Distribution: OpenPKG Community
  31. Class: EVAL
  32. Group: Graphics
  33. License: GPL
  34. Version: 1.1.2
  35. Release: 20061102
  36. # package options
  37. %option with_asm no
  38. # list of sources
  39. Source0: http://downloads.xvid.org/downloads/xvidcore-%{version}.tar.bz2
  40. # build information
  41. Prefix: %{l_prefix}
  42. BuildRoot: %{l_buildroot}
  43. BuildPreReq: OpenPKG, openpkg >= 20040130, make, gcc
  44. PreReq: OpenPKG, openpkg >= 20040130
  45. %if "%{with_asm}" == "yes"
  46. BuildPreReq: nasm
  47. %endif
  48. AutoReq: no
  49. AutoReqProv: no
  50. %description
  51. XviD is a high performance and high quality MPEG-4 video decoding
  52. and encoding library.
  53. %track
  54. prog xvid = {
  55. comment = "cs: fix in %prep section probably obsolete with next vendor release"
  56. version = %{version}
  57. url = http://www.xvid.org/downloads.html
  58. regex = xvidcore-(\d+\.\d+\.\d+)\.tar\.bz2
  59. }
  60. %prep
  61. %setup -q -n xvidcore-%{version}
  62. # fix broken string in release 1.1.1
  63. %{l_shtool} subst \
  64. -e 's/\(info->build = "xvid-1.1.1\);/\1";/' \
  65. src/xvid.c
  66. %build
  67. ( cd build/generic
  68. CC="%{l_cc}" \
  69. CFLAGS="%{l_cflags -O}" \
  70. CPPFLAGS="%{l_cppflags}" \
  71. LDFLAGS="%{l_ldflags}" \
  72. ./configure \
  73. --prefix=%{l_prefix} \
  74. %if "%{with_asm}" == "yes"
  75. --enable-assembly
  76. %else
  77. --disable-assembly
  78. %endif
  79. %{l_make} %{l_mflags -O}
  80. ) || exit $?
  81. %install
  82. rm -rf $RPM_BUILD_ROOT
  83. ( cd build/generic
  84. %{l_make} %{l_mflags} install \
  85. prefix=$RPM_BUILD_ROOT%{l_prefix} \
  86. exec_prefix=$RPM_BUILD_ROOT%{l_prefix}
  87. ) || exit $?
  88. rm -f $RPM_BUILD_ROOT%{l_prefix}/lib/libxvidcore.so*
  89. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  90. %files -f files
  91. %clean
  92. rm -rf $RPM_BUILD_ROOT