auto-install-vl.spec 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. %define _noVersionedDependencies 1
  2. %define prereq_ge() %(LC_ALL="C" rpm -q --queryformat 'Requires(pre):%%{NAME} >= %%{VERSION}' %1| grep -v "is not")
  3. %define emacsen_pkgdir /usr/lib/emacsen-common/packages
  4. %define origname auto-install
  5. %define origver 1.58
  6. Name: %{origname}
  7. Version: %{origver}
  8. Release: 1%{?_dist_release}
  9. Summary: Auto install elisp file
  10. Summary(ja): Emacs Lisp ファイルを自動的にインストールするツール
  11. Source0: http://www.emacswiki.org/emacs/download/auto-install.el
  12. Source1: %{origname}-install.sh
  13. Source2: %{origname}-remove.sh
  14. Source3: vine-default-%{origname}.el
  15. Source4: %{origname}-init.el
  16. Source5: http://www.gnu.org/licenses/gpl-3.0.txt
  17. License: GPLv3+
  18. Group: Applications/Editors/Emacs
  19. URL: http://www.emacswiki.org/emacs/auto-install.el
  20. BuildRoot: %{_tmppath}/%{name}-%{version}-root
  21. BuildArch: noarch
  22. Requires(post): emacsen
  23. Requires(preun): emacsen
  24. %prereq_ge emacsen-common
  25. Conflicts: flim < 1.14.9-2
  26. Distribution: Vine Linux
  27. Vendor: Project Vine
  28. Packager: iwaim
  29. %description
  30. Auto install elisp file.
  31. %prep
  32. %setup -q -T -c %{origname}-%{origver}
  33. %{__cp} -a %{SOURCE5} .
  34. %build
  35. %install
  36. [ "%{buildroot}" != "/" ] && rm -rf %{buildroot}
  37. [ "%{buildroot}" != "/" ] && mkdir -p %{buildroot}
  38. mkdir -p %{buildroot}%{_datadir}/emacs/site-lisp/%{origname}/packages
  39. mkdir -p %{buildroot}%{emacsen_pkgdir}/install
  40. mkdir -p %{buildroot}%{emacsen_pkgdir}/remove
  41. #
  42. # install el files
  43. #
  44. cp -p %{SOURCE0} %{SOURCE3} %{SOURCE4} %{buildroot}%{_datadir}/emacs/site-lisp/%{origname}
  45. #
  46. # install script (bytecompile el and install elc , remove)
  47. #
  48. %_installemacsenscript %{origname} %{SOURCE1}
  49. %_removeemacsenscript %{origname} %{SOURCE2}
  50. %clean
  51. [ "%{buildroot}" != "/" ] && rm -rf %{buildroot}
  52. %post
  53. #
  54. # bytecompile and install
  55. #
  56. if [ "$1" = 2 ]; then
  57. %_emacsenPackageRemove %{origname}
  58. fi
  59. %_addemacsenlist %{origname}
  60. %_emacsenPackageInstall %{origname}
  61. %preun
  62. if [ "$1" = 0 ]; then
  63. %_emacsenPackageRemove %{origname}
  64. %_removeemacsenlist %{origname}
  65. fi
  66. %files
  67. %defattr(-,root,root)
  68. %doc gpl-3.0.txt
  69. %{_datadir}/emacs/site-lisp/%{origname}
  70. %{emacsen_pkgdir}/install/%{origname}
  71. %{emacsen_pkgdir}/remove/%{origname}
  72. %changelog
  73. * Fri Apr 17 2015 Ryoichi INAGAKI <ryo1@toki.waseda.jp> 1.58-1
  74. - updated to 1.58
  75. * Tue Feb 14 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.1.24-3
  76. - rebuild with Vine6 environment
  77. * Sun Mar 7 2010 IWAI, Masaharu <iwai@alib.jp> 0.1.24-2
  78. - update Conflicts flim version
  79. * Tue Feb 23 2010 IWAI, Masaharu <iwai@alib.jp> 0.1.24-1
  80. - first release for Vine Linux