php-mode-vl.spec 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  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 1%{?_dist_release}
  7. Summary: PHP-mode for Emacsen
  8. Name: %{origname}
  9. Version: %{origver}
  10. Release: %{release}
  11. URL: http://sourceforge.net/projects/php-mode/
  12. Source0: http://prdownloads.sourceforge.net/php-mode/php-mode-%{version}.tar.gz
  13. Source1: %{origname}-install.sh
  14. Source2: %{origname}-remove.sh
  15. Source3: vine-default-php-mode.el
  16. Source4: php-mode-init.el
  17. License: GPL
  18. Group: Applications/Editors/Emacs
  19. Buildroot: %{_tmppath}/%{name}-%{version}-root
  20. BuildArchitectures: noarch
  21. PreReq: 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 Dec 21 2009 IWAI, Masaharu <iwai@alib.jp> 1.5.0-1
  74. - new upstream release
  75. - apply vine-default
  76. - add vine-default-php-mode.el (Source3)
  77. - add php-mode-init.el (Source4)
  78. - update php-mode-{install,remove}.sh
  79. - add documents
  80. * Thu Oct 09 2008 Shu KONNO <owa@bg.wakwak.com> 1.2.0-1vl5
  81. - applied new versioning policy, spec in utf-8
  82. - added macro %%emacsen_pkgdir
  83. * Tue Sep 12 2006 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.2.0-0vl1
  84. - new upstream release
  85. - changed ruby-mode Group to Appliations/Editors/Emacs <BTS:VineLinux:163>
  86. * Mon Jul 22 2002 IWAI Masaharu <iwai@alib.jp> 1.0.2-0vl1
  87. - first build for Vine Linux