[521] | 1 | %define _noVersionedDependencies 1 |
---|
[9515] | 2 | %define prereq_ge() %(LC_ALL="C" rpm -q --queryformat 'Requires(pre):%%{NAME} >= %%{VERSION}' %1| grep -v "is not") |
---|
[521] | 3 | %define emacsen_pkgdir /usr/lib/emacsen-common/packages |
---|
| 4 | %define origname php-mode |
---|
[9515] | 5 | %define origver 1.15.3 |
---|
[521] | 6 | |
---|
[9515] | 7 | Name: %{origname} |
---|
| 8 | Version: %{origver} |
---|
| 9 | Release: 1%{?_dist_release} |
---|
| 10 | Summary: PHP-mode for Emacsen |
---|
| 11 | Summary(ja): Emacs 用 PHP モード |
---|
[2104] | 12 | |
---|
[9515] | 13 | Group: Applications/Editors/Emacs |
---|
| 14 | License: GPLv3 |
---|
| 15 | URL: http://sourceforge.net/projects/php-mode/ |
---|
[2104] | 16 | |
---|
[9515] | 17 | Source0: https://github.com/ejmr/php-mode/archive/v%{version}.tar.gz |
---|
[521] | 18 | Source1: %{origname}-install.sh |
---|
| 19 | Source2: %{origname}-remove.sh |
---|
[734] | 20 | Source3: vine-default-php-mode.el |
---|
| 21 | Source4: php-mode-init.el |
---|
[2104] | 22 | |
---|
[521] | 23 | Buildroot: %{_tmppath}/%{name}-%{version}-root |
---|
[2104] | 24 | BuildArch: noarch |
---|
[9515] | 25 | |
---|
[2104] | 26 | Requires(post): emacsen |
---|
[9515] | 27 | Requires: emacsen |
---|
[521] | 28 | %prereq_ge emacsen-common |
---|
| 29 | |
---|
| 30 | %description |
---|
| 31 | An Emacs major mode for editing PHP code. Features: Syntax coloring |
---|
| 32 | and indenting; Documentation browse and search functions; Support for |
---|
| 33 | Imenu and SpeedBar; Customization options |
---|
| 34 | |
---|
| 35 | %prep |
---|
[734] | 36 | %setup -q |
---|
[521] | 37 | |
---|
[9515] | 38 | %build |
---|
| 39 | #makeinfo php-mode.texi |
---|
| 40 | |
---|
[521] | 41 | %install |
---|
| 42 | [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} |
---|
| 43 | [ "${RPM_BUILD_ROOT}" != "/" ] && mkdir -p ${RPM_BUILD_ROOT} |
---|
| 44 | |
---|
| 45 | mkdir -p $RPM_BUILD_ROOT/%{_datadir}/emacs/site-lisp/%{origname} |
---|
| 46 | mkdir -p $RPM_BUILD_ROOT/%{emacsen_pkgdir}/install |
---|
| 47 | mkdir -p $RPM_BUILD_ROOT/%{emacsen_pkgdir}/remove |
---|
[9515] | 48 | #mkdir -p $RPM_BUILD_ROOT/%{_infodir} |
---|
[521] | 49 | |
---|
[9515] | 50 | #install -m 0644 php-mode.info $RPM_BUILD_ROOT/%{_infodir} |
---|
[734] | 51 | |
---|
[521] | 52 | ### |
---|
| 53 | # install el files |
---|
[734] | 54 | cp -a *.el %{SOURCE3} %{SOURCE4} ${RPM_BUILD_ROOT}%{_datadir}/emacs/site-lisp/%{origname} |
---|
[521] | 55 | |
---|
| 56 | ### |
---|
| 57 | # install script( bytecompile el and install elc , remove ) |
---|
| 58 | %_installemacsenscript %{origname} %{SOURCE1} |
---|
| 59 | |
---|
| 60 | %_removeemacsenscript %{origname} %{SOURCE2} |
---|
| 61 | |
---|
| 62 | %post |
---|
| 63 | ### |
---|
| 64 | # bytecompile and install |
---|
| 65 | if [ "$1" = 2 ]; then |
---|
| 66 | |
---|
| 67 | %_emacsenPackageRemove %{origname} |
---|
| 68 | |
---|
| 69 | fi |
---|
| 70 | |
---|
| 71 | %_addemacsenlist %{origname} |
---|
| 72 | |
---|
| 73 | %_emacsenPackageInstall %{origname} |
---|
| 74 | |
---|
| 75 | %preun |
---|
| 76 | if [ "$1" = 0 ]; then |
---|
| 77 | |
---|
| 78 | %_emacsenPackageRemove %{origname} |
---|
| 79 | |
---|
| 80 | %_removeemacsenlist %{origname} |
---|
| 81 | |
---|
| 82 | fi |
---|
| 83 | |
---|
| 84 | %clean |
---|
| 85 | [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} |
---|
| 86 | rm -rf ${RPM_BUILD_DIR}/%{origname}-%{origver} |
---|
| 87 | |
---|
| 88 | %files |
---|
| 89 | %defattr(-,root,root) |
---|
[9515] | 90 | %doc Changelog.md LICENSE README.md |
---|
| 91 | #{_infodir}/php-mode.info* |
---|
[521] | 92 | %{_datadir}/emacs/site-lisp/%{origname}/ |
---|
| 93 | #%{_libdir}/emacsen-common/packages/install/%{origname} |
---|
| 94 | #%{_libdir}/emacsen-common/packages/remove/%{origname} |
---|
| 95 | %{emacsen_pkgdir}/install/%{origname} |
---|
| 96 | %{emacsen_pkgdir}/remove/%{origname} |
---|
| 97 | |
---|
| 98 | %changelog |
---|
[9515] | 99 | * Fri Apr 17 2015 Ryoichi INAGAKI <ryo1@toki.waseda.jp> 1.15.3-1 |
---|
| 100 | - updated to 1.15.3 |
---|
| 101 | |
---|
[2104] | 102 | * Mon Oct 18 2010 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.5.0-2 |
---|
| 103 | - used: Requires(post) instead of Prereq |
---|
| 104 | |
---|
[734] | 105 | * Mon Dec 21 2009 IWAI, Masaharu <iwai@alib.jp> 1.5.0-1 |
---|
| 106 | - new upstream release |
---|
| 107 | - apply vine-default |
---|
| 108 | - add vine-default-php-mode.el (Source3) |
---|
| 109 | - add php-mode-init.el (Source4) |
---|
| 110 | - update php-mode-{install,remove}.sh |
---|
| 111 | - add documents |
---|
| 112 | |
---|
[521] | 113 | * Thu Oct 09 2008 Shu KONNO <owa@bg.wakwak.com> 1.2.0-1vl5 |
---|
| 114 | - applied new versioning policy, spec in utf-8 |
---|
| 115 | - added macro %%emacsen_pkgdir |
---|
| 116 | |
---|
| 117 | * Tue Sep 12 2006 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.2.0-0vl1 |
---|
| 118 | - new upstream release |
---|
| 119 | - changed ruby-mode Group to Appliations/Editors/Emacs <BTS:VineLinux:163> |
---|
| 120 | |
---|
| 121 | * Mon Jul 22 2002 IWAI Masaharu <iwai@alib.jp> 1.0.2-0vl1 |
---|
| 122 | - first build for Vine Linux |
---|
| 123 | |
---|