xpm.spec 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. ##
  2. ## xpm.spec -- OpenPKG RPM Specification
  3. ## Copyright (c) 2000-2003 Cable & Wireless Deutschland GmbH
  4. ## Copyright (c) 2000-2003 The OpenPKG Project <http://www.openpkg.org/>
  5. ## Copyright (c) 2000-2003 Ralf S. Engelschall <rse@engelschall.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 information
  26. Name: xpm
  27. Summary: XPM Image Format
  28. URL: http://koala.ilog.fr/lehors/xpm.html
  29. Vendor: Arnaud Le Hors
  30. Packager: The OpenPKG Project
  31. Distribution: OpenPKG [EVAL]
  32. Group: Graphics
  33. License: X11
  34. Version: 3.4k
  35. Release: 20030104
  36. # list of sources
  37. Source0: http://koala.ilog.fr/ftp/pub/xpm/xpm-%{version}.tar.gz
  38. # build information
  39. Prefix: %{l_prefix}
  40. BuildRoot: %{l_buildroot}
  41. BuildPreReq: OpenPKG, openpkg >= 20021230, X11, gcc
  42. PreReq: OpenPKG, openpkg >= 20021230, X11
  43. AutoReq: no
  44. AutoReqProv: no
  45. %description
  46. XPM (X PixMap) is a format for storing/retrieving X pixmaps
  47. to/from files. Here is provided a library containing a set of
  48. four functions, similar to the X bitmap functions as defined
  49. in the Xlib: XpmCreatePixmapFromData, XpmCreateDataFromPixmap,
  50. XpmReadFileToPixmap and XpmWriteFileFromPixmap for respectively
  51. including, storing, reading and writing this format, plus
  52. four other: XpmCreateImageFromData, XpmCreateDataFromImage,
  53. XpmReadFileToImage and XpmWriteFileFromImage for working with images
  54. instead of pixmaps.
  55. %options
  56. %prep
  57. %setup -q
  58. %build
  59. # configure package
  60. %{l_shtool} subst \
  61. -e 's;^XCOMM \(IMAKE_DEFINES = -DSharedLibXpm=NO\);\1;' \
  62. Imakefile
  63. PATH="$PATH:`%{l_prefix}/etc/rc --query x11_bindir`"
  64. xmkmf -a
  65. # build package
  66. %{l_make} %{l_mflags}
  67. %install
  68. rm -rf $RPM_BUILD_ROOT
  69. # install package (manually because Imake stuff is nasty)
  70. %{l_shtool} mkdir -f -p -m 755 \
  71. $RPM_BUILD_ROOT%{l_prefix}/bin \
  72. $RPM_BUILD_ROOT%{l_prefix}/lib \
  73. $RPM_BUILD_ROOT%{l_prefix}/include/X11
  74. %{l_shtool} install -c -s -m 755 \
  75. cxpm/cxpm sxpm/sxpm $RPM_BUILD_ROOT%{l_prefix}/bin/
  76. %{l_shtool} install -c -m 644 \
  77. lib/libXpm.a $RPM_BUILD_ROOT%{l_prefix}/lib/
  78. %{l_shtool} install -c -m 644 \
  79. lib/xpm.h $RPM_BUILD_ROOT%{l_prefix}/include/X11/
  80. # determine installation files
  81. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  82. %files -f files
  83. %clean
  84. rm -rf $RPM_BUILD_ROOT