xemacs.spec 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166
  1. ##
  2. ## xemacs.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 versions
  26. %define V_xemacs 21.4.15
  27. %define V_sumo 2004-02-02
  28. # package information
  29. Name: xemacs
  30. Summary: The GNU EMACS Text Editor (X11/Lucid Version)
  31. URL: http://www.xemacs.org/
  32. Vendor: Richard Stallmann et al.
  33. Packager: The OpenPKG Project
  34. Distribution: OpenPKG
  35. Class: EVAL
  36. Group: Editor
  37. License: GPL
  38. Version: %{V_xemacs}
  39. Release: 20040421
  40. # package options
  41. %option with_gtk yes
  42. %option with_sumo yes
  43. # list of sources
  44. Source0: ftp://ftp.xemacs.org/pub/xemacs/stable/xemacs-%{V_xemacs}.tar.gz
  45. Source1: ftp://ftp.xemacs.org/pub/xemacs/packages/xemacs-sumo-%{V_sumo}.tar.gz
  46. # build information
  47. Prefix: %{l_prefix}
  48. BuildRoot: %{l_buildroot}
  49. BuildPreReq: OpenPKG, openpkg >= 20040130, X11, make
  50. PreReq: OpenPKG, openpkg >= 20040130, X11
  51. BuildPreReq: ncurses, jpeg, png, zlib, tiff, db, xpm
  52. PreReq: ncurses, jpeg, png, zlib, tiff, db, xpm
  53. %if "%{with_gtk}" == "yes"
  54. BuildPreReq: gtk
  55. PreReq: gtk
  56. %else
  57. BuildPreReq: xaw3d
  58. PreReq: xaw3d
  59. %endif
  60. AutoReq: no
  61. AutoReqProv: no
  62. %description
  63. The popular GNU EMACS text editor (X11/Lucid Version).
  64. %track
  65. prog xemacs = {
  66. version = %{V_xemacs}
  67. url = ftp://ftp.xemacs.org/pub/xemacs/stable/
  68. regex = xemacs-(__VER__)\.tar\.gz
  69. }
  70. prog xemacs:sumo = {
  71. version = %{V_sumo}
  72. url = ftp://ftp.xemacs.org/pub/xemacs/packages/
  73. regex = xemacs-sumo-([\d-]+)\.tar\.bz2
  74. }
  75. %prep
  76. %setup -q
  77. %build
  78. # configure package
  79. PACKAGE_PATH=""
  80. for i in xemacs mule site; do
  81. [ ".$PACKAGE_PATH" != . ] && PACKAGE_PATH="${PACKAGE_PATH}::"
  82. PACKAGE_PATH="${PACKAGE_PATH}%{l_prefix}/lib/xemacs/${i}-packages"
  83. done
  84. CC="%{l_cc}" \
  85. CFLAGS="%{l_cflags -O}" \
  86. CPPFLAGS="%{l_cppflags tiff glib}" \
  87. LDFLAGS="%{l_ldflags}" \
  88. ./configure \
  89. --prefix=%{l_prefix} \
  90. %if "%{with_gtk}" == "yes"
  91. --with-gtk \
  92. %else
  93. --without-gtk \
  94. %endif
  95. --with-x \
  96. --x-includes=`%{l_prefix}/etc/rc --query x11_incdir` \
  97. --x-libraries=`%{l_prefix}/etc/rc --query x11_libdir` \
  98. --package-path="$PACKAGE_PATH" \
  99. --site-includes=%{l_prefix}/include \
  100. --site-libraries=%{l_prefix}/lib \
  101. --with-site-lisp \
  102. --with-database=berkdb \
  103. --with-sound=none \
  104. --with-ncurses \
  105. --with-jpeg \
  106. --with-tiff \
  107. --with-png \
  108. --with-xpm \
  109. --pdump
  110. # build package
  111. %{l_make} %{l_mflags}
  112. %install
  113. # install package
  114. rm -rf $RPM_BUILD_ROOT
  115. %{l_make} %{l_mflags} install \
  116. prefix=$RPM_BUILD_ROOT%{l_prefix} \
  117. exec_prefix=$RPM_BUILD_ROOT%{l_prefix}
  118. # post-adjust installation
  119. rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/xemacs
  120. mv $RPM_BUILD_ROOT%{l_prefix}/bin/xemacs-%{version} \
  121. $RPM_BUILD_ROOT%{l_prefix}/bin/xemacs
  122. mv $RPM_BUILD_ROOT%{l_prefix}/lib/xemacs-%{version}/info \
  123. $RPM_BUILD_ROOT%{l_prefix}/info
  124. # create directories for additional packages
  125. for i in xemacs mule site; do
  126. %{l_shtool} mkdir -f -p -m 755 \
  127. $RPM_BUILD_ROOT%{l_prefix}/lib/xemacs/${i}-packages
  128. done
  129. # install optional sumo package cluster
  130. %if "%{with_sumo}" == "yes"
  131. ( cd $RPM_BUILD_ROOT%{l_prefix}/lib/xemacs
  132. %{l_gzip} -dc %{SOURCE xemacs-sumo-%{V_sumo}.tar.gz} | %{l_tar} -xvf -
  133. ) || exit $?
  134. %endif
  135. # strip down installation
  136. rm -f \
  137. $RPM_BUILD_ROOT%{l_prefix}/info/dir \
  138. $RPM_BUILD_ROOT%{l_prefix}/info/info.info* \
  139. $RPM_BUILD_ROOT%{l_prefix}/info/standards.info* \
  140. $RPM_BUILD_ROOT%{l_prefix}/info/texinfo.info*
  141. strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
  142. # determine installation files
  143. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  144. %files -f files
  145. %clean
  146. rm -rf $RPM_BUILD_ROOT