xemacs.spec 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174
  1. ##
  2. ## xemacs.spec -- OpenPKG RPM Package Specification
  3. ## Copyright (c) 2000-2006 OpenPKG Foundation e.V. <http://openpkg.net/>
  4. ## Copyright (c) 2000-2006 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 versions
  25. %define V_xemacs 21.4.19
  26. %define V_sumo 2006-05-10
  27. # package information
  28. Name: xemacs
  29. Summary: The XEmacs Text Editor
  30. URL: http://www.xemacs.org/
  31. Vendor: The XEmacs Project
  32. Packager: OpenPKG
  33. Distribution: OpenPKG
  34. Class: EVAL
  35. Group: Editor
  36. License: GPL
  37. Version: %{V_xemacs}
  38. Release: 20060613
  39. # package options
  40. %option with_gtk yes
  41. %option with_sumo yes
  42. # list of sources
  43. Source0: ftp://ftp.xemacs.org/pub/xemacs/stable/xemacs-%{V_xemacs}.tar.gz
  44. Source1: ftp://ftp.xemacs.org/pub/xemacs/packages/xemacs-sumo-%{V_sumo}.tar.gz
  45. Patch0: xemacs.patch
  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. XEmacs is a highly customizable open source text editor and
  64. application development system. It is related to other versions of
  65. Emacs, in particular GNU Emacs. Its emphasis is on modern graphical
  66. user interface support.
  67. %track
  68. prog xemacs = {
  69. version = %{V_xemacs}
  70. url = ftp://ftp.xemacs.org/pub/xemacs/stable/
  71. regex = xemacs-(__VER__)\.tar\.gz
  72. }
  73. prog xemacs:sumo = {
  74. version = %{V_sumo}
  75. url = ftp://ftp.xemacs.org/pub/xemacs/packages/
  76. regex = xemacs-sumo-([\d-]+)\.tar\.bz2
  77. }
  78. %prep
  79. %setup -q
  80. %patch -p0
  81. %build
  82. # configure package
  83. PACKAGE_PATH=""
  84. for i in xemacs mule site; do
  85. [ ".$PACKAGE_PATH" != . ] && PACKAGE_PATH="${PACKAGE_PATH}::"
  86. PACKAGE_PATH="${PACKAGE_PATH}%{l_prefix}/lib/xemacs/${i}-packages"
  87. done
  88. export CC="%{l_cc}"
  89. export CFLAGS="%{l_cflags -O}"
  90. export CPPFLAGS="%{l_cppflags tiff glib}"
  91. export LDFLAGS="%{l_ldflags}"
  92. export LIBS="-ldb"
  93. case "%{l_platform -t}" in
  94. *-sunos* ) LIBS="$LIBS -lrt" ;;
  95. esac
  96. ./configure \
  97. --prefix=%{l_prefix} \
  98. %if "%{with_gtk}" == "yes"
  99. --with-gtk \
  100. %else
  101. --without-gtk \
  102. %endif
  103. --with-x \
  104. --x-includes=`%{l_rc} --query x11_incdir` \
  105. --x-libraries=`%{l_rc} --query x11_libdir` \
  106. --package-path="$PACKAGE_PATH" \
  107. --site-includes=%{l_prefix}/include \
  108. --site-libraries=%{l_prefix}/lib \
  109. --with-site-lisp \
  110. --with-database=berkdb \
  111. --with-sound=none \
  112. --with-ncurses \
  113. --with-jpeg \
  114. --with-tiff \
  115. --with-png \
  116. --with-xpm \
  117. --pdump
  118. # build package
  119. %{l_make} %{l_mflags}
  120. %install
  121. # install package
  122. rm -rf $RPM_BUILD_ROOT
  123. %{l_make} %{l_mflags} install \
  124. prefix=$RPM_BUILD_ROOT%{l_prefix} \
  125. exec_prefix=$RPM_BUILD_ROOT%{l_prefix}
  126. # post-adjust installation
  127. rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/xemacs
  128. mv $RPM_BUILD_ROOT%{l_prefix}/bin/xemacs-%{version} \
  129. $RPM_BUILD_ROOT%{l_prefix}/bin/xemacs
  130. mv $RPM_BUILD_ROOT%{l_prefix}/lib/xemacs-%{version}/info \
  131. $RPM_BUILD_ROOT%{l_prefix}/info
  132. # create directories for additional packages
  133. for i in xemacs mule site; do
  134. %{l_shtool} mkdir -f -p -m 755 \
  135. $RPM_BUILD_ROOT%{l_prefix}/lib/xemacs/${i}-packages
  136. done
  137. # install optional sumo package cluster
  138. %if "%{with_sumo}" == "yes"
  139. ( cd $RPM_BUILD_ROOT%{l_prefix}/lib/xemacs
  140. %{l_gzip} -dc %{SOURCE xemacs-sumo-%{V_sumo}.tar.gz} | %{l_tar} -xvf -
  141. ) || exit $?
  142. %endif
  143. # strip down installation
  144. rm -f \
  145. $RPM_BUILD_ROOT%{l_prefix}/info/dir \
  146. $RPM_BUILD_ROOT%{l_prefix}/info/info.info* \
  147. $RPM_BUILD_ROOT%{l_prefix}/info/standards.info* \
  148. $RPM_BUILD_ROOT%{l_prefix}/info/texinfo.info*
  149. strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
  150. # determine installation files
  151. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  152. %files -f files
  153. %clean
  154. rm -rf $RPM_BUILD_ROOT