emacs.spec 4.0 KB

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