emacsen-common-vl.spec 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228
  1. %define name emacsen-common
  2. %define origname emacsen-common
  3. %define version 0.4
  4. %define prereq_ge() %(LC_ALL="C" rpm -q --queryformat 'Requires(post):%%{NAME} >= %%{VERSION}' %1| grep -v "is not")
  5. %define _libdir %{_prefix}/lib
  6. Summary: Common facilities for all emacsen.
  7. Name: %{name}
  8. Version: %{version}
  9. Release: 6%{?_dist_release}
  10. License: GPL
  11. Vendor: %{_vendor}
  12. Group: Development/Languages
  13. Source0: http://www.ad-hoc.org/~xtakei/%{origname}/%{origname}-%{version}.tar.gz
  14. Source10: show-vine-default.sh
  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. Requires: rpm
  21. Requires: gzip
  22. Requires: ruby
  23. %prereq_ge alternatives
  24. BuildRequires: 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/b2m
  40. /usr/bin/ctags
  41. /usr/bin/ebrowse
  42. /usr/bin/emacsclient
  43. /usr/bin/etags
  44. /usr/bin/gctags
  45. /usr/bin/gnuclient
  46. /usr/bin/grep-changelog
  47. /usr/bin/ootags
  48. /usr/bin/rcs-checkin
  49. /usr/share/icons/hicolor/scalable/apps/emacs.svg
  50. /usr/share/icons/hicolor/scalable/mimetypes/emacs-document.svg" > $RPM_BUILD_ROOT%{_var}/lib/emacs/alternative-filelist
  51. %__cp %{SOURCE10} $RPM_BUILD_ROOT/%{_libdir}/%{origname}/
  52. %__cp scripts/emacs-install.rb $RPM_BUILD_ROOT/%{_libdir}/%{origname}/.
  53. %__cp scripts/emacs-package-install.rb $RPM_BUILD_ROOT/%{_libdir}/%{origname}/.
  54. %__cp scripts/generate-package-list.rb $RPM_BUILD_ROOT/%{_libdir}/%{origname}/.
  55. %__cp scripts/installed-flavors $RPM_BUILD_ROOT/%{_var}/lib/emacsen-common/installed-flavors
  56. %__cp scripts/installed-elisp $RPM_BUILD_ROOT/%{_var}/lib/emacsen-common/installed-elisp
  57. %__cp scripts/change-default-flavors.rb $RPM_BUILD_ROOT/%{_libdir}/%{origname}/.
  58. %__ln_s -f emacs-package-install.rb $RPM_BUILD_ROOT/%{_libdir}/%{origname}/emacs-package-install
  59. %__ln_s -f emacs-package-install.rb $RPM_BUILD_ROOT/%{_libdir}/%{origname}/emacs-package-remove
  60. %__ln_s -f emacs-install.rb $RPM_BUILD_ROOT/%{_libdir}/%{origname}/emacs-install
  61. %__ln_s -f emacs-install.rb $RPM_BUILD_ROOT/%{_libdir}/%{origname}/emacs-remove
  62. %__ln_s -f generate-package-list.rb $RPM_BUILD_ROOT/%{_libdir}/%{origname}/generate-package-list
  63. %__ln_s -f generate-package-list.rb $RPM_BUILD_ROOT/%{_libdir}/%{origname}/remove-package-list
  64. %__ln_s -f generate-package-list.rb $RPM_BUILD_ROOT/%{_libdir}/%{origname}/generate-flavors-list
  65. %__ln_s -f generate-package-list.rb $RPM_BUILD_ROOT/%{_libdir}/%{origname}/remove-flavors-list
  66. #%__ln_s -f change-default-flavors.rb $RPM_BUILD_ROOT/%{_libdir}/%{origname}/change-default-flavor
  67. #%__ln_s -f change-default-flavors.rb $RPM_BUILD_ROOT/%{_libdir}/%{origname}/reverse-default-flavor
  68. #%__ln_s -f change-default-flavors.rb $RPM_BUILD_ROOT/%{_libdir}/%{origname}/change-temporary-flavor
  69. #%__make install prefix=$RPM_BUILD_ROOT/%{_prefix}
  70. %clean
  71. %__rm -rf ${RPM_BUILD_ROOT}
  72. %triggerpostun -- emacs < 20.7-0vl7.3
  73. if [ -f %{_var}/lib/emacsen-common/doinstaflavor-emacs ]; then
  74. NEWFLAVOR=$(cat %{_var}/lib/emacsen-common/doinstaflavor-emacs)
  75. %_addflavorslist $NEWFLAVOR
  76. export PRIORITY=10
  77. %_installemacs $NEWFLAVOR
  78. unset PRIORITY
  79. %__rm -rf %{_var}/lib/emacsen-common/doinstaflavor-emacs
  80. fi
  81. %triggerpostun -- xemacs < 21.1.14-0vl6
  82. if [ -f %{_var}/lib/emacsen-common/doinstaflavor-xemacs ]; then
  83. NEWFLAVOR=$(cat %{_var}/lib/emacsen-common/doinstaflavor-xemacs)
  84. %_addflavorslist $NEWFLAVOR
  85. export PRIORITY=15
  86. %_installemacs $NEWFLAVOR
  87. unset PRIORITY
  88. %__rm -rf %{_var}/lib/emacsen-common/doinstaflavor-xemacs
  89. fi
  90. %files
  91. %defattr(-, root, root)
  92. %attr(755,root,root) %{_libdir}/emacsen-common/show-vine-default.sh
  93. %attr(755,root,root) %{_libdir}/emacsen-common/emacs-*
  94. %attr(755,root,root) %{_libdir}/emacsen-common/generate-*
  95. %attr(755,root,root) %{_libdir}/emacsen-common/remove-*
  96. %dir %{_libdir}/emacsen-common/packages/remove
  97. %dir %{_libdir}/emacsen-common/packages/install
  98. %dir %{_sysconfdir}/emacs
  99. %dir %{_libdir}/emacsen-common
  100. %dir %{_var}/lib/emacs
  101. %{_var}/lib/emacs/alternative-filelist
  102. %config(noreplace) %{_var}/lib/emacsen-common/installed-flavors
  103. %config(noreplace) %{_var}/lib/emacsen-common/installed-elisp
  104. %changelog
  105. * Sun Mar 03 2011 Munehiro Yamamoto <munepi@vinelinux.org> 0.4-6
  106. - fixed show-vine-default.sh
  107. * Sat Jan 29 2011 Munehiro Yamamoto <munepi@vinelinux.org> 0.4-5
  108. - added grep-changelog, emacs{,-document}.svg to emacs's slave
  109. * Sun Dec 05 2010 Munehiro Yamamoto <munepi@vinelinux.org> 0.4-4
  110. - added show-vine-default.sh
  111. * Sun Apr 26 2009 Munehiro Yamamoto <munepi@cg8.so-net.ne.jp> 0.4-3
  112. - created %%{_sysconfdir}/emacs for vine-default
  113. - added in %%files section:
  114. - %%dir %%{_sysconfdir}/emacs
  115. - %%dir %%{_libdir}/emacsen-common
  116. - %%dir %%{_var}/lib/emacs
  117. * Sat Aug 16 2008 Shu KONNO <owa@bg.wakwak.com> 0.4-2vl5
  118. - added %%define _libdir %%{_prefix}/lib
  119. * Fri Aug 15 2008 Shu KONNO <owa@bg.wakwak.com> 0.4-1vl5
  120. - applied new versioning policy
  121. * Thu Mar 23 2006 Daisuke SUZUKI <daisuke@linux.or.jp> 0.4-0vl23
  122. - use %%{_var}/lib instead of %%{_localstatedir}
  123. * Wed Jul 28 2004 Daisuke SUZUKI <daisuke@linux.or.jp> 0.4-0vl22
  124. - add b2m, gnuclient, ootags to emacs's slave
  125. * Wed Jul 28 2004 Daisuke SUZUKI <daisuke@linux.or.jp> 0.4-0vl21
  126. - fix emacsen-install to add emacsclient as emacs's slave
  127. * Thu Mar 4 2004 Daisuke SUZUKI <daisuke@linux.or.jp> 0.4-0vl20
  128. - add PreReq: gzip
  129. * Wed Apr 3 2002 Jun Nishii <jun@vinelinux.org> 0.4-0vl19
  130. - fix typo in xemacs handling of emacs-install
  131. * Sat Mar 23 2002 Kazuhisa TAKEI <takei@vinelinux.org> 0.4-0vl18
  132. - fixed emacs-install.rb
  133. ( don't remove xemacs-alternatives)
  134. * Sat Mar 23 2002 Kazuhisa TAKEI <takei@vinelinux.org> 0.4-0vl17
  135. - add /usr/bin/xemacs to alternatives.
  136. * Thu Mar 7 2002 Kazuhisa TAKEI <takei@vinelinux.org> 0.4-0vl16
  137. - %triggerin -> %triggerpostun
  138. * Wed Mar 6 2002 Daisuke SUZUKI <daisuke@linux.or.jp> 0.4-0vl15
  139. - add prereq rpm >= 3.0.6-0vl16 for emacsen macros
  140. * Thu Dec 6 2001 Kazuhisa TAKEI <takei@vinelinux.org> 0.4-0vl14
  141. - fixed %triggerin
  142. * Thu Nov 8 2001 Kazuhisa TAKEI <takei@vinelinux.org> 0.4-0vl13
  143. - move /tmp -> /var/lib/emacsen-common (IP(package)C file)
  144. - add %triggerin xemacs
  145. * Sat Oct 6 2001 Kazuhisa TAKEI <takei@vinelinux.org> 0.4-0vl1
  146. - fixed emacs-install.rb ( lacking run update-alternatives when emacsen install)
  147. * Sun Aug 12 2001 Kazuhisa TAKEI <takei@vinelinux.org> 0.2-0vl1
  148. - add routine when install and remove .
  149. * Wed Jul 18 2001 Kazuhisa TAKEI <takei@vinelinux.org> 0.1-0vl1
  150. - initial package