icewm.spec 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  1. ##
  2. ## icewm.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 information
  26. Name: icewm
  27. Summary: ICE Window Manager
  28. URL: http://www.icewm.org/
  29. Vendor: M. Macek & M. Hasselmann
  30. Packager: The OpenPKG Project
  31. Distribution: OpenPKG
  32. Class: EVAL
  33. Group: XWindow
  34. License: GPL
  35. Version: 1.2.15
  36. Release: 20040811
  37. # package options
  38. %option with_iconv no
  39. %option with_shape no
  40. %option with_xft no
  41. # list of sources
  42. Source0: http://ftp1.sourceforge.net/icewm/icewm-%{version}.tar.gz
  43. Patch0: icewm.patch
  44. # build information
  45. Prefix: %{l_prefix}
  46. BuildRoot: %{l_buildroot}
  47. BuildPreReq: OpenPKG, openpkg >= 20040130, X11, imlib, gcc, make
  48. PreReq: OpenPKG, openpkg >= 20040130, X11, imlib
  49. %if "%{with_iconv}" == "yes"
  50. BuildPreReq: libiconv
  51. PreReq: libiconv
  52. %endif
  53. AutoReq: no
  54. AutoReqProv: no
  55. %description
  56. IceWM is a window manager for the X11 Window System. The goal of
  57. IceWM is speed, simplicity, and not getting in the user's way.
  58. %track
  59. prog icewm = {
  60. version = %{version}
  61. url = http://prdownloads.sourceforge.net/icewm/
  62. regex = icewm-(\d+\.\d+\.\d+)\.tar\.gz
  63. }
  64. %prep
  65. %setup -q
  66. %patch -p0
  67. %{l_shtool} subst \
  68. -e 's;\(#warning.*\)$;/* \1 */;' \
  69. src/*.cc src/*.h
  70. %build
  71. case "%{l_platform -t}" in
  72. *-freebsd* ) libs="-lkvm" ;;
  73. * ) libs="" ;;
  74. esac
  75. echo "ice_prog_gxx=no" >config.cache
  76. CC="%{l_cc}" \
  77. CXX="%{l_cxx}" \
  78. CFLAGS="%{l_cflags -O}" \
  79. CXXFLAGS="%{l_cxxflags -O}" \
  80. CPPFLAGS="%{l_cppflags}" \
  81. LDFLAGS="%{l_ldflags}" \
  82. LIBS="$libs" \
  83. ./configure \
  84. --cache-file=./config.cache \
  85. --prefix=%{l_prefix} \
  86. --with-cfgdir=%{l_prefix}/etc/icewm \
  87. --with-libdir=%{l_prefix}/share/icewm \
  88. --with-imlib=%{l_prefix}/bin \
  89. %if "%{with_shape}" == "yes"
  90. --enable-shape \
  91. --enable-shaped-decorations \
  92. %else
  93. --disable-shape \
  94. --disable-shaped-decorations \
  95. %endif
  96. %if "%{with_iconv}" == "yes"
  97. --enable-i18n \
  98. %else
  99. --disable-i18n \
  100. %endif
  101. %if "%{with_xft}" == "yes"
  102. --enable-xfreetype \
  103. --enable-gradients \
  104. --enable-antialiasing \
  105. %else
  106. --disable-xfreetype \
  107. --disable-gradients \
  108. --disable-antialiasing \
  109. %endif
  110. --enable-corefonts \
  111. --disable-nls \
  112. --disable-xinerama \
  113. --disable-xrandr
  114. %{l_make} %{l_mflags -O}
  115. %install
  116. rm -rf $RPM_BUILD_ROOT
  117. %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT
  118. strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
  119. case "%{l_platform -t}" in
  120. *-freebsd* ) attr="2755,%{l_musr},kmem" ;;
  121. * ) attr="0755,%{l_musr},%{l_mgrp}" ;;
  122. esac
  123. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
  124. %{l_files_std} "%attr($attr) %{l_prefix}/bin/icewm"
  125. %files -f files
  126. %clean
  127. rm -rf $RPM_BUILD_ROOT