emacsen-common-vl.spec 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213
  1. %define name emacsen-common
  2. %define origname emacsen-common
  3. %define version 0.4
  4. %define _ruby_libdir %{_libdir}/ruby/1.8
  5. %define prereq_ge() %(LC_ALL="C" rpm -q --queryformat 'PreReq:%%{NAME} >= %%{VERSION}' %1| grep -v "is not")
  6. %define _libdir %{_prefix}/lib
  7. Summary: Common facilities for all emacsen.
  8. Name: %{name}
  9. Version: %{version}
  10. Release: 3%{?_dist_release}
  11. License: GPL
  12. Vendor: %{_vendor}
  13. Group: Development/Languages
  14. Source: http://www.ad-hoc.org/~xtakei/%{origname}/%{origname}-%{version}.tar.gz
  15. Patch: emacsen-common-0.4-emacsclient.patch
  16. Packager: Kazuhisa TAKEI <takei@vinelinux.org>
  17. URL: http://vinelinux.org/
  18. BuildRoot: %{_tmppath}/%{name}-root
  19. BuildArch: noarch
  20. PreReq: rpm
  21. PreReq: gzip
  22. Requires: ruby
  23. %prereq_ge alternatives
  24. BuildPreReq: alternatives
  25. %description
  26. This package contains code that is needed by all the (x)emacs packages.
  27. %prep
  28. %setup -q -n %{origname}
  29. %patch -p1
  30. %build
  31. %install
  32. rm -rf $RPM_BUILD_ROOT
  33. mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/emacs
  34. mkdir -p $RPM_BUILD_ROOT/%{_var}/lib/%{origname}
  35. mkdir -p $RPM_BUILD_ROOT/%{_libdir}/%{origname}/packages/remove
  36. mkdir -p $RPM_BUILD_ROOT/%{_libdir}/%{origname}/packages/install
  37. mkdir -p $RPM_BUILD_ROOT/%{_datadir}/%{origname}/site-list
  38. mkdir -p $RPM_BUILD_ROOT/%{_var}/lib/emacs
  39. echo "/usr/bin/etags
  40. /usr/bin/rcs-checkin
  41. /usr/bin/emacsclient
  42. /usr/bin/gctags
  43. /usr/bin/b2m
  44. /usr/bin/gnuclient
  45. /usr/bin/ootags" > $RPM_BUILD_ROOT%{_var}/lib/emacs/alternative-filelist
  46. cp scripts/emacs-install.rb $RPM_BUILD_ROOT/%{_libdir}/%{origname}/.
  47. cp scripts/emacs-package-install.rb $RPM_BUILD_ROOT/%{_libdir}/%{origname}/.
  48. cp scripts/generate-package-list.rb $RPM_BUILD_ROOT/%{_libdir}/%{origname}/.
  49. cp scripts/installed-flavors $RPM_BUILD_ROOT/%{_var}/lib/emacsen-common/installed-flavors
  50. cp scripts/installed-elisp $RPM_BUILD_ROOT/%{_var}/lib/emacsen-common/installed-elisp
  51. cp scripts/change-default-flavors.rb $RPM_BUILD_ROOT/%{_libdir}/%{origname}/.
  52. ln -sf emacs-package-install.rb $RPM_BUILD_ROOT/%{_libdir}/%{origname}/emacs-package-install
  53. ln -sf emacs-package-install.rb $RPM_BUILD_ROOT/%{_libdir}/%{origname}/emacs-package-remove
  54. ln -sf emacs-install.rb $RPM_BUILD_ROOT/%{_libdir}/%{origname}/emacs-install
  55. ln -sf emacs-install.rb $RPM_BUILD_ROOT/%{_libdir}/%{origname}/emacs-remove
  56. ln -sf generate-package-list.rb $RPM_BUILD_ROOT/%{_libdir}/%{origname}/generate-package-list
  57. ln -sf generate-package-list.rb $RPM_BUILD_ROOT/%{_libdir}/%{origname}/remove-package-list
  58. ln -sf generate-package-list.rb $RPM_BUILD_ROOT/%{_libdir}/%{origname}/generate-flavors-list
  59. ln -sf generate-package-list.rb $RPM_BUILD_ROOT/%{_libdir}/%{origname}/remove-flavors-list
  60. #ln -sf change-default-flavors.rb $RPM_BUILD_ROOT/%{_libdir}/%{origname}/change-default-flavor
  61. #ln -sf change-default-flavors.rb $RPM_BUILD_ROOT/%{_libdir}/%{origname}/reverse-default-flavor
  62. #ln -sf change-default-flavors.rb $RPM_BUILD_ROOT/%{_libdir}/%{origname}/change-temporary-flavor
  63. #make install prefix=$RPM_BUILD_ROOT/%{_prefix}
  64. %clean
  65. rm -rf ${RPM_BUILD_ROOT}
  66. %triggerpostun -- emacs < 20.7-0vl7.3
  67. if [ -f %{_var}/lib/emacsen-common/doinstaflavor-emacs ]; then
  68. NEWFLAVOR=$(cat %{_var}/lib/emacsen-common/doinstaflavor-emacs)
  69. %_addflavorslist $NEWFLAVOR
  70. export PRIORITY=10
  71. %_installemacs $NEWFLAVOR
  72. unset PRIORITY
  73. rm -rf %{_var}/lib/emacsen-common/doinstaflavor-emacs
  74. fi
  75. %triggerpostun -- xemacs < 21.1.14-0vl6
  76. if [ -f %{_var}/lib/emacsen-common/doinstaflavor-xemacs ]; then
  77. NEWFLAVOR=$(cat %{_var}/lib/emacsen-common/doinstaflavor-xemacs)
  78. %_addflavorslist $NEWFLAVOR
  79. export PRIORITY=15
  80. %_installemacs $NEWFLAVOR
  81. unset PRIORITY
  82. rm -rf %{_var}/lib/emacsen-common/doinstaflavor-xemacs
  83. fi
  84. %files
  85. %defattr(-, root, root)
  86. %attr(755,root,root) %{_libdir}/emacsen-common/emacs-*
  87. %attr(755,root,root) %{_libdir}/emacsen-common/generate-*
  88. %attr(755,root,root) %{_libdir}/emacsen-common/remove-*
  89. %dir %{_libdir}/emacsen-common/packages/remove
  90. %dir %{_libdir}/emacsen-common/packages/install
  91. %dir %{_sysconfdir}/emacs
  92. %dir %{_libdir}/emacsen-common
  93. %dir %{_var}/lib/emacs
  94. %{_var}/lib/emacs/alternative-filelist
  95. %config(noreplace) %{_var}/lib/emacsen-common/installed-flavors
  96. %config(noreplace) %{_var}/lib/emacsen-common/installed-elisp
  97. %changelog
  98. * Sun Apr 26 2009 Munehiro Yamamoto <munepi@cg8.so-net.ne.jp> 0.4-3
  99. - created %%{_sysconfdir}/emacs for vine-default
  100. - added in %%files section:
  101. - %%dir %%{_sysconfdir}/emacs
  102. - %%dir %%{_libdir}/emacsen-common
  103. - %%dir %%{_var}/lib/emacs
  104. * Sat Aug 16 2008 Shu KONNO <owa@bg.wakwak.com> 0.4-2vl5
  105. - added %%define _libdir %%{_prefix}/lib
  106. * Fri Aug 15 2008 Shu KONNO <owa@bg.wakwak.com> 0.4-1vl5
  107. - applied new versioning policy
  108. * Thu Mar 23 2006 Daisuke SUZUKI <daisuke@linux.or.jp> 0.4-0vl23
  109. - use %%{_var}/lib instead of %%{_localstatedir}
  110. * Wed Jul 28 2004 Daisuke SUZUKI <daisuke@linux.or.jp> 0.4-0vl22
  111. - add b2m, gnuclient, ootags to emacs's slave
  112. * Wed Jul 28 2004 Daisuke SUZUKI <daisuke@linux.or.jp> 0.4-0vl21
  113. - fix emacsen-install to add emacsclient as emacs's slave
  114. * Thu Mar 4 2004 Daisuke SUZUKI <daisuke@linux.or.jp> 0.4-0vl20
  115. - add PreReq: gzip
  116. * Wed Apr 3 2002 Jun Nishii <jun@vinelinux.org> 0.4-0vl19
  117. - fix typo in xemacs handling of emacs-install
  118. * Sat Mar 23 2002 Kazuhisa TAKEI <takei@vinelinux.org> 0.4-0vl18
  119. - fixed emacs-install.rb
  120. ( don't remove xemacs-alternatives)
  121. * Sat Mar 23 2002 Kazuhisa TAKEI <takei@vinelinux.org> 0.4-0vl17
  122. - add /usr/bin/xemacs to alternatives.
  123. * Thu Mar 7 2002 Kazuhisa TAKEI <takei@vinelinux.org> 0.4-0vl16
  124. - %triggerin -> %triggerpostun
  125. * Wed Mar 6 2002 Daisuke SUZUKI <daisuke@linux.or.jp> 0.4-0vl15
  126. - add prereq rpm >= 3.0.6-0vl16 for emacsen macros
  127. * Thu Dec 6 2001 Kazuhisa TAKEI <takei@vinelinux.org> 0.4-0vl14
  128. - fixed %triggerin
  129. * Thu Nov 8 2001 Kazuhisa TAKEI <takei@vinelinux.org> 0.4-0vl13
  130. - move /tmp -> /var/lib/emacsen-common (IP(package)C file)
  131. - add %triggerin xemacs
  132. * Sat Oct 6 2001 Kazuhisa TAKEI <takei@vinelinux.org> 0.4-0vl1
  133. - fixed emacs-install.rb ( lacking run update-alternatives when emacsen install)
  134. * Sun Aug 12 2001 Kazuhisa TAKEI <takei@vinelinux.org> 0.2-0vl1
  135. - add routine when install and remove .
  136. * Wed Jul 18 2001 Kazuhisa TAKEI <takei@vinelinux.org> 0.1-0vl1
  137. - initial package