png.spec 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. ##
  2. ## png.spec -- OpenPKG RPM Package Specification
  3. ## Copyright (c) 2000-2007 OpenPKG Foundation e.V. <http://openpkg.net/>
  4. ## Copyright (c) 2000-2007 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: png
  26. Summary: Portable Network Graphics (PNG) Image Format Library
  27. URL: http://www.libpng.org/pub/png/
  28. Vendor: Greg Roelofs
  29. Packager: OpenPKG Foundation e.V.
  30. Distribution: OpenPKG Community
  31. Class: BASE
  32. Group: Graphics
  33. License: BSD
  34. Version: 1.2.16
  35. Release: 20070505
  36. # list of sources
  37. Source0: http://switch.dl.sourceforge.net/sourceforge/libpng/libpng-%{version}.tar.gz
  38. Patch0: png.patch
  39. # build information
  40. Prefix: %{l_prefix}
  41. BuildRoot: %{l_buildroot}
  42. BuildPreReq: OpenPKG, openpkg >= 20040130
  43. PreReq: OpenPKG, openpkg >= 20040130
  44. BuildPreReq: zlib
  45. PreReq: zlib
  46. AutoReq: no
  47. AutoReqProv: no
  48. %description
  49. The Portable Network Graphics (PNG) format is a image format with
  50. lossless compression. It was designed to replace the older and
  51. simpler GIF format and, to some extent, the much more complex TIFF
  52. format. PNG supports up to 48-bit truecolor or 16-bit grayscale
  53. saving, alpha channels (variable transparency), gamma correction
  54. (cross-platform control of image brightness), and two-dimensional
  55. interlacing (a method of progressive display).
  56. %track
  57. prog png = {
  58. version = %{version}
  59. url = http://prdownloads.sourceforge.net/libpng/
  60. regex = libpng-(\d+\.\d+\.\d+)\.tar\.gz
  61. }
  62. %prep
  63. %setup -q -n libpng-%{version}
  64. %patch -p0
  65. %build
  66. cppflags=""
  67. case "%{l_platform -t}" in
  68. sparc64-freebsd* ) cppflags="-fPIC" ;;
  69. esac
  70. CC="%{l_cc}" \
  71. CFLAGS="%{l_cflags -O}" \
  72. CPPFLAGS="%{l_cppflags} $cppflags" \
  73. LDFLAGS="%{l_ldflags}" \
  74. GREP="grep" \
  75. ./configure \
  76. --prefix=%{l_prefix} \
  77. --mandir=%{l_prefix}/man \
  78. --with-libpng-compat \
  79. --disable-shared
  80. %{l_make} %{l_mflags -O}
  81. %install
  82. rm -rf $RPM_BUILD_ROOT
  83. %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT
  84. rm -f $RPM_BUILD_ROOT%{l_prefix}/lib/libpng.so
  85. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
  86. %{l_files_std} \
  87. '%not %dir %{l_prefix}/lib/pkgconfig'
  88. %files -f files
  89. %clean
  90. rm -rf $RPM_BUILD_ROOT