rpm-spec-mode-vl.spec 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. %define _noVersionedDependencies 1
  2. %define prereq_ge() %(LC_ALL="C" rpm -q --queryformat 'Requires:%%{NAME} >= %%{VERSION}' %1| grep -v "is not")
  3. %define origname rpm-spec-mode
  4. %define origver 0.15
  5. Summary: RPM spec file editing commands for Emacs/XEmacs
  6. Name: %{origname}
  7. Version: %{origver}
  8. Release: 1%{?_dist_release}
  9. # from https://github.com/bjorlykke/rpm-spec-mode/archive/master.zip
  10. Source0: %{name}-master.zip
  11. Source1: %{origname}-install.sh
  12. Source2: %{origname}-remove.sh
  13. Source3: vine-default-%{origname}.el
  14. Source4: %{origname}-init.el
  15. License: GPLv2+
  16. Group: Applications/Editors/Emacs
  17. URL: http://www.emacswiki.org/emacs/RpmSpecMode
  18. BuildRoot: %{_tmppath}/%{name}-%{version}-root
  19. BuildArch: noarch
  20. Requires: emacsen
  21. %prereq_ge emacsen-common
  22. Distribution: Vine Linux
  23. Vendor: Project Vine
  24. Packager: iwaim
  25. %description
  26. RPM spec file editing commands for Emacs/XEmacs
  27. %prep
  28. %setup -n %{origname}-master
  29. %build
  30. %install
  31. [ "%{buildroot}" != "/" ] && rm -rf %{buildroot}
  32. [ "%{buildroot}" != "/" ] && mkdir -p %{buildroot}
  33. mkdir -p %{buildroot}%{_datadir}/emacs/site-lisp/%{origname}/packages
  34. mkdir -p %{buildroot}%{emacsen_pkgdir}/install
  35. mkdir -p %{buildroot}%{emacsen_pkgdir}/remove
  36. #
  37. # install el files
  38. #
  39. %__cp -p %{name}.el %{SOURCE3} %{SOURCE4} %{buildroot}%{_datadir}/emacs/site-lisp/%{origname}
  40. #
  41. # install script (bytecompile el and install elc , remove)
  42. #
  43. %_installemacsenscript %{origname} %{SOURCE1}
  44. %_removeemacsenscript %{origname} %{SOURCE2}
  45. %clean
  46. [ "%{buildroot}" != "/" ] && rm -rf %{buildroot}
  47. %post
  48. #
  49. # bytecompile and install
  50. #
  51. if [ "$1" = 2 ]; then
  52. %_emacsenPackageRemove %{origname}
  53. fi
  54. %_addemacsenlist %{origname}
  55. %_emacsenPackageInstall %{origname}
  56. %preun
  57. if [ "$1" = 0 ]; then
  58. %_emacsenPackageRemove %{origname}
  59. %_removeemacsenlist %{origname}
  60. fi
  61. %files
  62. %defattr(-,root,root)
  63. %doc LICENSE README.md
  64. %{_datadir}/emacs/site-lisp/%{origname}
  65. %{emacsen_pkgdir}/install/%{origname}
  66. %{emacsen_pkgdir}/remove/%{origname}
  67. %changelog
  68. * Mon Jan 5 2015 IWAI, Masaharu <iwaim.sub@gmail.com> 0.15-1
  69. - update to 0.15
  70. * Thu Feb 9 2012 Munehiro Yamamoto <munepi@vinelinux.org> 0.12-2
  71. - updated rpm-spec-mode-init.el
  72. * Thu Sep 02 2010 IWAI, Masaharu <iwai@alib.jp> 0.12-1
  73. - first release for Vine Linux