emacsen-common-vl.spec 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244
  1. %define name emacsen-common
  2. %define origname emacsen-common
  3. %define version 0.5
  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. Summary(ja): すべての emacs パッケージのための共用スクリプト
  8. Name: %{name}
  9. Version: %{version}
  10. Release: 3%{?_dist_release}
  11. License: GPL
  12. Group: Applications/Editors/Emacs
  13. # archive created from git-svn local repos.
  14. # git archive --format=tar --prefix=emacsen-common-0.5/ HEAD |\
  15. # xz > ~/rpm/SOURCES/emacsen-common/emacsen-common-0.5.tar.xz
  16. Source0: %{origname}-%{version}.tar.xz
  17. Distribution: Vine Liunx
  18. Vendor: Project Vine
  19. Packager: daisuke
  20. URL: http://trac.vinelinux.org/browser/projects/emacsen-common
  21. BuildRoot: %{_tmppath}/%{name}-root
  22. BuildArch: noarch
  23. Requires: rpm
  24. Requires: gzip
  25. Requires: ruby
  26. %prereq_ge alternatives
  27. BuildRequires: alternatives
  28. %description
  29. This package contains code that is needed by all the (x)emacs packages.
  30. %prep
  31. %setup -q
  32. %build
  33. %install
  34. %__rm -rf $RPM_BUILD_ROOT
  35. %__mkdir_p $RPM_BUILD_ROOT/%{_sysconfdir}/emacs
  36. %__mkdir_p $RPM_BUILD_ROOT/%{_var}/lib/%{origname}
  37. %__mkdir_p $RPM_BUILD_ROOT/%{_libdir}/%{origname}/packages/remove
  38. %__mkdir_p $RPM_BUILD_ROOT/%{_libdir}/%{origname}/packages/install
  39. %__mkdir_p $RPM_BUILD_ROOT/%{_datadir}/%{origname}/site-list
  40. %__mkdir_p $RPM_BUILD_ROOT/%{_var}/lib/emacs
  41. echo "/usr/bin/b2m
  42. /usr/bin/ctags
  43. /usr/bin/ebrowse
  44. /usr/bin/emacsclient
  45. /usr/bin/etags
  46. /usr/bin/gctags
  47. /usr/bin/gnuclient
  48. /usr/bin/grep-changelog
  49. /usr/bin/ootags
  50. /usr/bin/rcs-checkin
  51. /usr/share/appdata/emacs.appdata.xml
  52. /usr/share/icons/hicolor/scalable/apps/emacs.svg
  53. /usr/share/icons/hicolor/scalable/mimetypes/emacs-document.svg" > $RPM_BUILD_ROOT%{_var}/lib/emacs/alternative-filelist
  54. %__cp show-vine-default.sh $RPM_BUILD_ROOT/%{_libdir}/%{origname}/
  55. %__cp scripts/emacs-install.rb $RPM_BUILD_ROOT/%{_libdir}/%{origname}/.
  56. %__cp scripts/emacs-package-install.rb $RPM_BUILD_ROOT/%{_libdir}/%{origname}/.
  57. %__cp scripts/generate-package-list.rb $RPM_BUILD_ROOT/%{_libdir}/%{origname}/.
  58. %__cp scripts/installed-flavors $RPM_BUILD_ROOT/%{_var}/lib/emacsen-common/installed-flavors
  59. %__cp scripts/installed-elisp $RPM_BUILD_ROOT/%{_var}/lib/emacsen-common/installed-elisp
  60. %__cp scripts/change-default-flavors.rb $RPM_BUILD_ROOT/%{_libdir}/%{origname}/.
  61. %__ln_s -f emacs-package-install.rb $RPM_BUILD_ROOT/%{_libdir}/%{origname}/emacs-package-install
  62. %__ln_s -f emacs-package-install.rb $RPM_BUILD_ROOT/%{_libdir}/%{origname}/emacs-package-remove
  63. %__ln_s -f emacs-install.rb $RPM_BUILD_ROOT/%{_libdir}/%{origname}/emacs-install
  64. %__ln_s -f emacs-install.rb $RPM_BUILD_ROOT/%{_libdir}/%{origname}/emacs-remove
  65. %__ln_s -f generate-package-list.rb $RPM_BUILD_ROOT/%{_libdir}/%{origname}/generate-package-list
  66. %__ln_s -f generate-package-list.rb $RPM_BUILD_ROOT/%{_libdir}/%{origname}/remove-package-list
  67. %__ln_s -f generate-package-list.rb $RPM_BUILD_ROOT/%{_libdir}/%{origname}/generate-flavors-list
  68. %__ln_s -f generate-package-list.rb $RPM_BUILD_ROOT/%{_libdir}/%{origname}/remove-flavors-list
  69. #%__ln_s -f change-default-flavors.rb $RPM_BUILD_ROOT/%{_libdir}/%{origname}/change-default-flavor
  70. #%__ln_s -f change-default-flavors.rb $RPM_BUILD_ROOT/%{_libdir}/%{origname}/reverse-default-flavor
  71. #%__ln_s -f change-default-flavors.rb $RPM_BUILD_ROOT/%{_libdir}/%{origname}/change-temporary-flavor
  72. #%__make install prefix=$RPM_BUILD_ROOT/%{_prefix}
  73. %clean
  74. %__rm -rf ${RPM_BUILD_ROOT}
  75. %triggerpostun -- emacs < 20.7-0vl7.3
  76. if [ -f %{_var}/lib/emacsen-common/doinstaflavor-emacs ]; then
  77. NEWFLAVOR=$(cat %{_var}/lib/emacsen-common/doinstaflavor-emacs)
  78. %_addflavorslist $NEWFLAVOR
  79. export PRIORITY=10
  80. %_installemacs $NEWFLAVOR
  81. unset PRIORITY
  82. %__rm -rf %{_var}/lib/emacsen-common/doinstaflavor-emacs
  83. fi
  84. %triggerpostun -- xemacs < 21.1.14-0vl6
  85. if [ -f %{_var}/lib/emacsen-common/doinstaflavor-xemacs ]; then
  86. NEWFLAVOR=$(cat %{_var}/lib/emacsen-common/doinstaflavor-xemacs)
  87. %_addflavorslist $NEWFLAVOR
  88. export PRIORITY=15
  89. %_installemacs $NEWFLAVOR
  90. unset PRIORITY
  91. %__rm -rf %{_var}/lib/emacsen-common/doinstaflavor-xemacs
  92. fi
  93. %files
  94. %defattr(-, root, root)
  95. %attr(755,root,root) %{_libdir}/emacsen-common/show-vine-default.sh
  96. %attr(755,root,root) %{_libdir}/emacsen-common/emacs-*
  97. %attr(755,root,root) %{_libdir}/emacsen-common/generate-*
  98. %attr(755,root,root) %{_libdir}/emacsen-common/remove-*
  99. %dir %{_libdir}/emacsen-common/packages/remove
  100. %dir %{_libdir}/emacsen-common/packages/install
  101. %dir %{_sysconfdir}/emacs
  102. %dir %{_libdir}/emacsen-common
  103. %dir %{_var}/lib/emacs
  104. %{_var}/lib/emacs/alternative-filelist
  105. %config(noreplace) %{_var}/lib/emacsen-common/installed-flavors
  106. %config(noreplace) %{_var}/lib/emacsen-common/installed-elisp
  107. %changelog
  108. * Mon Jun 4 2018 IWAI, Masaharu <iwaim.sub@gmail.com> 0.5-3
  109. - update alternative-filelist; add 'emacs.appdata.xml'
  110. * Thu Feb 5 2015 Ryoichi INAGAKI <ryo1@toki.waseda.jp> 0.5-2
  111. - rebuilt on current VineSeed
  112. - moved to Applications/Editors/Emacs Group
  113. * Sat Dec 15 2012 Daisuke SUZUKI <daisuke@linux.or.jp> 0.5-1
  114. - import emacsen-common to vine svn repository
  115. - support ruby-1.9.3
  116. * Sun Mar 03 2011 Munehiro Yamamoto <munepi@vinelinux.org> 0.4-6
  117. - fixed show-vine-default.sh
  118. * Sat Jan 29 2011 Munehiro Yamamoto <munepi@vinelinux.org> 0.4-5
  119. - added grep-changelog, emacs{,-document}.svg to emacs's slave
  120. * Sun Dec 05 2010 Munehiro Yamamoto <munepi@vinelinux.org> 0.4-4
  121. - added show-vine-default.sh
  122. * Sun Apr 26 2009 Munehiro Yamamoto <munepi@cg8.so-net.ne.jp> 0.4-3
  123. - created %%{_sysconfdir}/emacs for vine-default
  124. - added in %%files section:
  125. - %%dir %%{_sysconfdir}/emacs
  126. - %%dir %%{_libdir}/emacsen-common
  127. - %%dir %%{_var}/lib/emacs
  128. * Sat Aug 16 2008 Shu KONNO <owa@bg.wakwak.com> 0.4-2vl5
  129. - added %%define _libdir %%{_prefix}/lib
  130. * Fri Aug 15 2008 Shu KONNO <owa@bg.wakwak.com> 0.4-1vl5
  131. - applied new versioning policy
  132. * Thu Mar 23 2006 Daisuke SUZUKI <daisuke@linux.or.jp> 0.4-0vl23
  133. - use %%{_var}/lib instead of %%{_localstatedir}
  134. * Wed Jul 28 2004 Daisuke SUZUKI <daisuke@linux.or.jp> 0.4-0vl22
  135. - add b2m, gnuclient, ootags to emacs's slave
  136. * Wed Jul 28 2004 Daisuke SUZUKI <daisuke@linux.or.jp> 0.4-0vl21
  137. - fix emacsen-install to add emacsclient as emacs's slave
  138. * Thu Mar 4 2004 Daisuke SUZUKI <daisuke@linux.or.jp> 0.4-0vl20
  139. - add PreReq: gzip
  140. * Wed Apr 3 2002 Jun Nishii <jun@vinelinux.org> 0.4-0vl19
  141. - fix typo in xemacs handling of emacs-install
  142. * Sat Mar 23 2002 Kazuhisa TAKEI <takei@vinelinux.org> 0.4-0vl18
  143. - fixed emacs-install.rb
  144. ( don't remove xemacs-alternatives)
  145. * Sat Mar 23 2002 Kazuhisa TAKEI <takei@vinelinux.org> 0.4-0vl17
  146. - add /usr/bin/xemacs to alternatives.
  147. * Thu Mar 7 2002 Kazuhisa TAKEI <takei@vinelinux.org> 0.4-0vl16
  148. - %triggerin -> %triggerpostun
  149. * Wed Mar 6 2002 Daisuke SUZUKI <daisuke@linux.or.jp> 0.4-0vl15
  150. - add prereq rpm >= 3.0.6-0vl16 for emacsen macros
  151. * Thu Dec 6 2001 Kazuhisa TAKEI <takei@vinelinux.org> 0.4-0vl14
  152. - fixed %triggerin
  153. * Thu Nov 8 2001 Kazuhisa TAKEI <takei@vinelinux.org> 0.4-0vl13
  154. - move /tmp -> /var/lib/emacsen-common (IP(package)C file)
  155. - add %triggerin xemacs
  156. * Sat Oct 6 2001 Kazuhisa TAKEI <takei@vinelinux.org> 0.4-0vl1
  157. - fixed emacs-install.rb ( lacking run update-alternatives when emacsen install)
  158. * Sun Aug 12 2001 Kazuhisa TAKEI <takei@vinelinux.org> 0.2-0vl1
  159. - add routine when install and remove .
  160. * Wed Jul 18 2001 Kazuhisa TAKEI <takei@vinelinux.org> 0.1-0vl1
  161. - initial package