xemacs.spec 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  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.12
  27. %define V_sumo 2003-02-05
  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: 20030402
  39. # package options
  40. %option with_sumo yes
  41. # list of sources
  42. Source0: ftp://ftp.xemacs.org/pub/xemacs/stable/xemacs-%{V_xemacs}.tar.gz
  43. Source1: ftp://ftp.xemacs.org/pub/xemacs/packages/xemacs-sumo-%{V_sumo}.tar.bz2
  44. # build information
  45. Prefix: %{l_prefix}
  46. BuildRoot: %{l_buildroot}
  47. BuildPreReq: OpenPKG, openpkg >= 20030103, X11, ncurses, gtk, jpeg, png, zlib, tiff, db, xpm, make, tar, bzip2
  48. PreReq: OpenPKG, openpkg >= 20030103, X11, ncurses
  49. AutoReq: no
  50. AutoReqProv: no
  51. %description
  52. The popular GNU EMACS text editor (X11/Lucid Version).
  53. %prep
  54. %setup0 -q
  55. %build
  56. PACKAGE_PATH=""
  57. for i in xemacs mule site; do
  58. PACKAGE_PATH="${PACKAGE_PATH}::%{l_prefix}/lib/xemacs/${i}-packages"
  59. done
  60. CC="%{l_cc}" \
  61. CFLAGS="%{l_cflags -O}" \
  62. CPPFLAGS="%{l_cppflags tiff}" \
  63. LDFLAGS="%{l_ldflags}" \
  64. ./configure \
  65. --prefix=%{l_prefix} \
  66. --with-gtk \
  67. --with-x \
  68. --x-includes=`%{l_prefix}/etc/rc --query x11_incdir` \
  69. --x-libraries=`%{l_prefix}/etc/rc --query x11_libdir` \
  70. --package-path="$PACKAGE_PATH" \
  71. --site-includes=%{l_prefix}/include \
  72. --site-libraries=%{l_prefix}/lib \
  73. --with-site-lisp \
  74. --with-database=berkdb \
  75. --with-ncurses \
  76. --with-jpeg \
  77. --with-tiff \
  78. --with-png \
  79. --with-xpm
  80. %{l_make} %{l_mflags}
  81. %install
  82. rm -rf $RPM_BUILD_ROOT
  83. %{l_shtool} mkdir -f -p -m 755 \
  84. $RPM_BUILD_ROOT%{l_prefix}/info
  85. %{l_make} %{l_mflags} install \
  86. prefix=$RPM_BUILD_ROOT%{l_prefix} \
  87. exec_prefix=$RPM_BUILD_ROOT%{l_prefix}
  88. rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/xemacs
  89. mv $RPM_BUILD_ROOT%{l_prefix}/bin/xemacs-%{version} \
  90. $RPM_BUILD_ROOT%{l_prefix}/bin/xemacs
  91. mv $RPM_BUILD_ROOT%{l_prefix}/lib/xemacs-%{version}/info \
  92. $RPM_BUILD_ROOT%{l_prefix}/info
  93. # create directories for additional packages
  94. for i in xemacs mule site; do
  95. %{l_shtool} mkdir -f -p -m 755 \
  96. $RPM_BUILD_ROOT/%{l_prefix}/lib/xemacs/${i}-packages
  97. done
  98. %if "%{with_sumo}" == "yes"
  99. # install optional sumo package cluster
  100. ( cd $RPM_BUILD_ROOT/%{l_prefix}/lib/xemacs
  101. %{l_bzip2} -dc %{SOURCE xemacs-sumo-%{V_sumo}.tar.bz2} | %{l_tar} -xvf -
  102. )
  103. %endif
  104. rm -f $RPM_BUILD_ROOT%{l_prefix}/info/dir
  105. strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
  106. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  107. %files -f files
  108. %clean
  109. rm -rf $RPM_BUILD_ROOT