vorbis-libs.spec 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169
  1. ##
  2. ## vorbis-libs.spec -- OpenPKG RPM Specification
  3. ## Copyright (c) 2000-2004 The OpenPKG Project <http://www.openpkg.org/>
  4. ## Copyright (c) 2000-2004 Ralf S. Engelschall <rse@engelschall.com>
  5. ## Copyright (c) 2000-2004 Cable & Wireless <http://www.cw.com/>
  6. ##
  7. ## Permission to use, copy, modify, and distribute this software for
  8. ## any purpose with or without fee is hereby granted, provided that
  9. ## the above copyright notice and this permission notice appear in all
  10. ## copies.
  11. ##
  12. ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  13. ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  14. ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  15. ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
  16. ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  17. ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  18. ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  19. ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  20. ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  21. ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  22. ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  23. ## SUCH DAMAGE.
  24. ##
  25. # package version
  26. %define V_whole 1.1.0
  27. %define V_libao 0.8.5
  28. %define V_libogg 1.1.2
  29. %define V_libvorbis 1.1.0
  30. # package information
  31. Name: vorbis-libs
  32. Summary: Ogg Vorbis Libraries
  33. URL: http://www.vorbis.com/
  34. Vendor: The Ogg Vorbis Project
  35. Packager: The OpenPKG Project
  36. Distribution: OpenPKG
  37. Class: PLUS
  38. Group: Audio
  39. License: LGPL
  40. Version: %{V_whole}
  41. Release: 20040924
  42. # list of sources
  43. Source0: http://www.xiph.org/ao/src/libao-%{V_libao}.tar.gz
  44. Source1: http://downloads.xiph.org/releases/ogg/libogg-%{V_libogg}.tar.gz
  45. Source2: http://downloads.xiph.org/releases/vorbis/libvorbis-%{V_libvorbis}.tar.gz
  46. # build information
  47. Prefix: %{l_prefix}
  48. BuildRoot: %{l_buildroot}
  49. BuildPreReq: OpenPKG, openpkg >= 20040130, make, gcc
  50. PreReq: OpenPKG, openpkg >= 20040130
  51. AutoReq: no
  52. AutoReqProv: no
  53. %description
  54. These are the Ogg Vorbis core libraries.
  55. %track
  56. prog vorbis-libs:libao = {
  57. version = %{V_libao}
  58. url = http://www.xiph.org/ao/
  59. regex = libao-(__VER__)\.tar\.gz
  60. }
  61. prog vorbis-libs:libogg = {
  62. version = %{V_libogg}
  63. url = http://downloads.xiph.org/releases/ogg/
  64. regex = libogg-(__VER__)\.tar\.gz
  65. }
  66. prog vorbis-libs:libvorbis = {
  67. version = %{V_libvorbis}
  68. url = http://downloads.xiph.org/releases/vorbis/
  69. regex = libvorbis-(__VER__)\.tar\.gz
  70. }
  71. %prep
  72. %setup -q -c
  73. %setup -q -T -D -a 1
  74. %setup -q -T -D -a 2
  75. %build
  76. # build libao
  77. ( cd libao-%{V_libao}
  78. %{l_shtool} subst \
  79. -e 's;^\(libao_la_LDFLAGS.*\) -ldl;\1;' \
  80. src/Makefile.in
  81. CC="%{l_cc}" \
  82. CFLAGS="%{l_cflags -O}" \
  83. CPPFLAGS="%{l_cppflags}" \
  84. LDFLAGS="%{l_ldflags}" \
  85. ./configure \
  86. --prefix=%{l_prefix} \
  87. --disable-esd \
  88. --enable-shared \
  89. --enable-static
  90. %{l_make} %{l_mflags -O}
  91. ) || exit $?
  92. # build libogg
  93. ( cd libogg-%{V_libogg}
  94. CC="%{l_cc}" \
  95. CFLAGS="%{l_cflags -O}" \
  96. CPPFLAGS="%{l_cppflags}" \
  97. LDFLAGS="%{l_ldflags}" \
  98. ./configure \
  99. --prefix=%{l_prefix} \
  100. --disable-shared
  101. %{l_make} %{l_mflags -O}
  102. ) || exit $?
  103. # build libvorbis
  104. ogg_libdir="`pwd`/libogg-%{V_libogg}/src"
  105. ogg_incdir="`pwd`/libogg-%{V_libogg}/include"
  106. ( cd libvorbis-%{V_libvorbis}
  107. CC="%{l_cc}" \
  108. CFLAGS="%{l_cflags -O}" \
  109. CPPFLAGS="%{l_cppflags}" \
  110. LDFLAGS="%{l_ldflags} -L$ogg_libdir/.libs" \
  111. ./configure \
  112. --prefix=%{l_prefix} \
  113. --with-ogg-libraries=$ogg_libdir \
  114. --with-ogg-includes=$ogg_incdir \
  115. --disable-shared
  116. %{l_shtool} subst \
  117. -e 's;^\(SUBDIRS.*\)examples\(.*\)$;\1 \2;' \
  118. Makefile
  119. %{l_make} %{l_mflags -O}
  120. %{l_shtool} subst \
  121. -e "s;-L$ogg_libdir/\\.libs/*;;" \
  122. -e "s;-L$ogg_libdir/*;;" \
  123. lib/*.la lib/.libs/*.la
  124. ) || exit $?
  125. %install
  126. rm -rf $RPM_BUILD_ROOT
  127. # install libraries
  128. ( cd libao-%{V_libao}
  129. %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT"
  130. rm -rf $RPM_BUILD_ROOT%{l_prefix}/lib/*.s[ol]* >/dev/null 2>&1 || true
  131. %{l_shtool} subst \
  132. -e 's;^\(dlname\)=.*;\1="";' \
  133. -e 's;^\(library_names\)=.*;\1="";' \
  134. $RPM_BUILD_ROOT%{l_prefix}/lib/libao.la
  135. ) || exit $?
  136. ( cd libogg-%{V_libogg}
  137. %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT"
  138. ) || exit $?
  139. ( cd libvorbis-%{V_libvorbis}
  140. %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT"
  141. ) || exit $?
  142. # strip installation
  143. rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/doc
  144. strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
  145. # determine installation files
  146. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
  147. %{l_files_std} \
  148. '%not %dir %{l_prefix}/share/aclocal'
  149. %files -f files
  150. %clean
  151. rm -rf $RPM_BUILD_ROOT