xemacs.spec 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171
  1. ##
  2. ## xemacs.spec -- OpenPKG RPM Specification
  3. ## Copyright (c) 2000-2005 The OpenPKG Project <http://www.openpkg.org/>
  4. ## Copyright (c) 2000-2005 Ralf S. Engelschall <rse@engelschall.com>
  5. ## Copyright (c) 2000-2005 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.17
  27. %define V_sumo 2005-03-07
  28. # package information
  29. Name: xemacs
  30. Summary: The XEmacs Text Editor
  31. URL: http://www.xemacs.org/
  32. Vendor: The XEmacs Project
  33. Packager: The OpenPKG Project
  34. Distribution: OpenPKG
  35. Class: EVAL
  36. Group: Editor
  37. License: GPL
  38. Version: %{V_xemacs}
  39. Release: 20050309
  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. Patch0: xemacs.patch
  47. # build information
  48. Prefix: %{l_prefix}
  49. BuildRoot: %{l_buildroot}
  50. BuildPreReq: OpenPKG, openpkg >= 20040130, X11, make
  51. PreReq: OpenPKG, openpkg >= 20040130, X11
  52. BuildPreReq: ncurses, jpeg, png, zlib, tiff, db, xpm
  53. PreReq: ncurses, jpeg, png, zlib, tiff, db, xpm
  54. %if "%{with_gtk}" == "yes"
  55. BuildPreReq: gtk
  56. PreReq: gtk
  57. %else
  58. BuildPreReq: xaw3d
  59. PreReq: xaw3d
  60. %endif
  61. AutoReq: no
  62. AutoReqProv: no
  63. %description
  64. XEmacs is a highly customizable open source text editor and
  65. application development system. It is related to other versions of
  66. Emacs, in particular GNU Emacs. Its emphasis is on modern graphical
  67. user interface support.
  68. %track
  69. prog xemacs = {
  70. version = %{V_xemacs}
  71. url = ftp://ftp.xemacs.org/pub/xemacs/stable/
  72. regex = xemacs-(__VER__)\.tar\.gz
  73. }
  74. prog xemacs:sumo = {
  75. version = %{V_sumo}
  76. url = ftp://ftp.xemacs.org/pub/xemacs/packages/
  77. regex = xemacs-sumo-([\d-]+)\.tar\.bz2
  78. }
  79. %prep
  80. %setup -q
  81. %patch -p0
  82. %build
  83. # configure package
  84. PACKAGE_PATH=""
  85. for i in xemacs mule site; do
  86. [ ".$PACKAGE_PATH" != . ] && PACKAGE_PATH="${PACKAGE_PATH}::"
  87. PACKAGE_PATH="${PACKAGE_PATH}%{l_prefix}/lib/xemacs/${i}-packages"
  88. done
  89. CC="%{l_cc}" \
  90. CFLAGS="%{l_cflags -O}" \
  91. CPPFLAGS="%{l_cppflags tiff glib}" \
  92. LDFLAGS="%{l_ldflags}" \
  93. ./configure \
  94. --prefix=%{l_prefix} \
  95. %if "%{with_gtk}" == "yes"
  96. --with-gtk \
  97. %else
  98. --without-gtk \
  99. %endif
  100. --with-x \
  101. --x-includes=`%{l_rc} --query x11_incdir` \
  102. --x-libraries=`%{l_rc} --query x11_libdir` \
  103. --package-path="$PACKAGE_PATH" \
  104. --site-includes=%{l_prefix}/include \
  105. --site-libraries=%{l_prefix}/lib \
  106. --with-site-lisp \
  107. --with-database=berkdb \
  108. --with-sound=none \
  109. --with-ncurses \
  110. --with-jpeg \
  111. --with-tiff \
  112. --with-png \
  113. --with-xpm \
  114. --pdump
  115. # build package
  116. %{l_make} %{l_mflags}
  117. %install
  118. # install package
  119. rm -rf $RPM_BUILD_ROOT
  120. %{l_make} %{l_mflags} install \
  121. prefix=$RPM_BUILD_ROOT%{l_prefix} \
  122. exec_prefix=$RPM_BUILD_ROOT%{l_prefix}
  123. # post-adjust installation
  124. rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/xemacs
  125. mv $RPM_BUILD_ROOT%{l_prefix}/bin/xemacs-%{version} \
  126. $RPM_BUILD_ROOT%{l_prefix}/bin/xemacs
  127. mv $RPM_BUILD_ROOT%{l_prefix}/lib/xemacs-%{version}/info \
  128. $RPM_BUILD_ROOT%{l_prefix}/info
  129. # create directories for additional packages
  130. for i in xemacs mule site; do
  131. %{l_shtool} mkdir -f -p -m 755 \
  132. $RPM_BUILD_ROOT%{l_prefix}/lib/xemacs/${i}-packages
  133. done
  134. # install optional sumo package cluster
  135. %if "%{with_sumo}" == "yes"
  136. ( cd $RPM_BUILD_ROOT%{l_prefix}/lib/xemacs
  137. %{l_gzip} -dc %{SOURCE xemacs-sumo-%{V_sumo}.tar.gz} | %{l_tar} -xvf -
  138. ) || exit $?
  139. %endif
  140. # strip down installation
  141. rm -f \
  142. $RPM_BUILD_ROOT%{l_prefix}/info/dir \
  143. $RPM_BUILD_ROOT%{l_prefix}/info/info.info* \
  144. $RPM_BUILD_ROOT%{l_prefix}/info/standards.info* \
  145. $RPM_BUILD_ROOT%{l_prefix}/info/texinfo.info*
  146. strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
  147. # determine installation files
  148. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  149. %files -f files
  150. %clean
  151. rm -rf $RPM_BUILD_ROOT