php-mode-vl.spec 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  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 php-mode
  5. %define origver 1.5.0
  6. %define release 2%{?_dist_release}
  7. Summary: PHP-mode for Emacsen
  8. Name: %{origname}
  9. Version: %{origver}
  10. Release: %{release}
  11. Group: Applications/Editors/Emacs
  12. License: GPL
  13. URL: http://sourceforge.net/projects/php-mode/
  14. Source0: http://prdownloads.sourceforge.net/php-mode/php-mode-%{version}.tar.gz
  15. Source1: %{origname}-install.sh
  16. Source2: %{origname}-remove.sh
  17. Source3: vine-default-php-mode.el
  18. Source4: php-mode-init.el
  19. Buildroot: %{_tmppath}/%{name}-%{version}-root
  20. BuildArch: noarch
  21. Requires(post): emacsen
  22. Requires: emacsen texinfo
  23. #Requires: speedbar
  24. %prereq_ge emacsen-common
  25. %description
  26. An Emacs major mode for editing PHP code. Features: Syntax coloring
  27. and indenting; Documentation browse and search functions; Support for
  28. Imenu and SpeedBar; Customization options
  29. %prep
  30. %setup -q
  31. makeinfo php-mode.texi
  32. %install
  33. [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT}
  34. [ "${RPM_BUILD_ROOT}" != "/" ] && mkdir -p ${RPM_BUILD_ROOT}
  35. mkdir -p $RPM_BUILD_ROOT/%{_datadir}/emacs/site-lisp/%{origname}
  36. mkdir -p $RPM_BUILD_ROOT/%{emacsen_pkgdir}/install
  37. mkdir -p $RPM_BUILD_ROOT/%{emacsen_pkgdir}/remove
  38. mkdir -p $RPM_BUILD_ROOT/%{_infodir}
  39. install -m 0644 php-mode.info $RPM_BUILD_ROOT/%{_infodir}
  40. ###
  41. # install el files
  42. cp -a *.el %{SOURCE3} %{SOURCE4} ${RPM_BUILD_ROOT}%{_datadir}/emacs/site-lisp/%{origname}
  43. ###
  44. # install script( bytecompile el and install elc , remove )
  45. %_installemacsenscript %{origname} %{SOURCE1}
  46. %_removeemacsenscript %{origname} %{SOURCE2}
  47. %post
  48. ###
  49. # bytecompile and install
  50. if [ "$1" = 2 ]; then
  51. %_emacsenPackageRemove %{origname}
  52. fi
  53. %_addemacsenlist %{origname}
  54. %_emacsenPackageInstall %{origname}
  55. %preun
  56. if [ "$1" = 0 ]; then
  57. %_emacsenPackageRemove %{origname}
  58. %_removeemacsenlist %{origname}
  59. fi
  60. %clean
  61. [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT}
  62. rm -rf ${RPM_BUILD_DIR}/%{origname}-%{origver}
  63. %files
  64. %defattr(-,root,root)
  65. %doc fdl.texi ChangeLog
  66. %{_infodir}/php-mode.info*
  67. %{_datadir}/emacs/site-lisp/%{origname}/
  68. #%{_libdir}/emacsen-common/packages/install/%{origname}
  69. #%{_libdir}/emacsen-common/packages/remove/%{origname}
  70. %{emacsen_pkgdir}/install/%{origname}
  71. %{emacsen_pkgdir}/remove/%{origname}
  72. %changelog
  73. * Mon Oct 18 2010 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.5.0-2
  74. - used: Requires(post) instead of Prereq
  75. * Mon Dec 21 2009 IWAI, Masaharu <iwai@alib.jp> 1.5.0-1
  76. - new upstream release
  77. - apply vine-default
  78. - add vine-default-php-mode.el (Source3)
  79. - add php-mode-init.el (Source4)
  80. - update php-mode-{install,remove}.sh
  81. - add documents
  82. * Thu Oct 09 2008 Shu KONNO <owa@bg.wakwak.com> 1.2.0-1vl5
  83. - applied new versioning policy, spec in utf-8
  84. - added macro %%emacsen_pkgdir
  85. * Tue Sep 12 2006 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.2.0-0vl1
  86. - new upstream release
  87. - changed ruby-mode Group to Appliations/Editors/Emacs <BTS:VineLinux:163>
  88. * Mon Jul 22 2002 IWAI Masaharu <iwai@alib.jp> 1.0.2-0vl1
  89. - first build for Vine Linux