[521] | 1 | %define _noVersionedDependencies 1 |
---|
| 2 | %define prereq_ge() %(LC_ALL="C" rpm -q --queryformat 'PreReq:%%{NAME} >= %%{VERSION}' %1| grep -v "is not") |
---|
| 3 | |
---|
| 4 | %define name suikyo |
---|
| 5 | %define version 2.1.0 |
---|
| 6 | %define release 1%{?_dist_release} |
---|
| 7 | |
---|
| 8 | Summary: A Romaji-Kana conversion Library |
---|
| 9 | Summary(ja): ローマ字・かな変換ライブラリ |
---|
| 10 | Name: %{name} |
---|
| 11 | Version: %{version} |
---|
| 12 | Release: %{release} |
---|
| 13 | Group: Development/Libraries |
---|
| 14 | License: GPL |
---|
| 15 | URL: http://taiyaki.org/suikyo/ |
---|
| 16 | Source0: %{name}-%{version}.tar.bz2 |
---|
| 17 | BuildRoot: %{_tmppath}/%{name}-%{version}-root |
---|
| 18 | Requires: ruby |
---|
| 19 | BuildRequires: ruby-devel |
---|
| 20 | |
---|
| 21 | ### for GNU Emacs on Vine Linux |
---|
| 22 | Source100: %{name}-install.sh |
---|
| 23 | Source101: %{name}-remove.sh |
---|
| 24 | ##Source102: %{name}-init.el |
---|
| 25 | |
---|
| 26 | %description |
---|
| 27 | Suikyo is Romaji-Kana conversion Library. |
---|
| 28 | |
---|
| 29 | %description -l ja |
---|
| 30 | 水鏡はローマ字・かな変換ライブラリです. |
---|
| 31 | |
---|
| 32 | %package el |
---|
| 33 | Summary: elisp binding of Suikyo |
---|
| 34 | Summary(ja): 水鏡の elisp バイディング |
---|
| 35 | Group: Applications/Editors/Emacs |
---|
| 36 | PreReq: emacsen |
---|
| 37 | Requires: %{name} = %{version}-%{release} |
---|
| 38 | %prereq_ge emacsen-common |
---|
| 39 | BuildRequires: emacsen-common |
---|
| 40 | BuildArch: noarch |
---|
| 41 | |
---|
| 42 | %description el |
---|
| 43 | Suikyo is Romaji-Kana conversion Library. |
---|
| 44 | |
---|
| 45 | This package contains elisp binding of Suikyo. |
---|
| 46 | |
---|
| 47 | %description -l ja el |
---|
| 48 | 水鏡はローマ字・かな変換ライブラリです. |
---|
| 49 | |
---|
| 50 | このパッケージは水鏡の elisp バイディングを含んでいます. |
---|
| 51 | |
---|
| 52 | %prep |
---|
| 53 | %setup -q |
---|
| 54 | |
---|
| 55 | %build |
---|
| 56 | [[ ! -x configure ]] && ./autogen.sh |
---|
| 57 | |
---|
| 58 | %configure --with-rubydir=%{rlibdir} |
---|
| 59 | %{__make} |
---|
| 60 | |
---|
| 61 | |
---|
| 62 | %check |
---|
| 63 | %{__make} check |
---|
| 64 | |
---|
| 65 | |
---|
| 66 | %install |
---|
| 67 | rm -rf $RPM_BUILD_ROOT |
---|
| 68 | %{__make} install DESTDIR=${RPM_BUILD_ROOT} sitelibdir=%{rlibdir} |
---|
| 69 | rm -rf $RPM_BUILD_ROOT%{_datadir}/doc |
---|
| 70 | |
---|
| 71 | ### for GNU Emacs |
---|
| 72 | mkdir -p ${RPM_BUILD_ROOT}%{_datadir}/emacs/site-lisp/%{name} |
---|
| 73 | mkdir -p ${RPM_BUILD_ROOT}%{_libdir}/emacsen-common/packages/install |
---|
| 74 | mkdir -p ${RPM_BUILD_ROOT}%{_libdir}/emacsen-common/packages/remove |
---|
| 75 | mkdir -p ${RPM_BUILD_ROOT}%{_infodir} |
---|
| 76 | |
---|
| 77 | |
---|
| 78 | # |
---|
| 79 | # install el files |
---|
| 80 | # |
---|
| 81 | |
---|
| 82 | ##%{__install} -m 644 %{SOURCE102} \ |
---|
| 83 | ## ${RPM_BUILD_ROOT}/%{_datadir}/emacs/site-lisp/%{name}/ |
---|
| 84 | %{__cat} > \ |
---|
| 85 | ${RPM_BUILD_ROOT}/%{_datadir}/emacs/site-lisp/%{name}/%{name}-init.el <<EOF |
---|
| 86 | ;; |
---|
| 87 | ;; suikyo-init.el |
---|
| 88 | ;; |
---|
| 89 | ;; for Vine Linux with emacsen-common |
---|
| 90 | ;; Munehiro Yamamoto <munepi@cg8.so-net.ne.jp> |
---|
| 91 | |
---|
| 92 | (defconst suikyo-version '("2.1.0" "2005-03-29")) |
---|
| 93 | |
---|
| 94 | (provide 'init-suikyo) |
---|
| 95 | |
---|
| 96 | ;; end of file |
---|
| 97 | EOF |
---|
| 98 | ##%{__cat} ${RPM_BUILD_ROOT}/%{_datadir}/emacs/site-lisp/init-suikyo.el >> \ |
---|
| 99 | ## ${RPM_BUILD_ROOT}/%{_datadir}/emacs/site-lisp/%{name}/%{name}-init.el |
---|
| 100 | %{__rm} -f ${RPM_BUILD_ROOT}/%{_datadir}/emacs/site-lisp/init-suikyo.el |
---|
| 101 | ##%{__cat} >> \ |
---|
| 102 | ## ${RPM_BUILD_ROOT}/%{_datadir}/emacs/site-lisp/%{name}/%{name}-init.el <<EOF |
---|
| 103 | ## |
---|
| 104 | ##;; end of file |
---|
| 105 | ##EOF |
---|
| 106 | |
---|
| 107 | # |
---|
| 108 | # install script (bytecompile el and install elc, remove) |
---|
| 109 | # |
---|
| 110 | |
---|
| 111 | %_installemacsenscript %{name} %{SOURCE100} |
---|
| 112 | |
---|
| 113 | %_removeemacsenscript %{name} %{SOURCE101} |
---|
| 114 | |
---|
| 115 | |
---|
| 116 | %clean |
---|
| 117 | [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} |
---|
| 118 | |
---|
| 119 | |
---|
| 120 | %post -n %{name}-el |
---|
| 121 | # |
---|
| 122 | # bytecompile and install |
---|
| 123 | # |
---|
| 124 | |
---|
| 125 | if [ "$1" = 2 ] ; then |
---|
| 126 | |
---|
| 127 | %_emacsenPackageRemove %{name} |
---|
| 128 | |
---|
| 129 | fi |
---|
| 130 | |
---|
| 131 | %_addemacsenlist %{name} |
---|
| 132 | |
---|
| 133 | %_emacsenPackageInstall %{name} |
---|
| 134 | |
---|
| 135 | %preun -n %{name}-el |
---|
| 136 | |
---|
| 137 | if [ "$1" = 0 ]; then |
---|
| 138 | |
---|
| 139 | %_emacsenPackageRemove %{name} |
---|
| 140 | |
---|
| 141 | %_removeemacsenlist %{name} |
---|
| 142 | |
---|
| 143 | fi |
---|
| 144 | |
---|
| 145 | |
---|
| 146 | %files |
---|
| 147 | %defattr(-,root,root) |
---|
| 148 | %doc AUTHORS COPYING ChangeLog README |
---|
| 149 | %{rlibdir}/* |
---|
| 150 | %{_libdir}/pkgconfig/* |
---|
| 151 | %{_datadir}/%{name} |
---|
| 152 | |
---|
| 153 | %files -n %{name}-el |
---|
| 154 | %defattr(-,root,root) |
---|
| 155 | %doc AUTHORS COPYING ChangeLog README |
---|
| 156 | %{_datadir}/emacs/site-lisp/%{name}/ |
---|
| 157 | %{_libdir}/emacsen-common/packages/install/%{name} |
---|
| 158 | %{_libdir}/emacsen-common/packages/remove/%{name} |
---|
| 159 | |
---|
| 160 | |
---|
| 161 | %changelog |
---|
| 162 | * Sat Nov 01 2008 Munehiro Yamamoto <munepi@cg8.so-net.ne.jp> 2.1.0-1 |
---|
| 163 | - initial build for VineSeed |
---|
| 164 | |
---|
| 165 | * Mon Mar 24 2008 Munehiro Yamamoto <munepi@cg8.so-net.ne.jp> 2.1.0-1vl5 |
---|
| 166 | - initial build for VineSeed |
---|
| 167 | |
---|
| 168 | ### end of file |
---|