xemacs.spec 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. ##
  2. ## xemacs.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 versions
  26. %define V_xemacs 21.4.13
  27. %define V_sumo 2003-06-29
  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 [EVAL]
  35. Group: Editor
  36. License: GPL
  37. Version: %{V_xemacs}
  38. Release: 20030701
  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. # build information
  46. Prefix: %{l_prefix}
  47. BuildRoot: %{l_buildroot}
  48. BuildPreReq: OpenPKG, openpkg >= 20030103, X11, ncurses, jpeg, png, zlib, tiff, db, xpm, make
  49. PreReq: OpenPKG, openpkg >= 20030103, X11, ncurses
  50. %if "%{with_gtk}" == "yes"
  51. BuildPreReq: gtk
  52. %else
  53. BuildPreReq: xaw3d
  54. %endif
  55. AutoReq: no
  56. AutoReqProv: no
  57. %description
  58. The popular GNU EMACS text editor (X11/Lucid Version).
  59. %prep
  60. %setup -q
  61. %build
  62. PACKAGE_PATH=""
  63. for i in xemacs mule site; do
  64. [ ".$PACKAGE_PATH" != . ] && PACKAGE_PATH="${PACKAGE_PATH}::"
  65. PACKAGE_PATH="${PACKAGE_PATH}%{l_prefix}/lib/xemacs/${i}-packages"
  66. done
  67. CC="%{l_cc}" \
  68. CFLAGS="%{l_cflags -O}" \
  69. CPPFLAGS="%{l_cppflags tiff glib}" \
  70. LDFLAGS="%{l_ldflags}" \
  71. ./configure \
  72. --prefix=%{l_prefix} \
  73. %if "%{with_gtk}" == "yes"
  74. --with-gtk \
  75. %else
  76. --without-gtk \
  77. %endif
  78. --with-x \
  79. --x-includes=`%{l_prefix}/etc/rc --query x11_incdir` \
  80. --x-libraries=`%{l_prefix}/etc/rc --query x11_libdir` \
  81. --package-path="$PACKAGE_PATH" \
  82. --site-includes=%{l_prefix}/include \
  83. --site-libraries=%{l_prefix}/lib \
  84. --with-site-lisp \
  85. --with-database=berkdb \
  86. --with-ncurses \
  87. --with-jpeg \
  88. --with-tiff \
  89. --with-png \
  90. --with-xpm
  91. %{l_make} %{l_mflags}
  92. %install
  93. rm -rf $RPM_BUILD_ROOT
  94. %{l_shtool} mkdir -f -p -m 755 \
  95. $RPM_BUILD_ROOT%{l_prefix}/info
  96. %{l_make} %{l_mflags} install \
  97. prefix=$RPM_BUILD_ROOT%{l_prefix} \
  98. exec_prefix=$RPM_BUILD_ROOT%{l_prefix}
  99. rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/xemacs
  100. mv $RPM_BUILD_ROOT%{l_prefix}/bin/xemacs-%{version} \
  101. $RPM_BUILD_ROOT%{l_prefix}/bin/xemacs
  102. mv $RPM_BUILD_ROOT%{l_prefix}/lib/xemacs-%{version}/info \
  103. $RPM_BUILD_ROOT%{l_prefix}/info
  104. # create directories for additional packages
  105. for i in xemacs mule site; do
  106. %{l_shtool} mkdir -f -p -m 755 \
  107. $RPM_BUILD_ROOT/%{l_prefix}/lib/xemacs/${i}-packages
  108. done
  109. %if "%{with_sumo}" == "yes"
  110. # install optional sumo package cluster
  111. ( cd $RPM_BUILD_ROOT/%{l_prefix}/lib/xemacs
  112. %{l_gzip} -dc %{SOURCE xemacs-sumo-%{V_sumo}.tar.gz} | %{l_tar} -xvf -
  113. )
  114. %endif
  115. rm -f $RPM_BUILD_ROOT%{l_prefix}/info/dir
  116. strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
  117. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  118. %files -f files
  119. %clean
  120. rm -rf $RPM_BUILD_ROOT