emacs.spec 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. ##
  2. ## emacs.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 information
  26. Name: emacs
  27. Summary: The GNU EMACS Text Editor
  28. URL: http://www.gnu.org/software/emacs/
  29. Vendor: Richard Stallmann et al.
  30. Packager: The OpenPKG Project
  31. Distribution: OpenPKG [BASE]
  32. Group: Editor
  33. License: GPL
  34. Version: 21.2
  35. Release: 20030103
  36. # package options
  37. %option with_x11 %{l_test -p x11}
  38. %option with_jpeg no
  39. %option with_png no
  40. # package option dependencies
  41. %if "%{with_jpeg}" == "yes" || "%{with_png}" == "yes"
  42. %undefine with_x11
  43. %define with_x11 yes
  44. %endif
  45. # list of sources
  46. Source0: ftp://ftp.gnu.org/gnu/emacs/emacs-%{version}.tar.gz
  47. # build information
  48. Prefix: %{l_prefix}
  49. BuildRoot: %{l_buildroot}
  50. BuildPreReq: OpenPKG, openpkg >= 20030103, make, texinfo
  51. PreReq: OpenPKG, openpkg >= 20030103
  52. %if "%{with_x11}" == "yes"
  53. BuildPreReq: X11
  54. PreReq: X11
  55. %if "%{with_jpeg}" == "yes"
  56. BuildPreReq: jpeg
  57. %endif
  58. %if "%{with_png}" == "yes"
  59. BuildPreReq: png, zlib
  60. %endif
  61. %endif
  62. AutoReq: no
  63. AutoReqProv: no
  64. %description
  65. The popular GNU EMACS text editor.
  66. %prep
  67. %setup -q
  68. %build
  69. %{l_shtool} subst \
  70. -e 's;/${version}/;/;g' \
  71. -e 's;/${version};;g' \
  72. -e 's;/${configuration};;g' \
  73. configure
  74. CC="%{l_cc}" \
  75. CFLAGS="%{l_cflags -O}" \
  76. CPPFLAGS="-I%{l_prefix}/include" \
  77. LDFLAGS="-L%{l_prefix}/lib" \
  78. ./configure \
  79. --prefix=%{l_prefix} \
  80. %if "%{with_x11}" == "yes"
  81. --with-x \
  82. --x-includes=`%{l_prefix}/etc/rc --query x11_incdir` \
  83. --x-libraries=`%{l_prefix}/etc/rc --query x11_libdir` \
  84. %if "%{with_jpeg}" == "yes"
  85. --with-jpeg \
  86. %endif
  87. %if "%{with_png}" == "yes"
  88. --with-png \
  89. %endif
  90. --with-x-toolkit=yes
  91. %else
  92. --with-x-toolkit=no \
  93. --without-x
  94. %endif
  95. %{l_make} %{l_mflags -O}
  96. %install
  97. rm -rf $RPM_BUILD_ROOT
  98. %{l_make} %{l_mflags} install \
  99. prefix=$RPM_BUILD_ROOT%{l_prefix} \
  100. exec_prefix=$RPM_BUILD_ROOT%{l_prefix}
  101. rm -f $RPM_BUILD_ROOT%{l_prefix}/info/dir
  102. rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/emacs-%{version}
  103. rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/rcs-checkin
  104. rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/[ce]tags
  105. rm -f $RPM_BUILD_ROOT%{l_prefix}/man/man1/[ce]tags.1
  106. rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/b2m
  107. mv $RPM_BUILD_ROOT%{l_prefix}/info $RPM_BUILD_ROOT%{l_prefix}/info.old
  108. %{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/info
  109. mv $RPM_BUILD_ROOT%{l_prefix}/info.old/emacs* $RPM_BUILD_ROOT%{l_prefix}/info/
  110. rm -rf $RPM_BUILD_ROOT%{l_prefix}/info.old
  111. rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/emacs/etc
  112. rmdir $RPM_BUILD_ROOT%{l_prefix}/share/emacs/leim
  113. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  114. %files -f files
  115. %clean
  116. rm -rf $RPM_BUILD_ROOT