auto-install-vl.spec 2.3 KB

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