%define lisp_files ada cc-mode ecrypto emerge fsf-compat igrep mh-e pcl-cvs sasl sounds-au time view-process zenirc clearcase edebug eshell games ilisp mine pcomplete scheme sounds-wav viper auctex cookie ediff gnats ispell misc-games prog-modes semantic speedbar tooltalk vm crisp edit-utils eterm gnus jde mmm-mode ps-print sgml strokes tpu w3 build debug edt eudc haskell-mode net-utils psgml sh-script supercite tramp xemacs-base c-support dictionary efs footnote hm--html-menus mail-lib ocaml psgml-dtds sieve texinfo vc xemacs-devel calc dired eieio forms ibuffer mailcrypt os-utils reftex slider text-modes vc-cc xslide calendar docbookide elib frame-icon idlwave pc rmail sml-mode textools vhdl xslt-process pgg perl-modes python-modes ruby-modes riece ecb hyperbole oo-browser x-symbol Sun xwem xlib xetla re-builder fortran-modes escreen erc general-docs



Name: xemacs-sumo
Version: 20070427
Release: 1%{?_dist_release}
License: GPL
Group: Applications/Editors/Emacs
Vendor: Project Vine
Distribution: Vine Linux
Packager: MATSUBAYASHI 'Shaolin' Kohji <shaolin@vinelinux.org>
Source0: ftp://ftp.xemacs.org/pub/xemacs/packages/xemacs-sumo-2007-04-27.tar.bz2
Source1: ftp://ftp.xemacs.org/pub/xemacs/packages/xemacs-mule-sumo-2007-04-27.tar.bz2
Source6: man.el
Source7: man.elc
Source8: time-stamp.el
Source9: time-stamp.elc
Source100: Emacs
Source101: Emacs.ja_JP.UTF-8
Patch0: xemacs-bbdb-perl.patch
Patch100: xemacs-sumo-20030831-hyperbole-file-newer.diff
URL: http://www.xemacs.org/
BuildRoot: %{_tmppath}/%{name}-%{version}-root
BuildArch: noarch
Summary: XEmacs "SUMO" packages (including mule-sumo)
Summary(ja): XEmacs 用パッケージ集 "SUMO" (含 mule-sumo)
Obsoletes: xemacs-sumo-mule


%description 
This contains various "SUMO" packages for XEmacs >= 21.
The components of this package are:

  xemacs-sumo      (2007-04-27 release - minus apel, tm, mew , eicq, bbdb and liece)
  xemacs-mule-sumo (2007-04-27 release - minus mule-ucs, skk, lookup)

%description -l ja 
XEmacs >= 21 用の "SUMO" パッケージ集です．
各種の有用なEmacs Lispで書かれたツールが入っています．
このリリースでは，以下のものをパッケージングしてあります：

  xemacs-sumo      (2007-04-27 版 - apel, mew, tm, eicq, liece, bbdb を除く)
  xemacs-mule-sumo (2007-04-27 版 - mule-ucs, skk, lookup を除く)

%package el
Group: Applications/Editors/Emacs
Summary: Emacs Lisp source files of sumo and mule-sumo
Summary(ja): XEmacs 用 sumo, mule-sumo の eisp ソースファイル
Requires: %{name} = %{version}-%{release}
Obsoletes: xemacs-sumo-mule-el


%description el
This contains the source files of sumo and mule-sumo packages
for XEmacs >= 21. This package is not necessary to run XEmacs.

%description -l ja el
XEmacs >= 21 用の "SUMO" (含 mule-sumo)パッケージの
Emacs Lisp ソースファイルが収められています．
XEmacs を動作させるのに必須ではありません．


%prep
[ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT}


%setup -T -c %{name}-%{version}

%build


%install

mkdir -p ${RPM_BUILD_ROOT}/usr/lib/xemacs

tar -zxf %{SOURCE0} -C ${RPM_BUILD_ROOT}/usr/lib/xemacs/
tar -zxf %{SOURCE1} -C ${RPM_BUILD_ROOT}/usr/lib/xemacs/

# Add ja Menu
mv ${RPM_BUILD_ROOT}/usr/lib/xemacs/mule-packages/etc/app-defaults/ja/Emacs \
 ${RPM_BUILD_ROOT}/usr/lib/xemacs/mule-packages/etc/app-defaults/ja/Emacs.orig
cp %{SOURCE100}  ${RPM_BUILD_ROOT}/usr/lib/xemacs/mule-packages/etc/app-defaults/ja
mkdir -p ${RPM_BUILD_ROOT}/usr/lib/xemacs/mule-packages/etc/app-defaults/ja_JP.UTF-8
cp %{SOURCE101}  ${RPM_BUILD_ROOT}/usr/lib/xemacs/mule-packages/etc/app-defaults/ja_JP.UTF-8/Emacs


## remove apel (apel is provided with apel-el)
#
rm -rf ${RPM_BUILD_ROOT}/usr/lib/xemacs/xemacs-packages/lisp/apel
rm -rf ${RPM_BUILD_ROOT}/usr/lib/xemacs/xemacs-packages/pkginfo/MANIFEST.apel

## remove tm (tm conflicts with apel/flim/semi)
#
rm -rf ${RPM_BUILD_ROOT}/usr/lib/xemacs/xemacs-packages/info/tm*
rm -rf ${RPM_BUILD_ROOT}/usr/lib/xemacs/xemacs-packages/lib-src/{tm-*,tmdecode,pstogif}
rm -rf ${RPM_BUILD_ROOT}/usr/lib/xemacs/xemacs-packages/lisp/tm
rm -rf ${RPM_BUILD_ROOT}/usr/lib/xemacs/xemacs-packages/man/tm
rm -rf ${RPM_BUILD_ROOT}/usr/lib/xemacs/xemacs-packages/pkginfo/MANIFEST.tm

## remove mew (mew is provided with mew-el)
#
rm -rf ${RPM_BUILD_ROOT}/usr/lib/xemacs/xemacs-packages/etc/mew
rm -rf ${RPM_BUILD_ROOT}/usr/lib/xemacs/xemacs-packages/info/mew*info*
rm -rf ${RPM_BUILD_ROOT}/usr/lib/xemacs/xemacs-packages/lisp/mew
rm -rf ${RPM_BUILD_ROOT}/usr/lib/xemacs/xemacs-packages/man/mew
rm -rf ${RPM_BUILD_ROOT}/usr/lib/xemacs/xemacs-packages/pkginfo/MANIFEST.mew

## remove eicq (it break arch-independencies, and less-used)
#
rm -rf ${RPM_BUILD_ROOT}/usr/lib/xemacs/xemacs-packages/etc/eicq
rm -rf ${RPM_BUILD_ROOT}/usr/lib/xemacs/xemacs-packages/info/eicq*info*
rm -rf ${RPM_BUILD_ROOT}/usr/lib/xemacs/xemacs-packages/lib-src/eicq*.sh
rm -rf ${RPM_BUILD_ROOT}/usr/lib/xemacs/xemacs-packages/lib-src/udp2tcp
rm -rf ${RPM_BUILD_ROOT}/usr/lib/xemacs/xemacs-packages/lisp/eicq
rm -rf ${RPM_BUILD_ROOT}/usr/lib/xemacs/xemacs-packages/man/eicq
rm -rf ${RPM_BUILD_ROOT}/usr/lib/xemacs/xemacs-packages/pkginfo/MANIFEST.eicq

## remove liece (liece is provided with liece)
#
rm -rf ${RPM_BUILD_ROOT}/usr/lib/xemacs/xemacs-packages/etc/liece
rm -rf ${RPM_BUILD_ROOT}/usr/lib/xemacs/xemacs-packages/info/liece*info*
rm -rf ${RPM_BUILD_ROOT}/usr/lib/xemacs/xemacs-packages/lisp/liece
rm -rf ${RPM_BUILD_ROOT}/usr/lib/xemacs/xemacs-packages/man/liece
rm -rf ${RPM_BUILD_ROOT}/usr/lib/xemacs/xemacs-packages/pkginfo/MANIFEST.liece

## remove bbdb (bbdb is provided with bbdb)
# (復活させる場合はしたの方にある %PATCH0 を復活させること)
rm -rf ${RPM_BUILD_ROOT}/usr/lib/xemacs/xemacs-packages/etc/bbdb
rm -rf ${RPM_BUILD_ROOT}/usr/lib/xemacs/xemacs-packages/info/bbdb*info*
rm -rf ${RPM_BUILD_ROOT}/usr/lib/xemacs/xemacs-packages/lisp/bbdb*
rm -rf ${RPM_BUILD_ROOT}/usr/lib/xemacs/xemacs-packages/man/bbdb
rm -rf ${RPM_BUILD_ROOT}/usr/lib/xemacs/xemacs-packages/pkginfo/MANIFEST.bbdb


## remove mule-ucs (mule-ucs is provided with Mule-UCS)
#
rm -rf ${RPM_BUILD_ROOT}/usr/lib/xemacs/mule-packages/etc/mule-ucs
rm -rf ${RPM_BUILD_ROOT}/usr/lib/xemacs/mule-packages/info/mule-ucs*info*
rm -rf ${RPM_BUILD_ROOT}/usr/lib/xemacs/mule-packages/lisp/mule-ucs
rm -rf ${RPM_BUILD_ROOT}/usr/lib/xemacs/mule-packages/man/mule-ucs
rm -rf ${RPM_BUILD_ROOT}/usr/lib/xemacs/mule-packages/pkginfo/MANIFEST.mule-ucs

# remove skk
rm -rf ${RPM_BUILD_ROOT}/usr/lib/xemacs/mule-packages/lisp/skk
rm -rf ${RPM_BUILD_ROOT}/usr/lib/xemacs/mule-packages/info/skk.*
rm -rf ${RPM_BUILD_ROOT}/usr/lib/xemacs/mule-packages/man/skk
rm -rf ${RPM_BUILD_ROOT}/usr/lib/xemacs/mule-packages/etc/skk
rm -rf ${RPM_BUILD_ROOT}/usr/lib/xemacs/mule-packages/pkginfo/MANIFEST.skk

# remove lookup
rm -rf ${RPM_BUILD_ROOT}/usr/lib/xemacs/mule-packages/lisp/lookup
rm -rf ${RPM_BUILD_ROOT}/usr/lib/xemacs/mule-packages/info/lookup*.*
rm -rf ${RPM_BUILD_ROOT}/usr/lib/xemacs/mule-packages/man/lookup
rm -rf ${RPM_BUILD_ROOT}/usr/lib/xemacs/mule-packages/etc/lookup
rm -rf ${RPM_BUILD_ROOT}/usr/lib/xemacs/mule-packages/pkginfo/MANIFEST.lookup


## replace man.{el,elc} with patched verions
#
#install -m 644 %{SOURCE6} %{SOURCE7} \
#   ${RPM_BUILD_ROOT}/usr/lib/xemacs/xemacs-packages/lisp/edit-utils/.


## replace time-stamp.{el,elc} with modified verions
#
install -m 644 %{SOURCE8} %{SOURCE9} \
   ${RPM_BUILD_ROOT}/usr/lib/xemacs/xemacs-packages/lisp/xemacs-base/.


## gzip all el files
#
#gzip -9 `find ${RPM_BUILD_ROOT}/usr/lib/xemacs/xemacs-packages/ -name \*.el`

gzip -9 `find ${RPM_BUILD_ROOT}/usr/lib/xemacs/xemacs-packages/etc/$f -name \*.el`
for f in %{lisp_files}; do
	gzip -9 `find ${RPM_BUILD_ROOT}/usr/lib/xemacs/xemacs-packages/lisp/$f -name \*.el`
done


#gzip -9 `find ${RPM_BUILD_ROOT}/usr/lib/xemacs/mule-packages/ -name \*.el`
gzip -9 `find ${RPM_BUILD_ROOT}/usr/lib/xemacs/mule-packages/etc/ -name \*.el`
gzip -9 `find ${RPM_BUILD_ROOT}/usr/lib/xemacs/mule-packages/lisp/ -name \*.el`


ln -s ja ${RPM_BUILD_ROOT}/usr/lib/xemacs/mule-packages/etc/app-defaults/ja_JP.ujis
ln -s ja ${RPM_BUILD_ROOT}/usr/lib/xemacs/mule-packages/etc/app-defaults/ja_JP.eucJP


##
##  inflate some el.gz 
##  some packages need el file to configuration.
##

gzip -d ${RPM_BUILD_ROOT}/usr/lib/xemacs/xemacs-packages/lisp/auctex/tex-site.el.gz


DIR="${RPM_BUILD_ROOT}/usr/lib/xemacs/xemacs-packages"
INFO="*.info*"
EL="*.el.gz"

find $DIR -type d |
  sed -e "s#^${RPM_BUILD_ROOT}#%attr(-, root, root) %dir #g" > sumo-files

find $DIR -type l |
  sed -e "s#^${RPM_BUILD_ROOT}#%attr(-, root, root) %dir #g" >> sumo-files

find $DIR -name $INFO -type f |
  sed -e "s#^${RPM_BUILD_ROOT}#%attr(-, root, root) #g" >> sumo-files

find $DIR -not -name $INFO -name $EL -type f |
  sed -e "s#^${RPM_BUILD_ROOT}#%attr(-, root, root) #g" > sumo-el-files

find $DIR -not -name $INFO -not -name $EL -type f |
  sed -e "
    s#^${RPM_BUILD_ROOT}\(.*movemail\)#%attr(2755, root, mail) \1#g
    s#^${RPM_BUILD_ROOT}#%attr(-, root, root) #g
  " >> sumo-files

DIR="${RPM_BUILD_ROOT}/usr/lib/xemacs/mule-packages"
INFO="*.info*"
EL="*.el.gz"

find $DIR -type d |
  sed -e "s#^${RPM_BUILD_ROOT}#%attr(-, root, root) %dir #g" >> sumo-files

find $DIR -type l |
  sed -e "s#^${RPM_BUILD_ROOT}#%attr(-, root, root) %dir #g" >> sumo-files

find $DIR -name $INFO -type f |
  sed -e "s#^${RPM_BUILD_ROOT}#%attr(-, root, root) #g" >> sumo-files

find $DIR -not -name $INFO -name $EL -type f |
  sed -e "s#^${RPM_BUILD_ROOT}#%attr(-, root, root) #g" >> sumo-el-files

find $DIR -not -name $INFO -not -name $EL -type f |
  sed -e "
    s#^${RPM_BUILD_ROOT}\(.*movemail\)#%attr(2755, root, mail) \1#g
    s#^${RPM_BUILD_ROOT}#%attr(-, root, root) #g
  " >> sumo-files

#patch -d ${RPM_BUILD_ROOT}/usr/lib/xemacs/xemacs-packages/etc/bbdb < %PATCH0

# Perl Path Modefied(#!/usr/local/bin/perl -> #!/usr/bin/perl) 2003.09.22 H.Irokawa
patch -d ${RPM_BUILD_ROOT}/usr/lib/xemacs/xemacs-packages/lisp/hyperbole < %PATCH100

#mkdir -p ${RPM_BUILD_ROOT}/usr/share/skk
#ln -sf ../../lib/xemacs/mule-packages/etc/skk/SKK-JISYO.L \
#	${RPM_BUILD_ROOT}/usr/share/skk/SKK-JISYO.L


%clean
[ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT}


%files -f sumo-files
%defattr(-,root,root)
#/usr/share/skk/SKK-JISYO.L


%files el -f sumo-el-files
%defattr(-,root,root)


%changelog
* Tue Oct 14 2008 Shu KONNO <owa@bg.wakwak.com> 20070427-1vl5
- applied new versioning policy, spec in utf-8

* Mon May 28 2007 Hiroaki Irokawa <irorin@terra.dti.ne.jp> 20070427-0vl2
- rebuilt(update)
- add SOURCE101(ja_JP.UTF-8/Emacs)

* Mon May 28 2007 Hiroaki Irokawa <irorin@terra.dti.ne.jp> 20070427-0vl1
- update
- add SOURCE101(ja_JP.UTF-8/Emacs)

* Wed Nov 29 2006 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 20060510-0vl3
- rebuilt related to <BTS:393> and <BTS:395>

* Sun Sep 24 2006 Hiroaki Irokawa <irorin@terra.dti.ne.jp> 20060510-0vl2
- fixed typo(Source0,Source1)

* Sun Sep 24 2006 Hiroaki Irokawa <irorin@terra.dti.ne.jp> 20060510-0vl1
- update

* Sun Dec 18 2005 Hiroaki Irokawa <irorin@terra.dti.ne.jp> 20051208-0vl1
- update

* Wed Feb  9 2005 Hiroaki Irokawa <irorin@terra.dti.ne.jp> 20050118-0vl1
- update

* Sun Jul  4 2004 Hiroaki Irokawa <irorin@terra.dti.ne.jp> 20040202-0vl2
- minus lookup

* Fri Feb 13 2004 Hiroaki Irokawa <irorin@terra.dti.ne.jp> 20040202-0vl1
- update

* Sun Nov 23 2003 Hiroaki Irokawa <irorin@terra.dti.ne.jp> 20031113-0vl1
- update

* Tue Oct  7 2003 Hiroaki Irokawa <irorin@terra.dti.ne.jp> 20031003-0vl1
- update

* Mon Sep 22 2003 Hiroaki Irokawa <irorin@terra.dti.ne.jp> 20030831-0vl1
- update
- Add %Patch100(perl script modded in file-newer in hyperbole)

* Wed Jul  2 2003 Hiroaki Irokawa <irorin@terra.dti.ne.jp> 20030629-0vl1
- Tag Changed(Copyright -> License)
- update

* Wed Apr 23 2003 Hiroaki Irokawa <irorin@terra.dti.ne.jp> 20030414-0vl1
- update

* Tue Dec 31 2002 Hiroaki Irokawa <irorin@terra.dti.ne.jp> 20021230-0vl1
- update

* Sun Dec 29 2002 Hiroaki Irokawa <irorin@terra.dti.ne.jp> 20021226-0vl1
- update

* Sat Dec  7 2002 Hiroaki Irokawa <irorin@terra.dti.ne.jp> 20020919-0vl2
- Resource name changed(Emacs -> XEmacs)
- add Japanese menu(liece)

* Mon Oct 28 2002 Hiroaki Irokawa <irorin@terra.dti.ne.jp> 20020919-0vl1
- updated in sync with 2002-09-19 release
- remove skk, bbdb(because [VineSeed:06502])
- add japanese menu(wl, skk)
- Special thanks Yukihiro Nakai<ynakai@redhat.com> (xemacs-users-ja)

* Sun Jul 28 2002 Hiroaki Irokawa <irorin@terra.dti.ne.jp> 20020720-0vl1
- updated in sync with 2002-07-20 release
- remove mule-ucs, liece

* Fri Dec 28 2001 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 20011216-0vl1
- updated in sync with 2001-12-16 release
- remove tm

* Sat Dec 15 2001 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 20010929-0vl1
- updated in sync with 2001-09-29 release

* Thu Dec 06 2001 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 20010709-0vl2
- Requires: xemacs removed for avoiding dependency loop

* Fri Jul 27 2001 MATSUBAYASHI 'Shaolin' Kohji <shaolin@vinelinux.org>
- 20010709-0vl1
- updated in sync with 2001-07-09 release
- now SKK-JISYO.L is removed from /usr/share/skk/

* Mon Feb 12 2001 MATSUBAYASHI 'Shaolin' Kohji <shaolin@rhythmaning.org>
- 20010204-0vl1
- updated in sync with 2001-02-04 release

* Mon Jan 22 2001 MATSUBAYASHI 'Shaolin' Kohji <shaolin@rhythmaning.org>
- 20001023-0vl1
- updated in sync with 2000-10-23 release
- remove eicq package (it breaks arch-independencies)

* Tue Sep 19 2000 MATSUBAYASHI 'Shaolin' Kohji <shaolin@rhythmaning.org>
- 20000904-0vl1
- updated in sync with 2000-09-04 release

* Wed Jun 28 2000 MATSUBAYASHI 'Shaolin' Kohji <shaolin@rhythmaning.org>
- 20000524-0vl1
- updated in sync with 2000-05-24 release

* Thu Dec 16 1999 MATSUBAYASHI 'Shaolin' Kohji <shaolin@rins.st.ryukoku.ac.jp>
- 19991215-1vl1
- updated in sync with 1999-12-15 release

* Thu Dec 16 1999 MATSUBAYASHI 'Shaolin' Kohji <shaolin@rins.st.ryukoku.ac.jp>
- 19990729-8vl1
- in sync with xemacs-21.1.8
- this release now holds mule-base-1.32

* Mon Nov 29 1999 MATSUBAYASHI 'Shaolin' Kohji <shaolin@rins.st.ryukoku.ac.jp>
- 19990729-7vl3
- apel-1.15 removed from this package
  (apel is now provided by wemi-xemacs package)

* Thu Nov 11 1999 MATSUBAYASHI 'Shaolin' Kohji <shaolin@rins.st.ryukoku.ac.jp>
- 19990729-7vl2
- replaced time-stamp.{el,elc} with modified version
  (now time-stamp writes year in 4 digits)

* Wed Sep 29 1999 MATSUBAYASHI 'Shaolin' Kohji <shaolin@rins.st.ryukoku.ac.jp>
- 19990729-7vl1
- xemacs-mule-sumo in the 19990729-7 and before mistakenly was
  1999-07-13 version ... now correctly holds 1999-07-29 verion
- mule-base-1.31 is included with the release (as in the previous release)
  mule-base-1.32 in the xemacs-mule-sumo-1999-07-29 doesn't work
  correctly with xemacs 21.1.6 and before
- included bug fixed version of egg-its-1.20

* Thu Sep 23 1999 MATSUBAYASHI 'Shaolin' Kohji <shaolin@rins.st.ryukoku.ac.jp>
- 19990729-7
- replaced xemacs-packages/lisp/edit-utils/man.{el,elc}
  for patched version (based on the patch at
  http://www.on.rim.or.jp/~ryo2/archives/man.el.xemacs-patch)

* Sun Aug 29 1999 MATSUBAYASHI 'Shaolin' Kohji <shaolin@rins.st.ryukoku.ac.jp>
- 19990729-6
- slight modification for the %prep section

* Thu Aug 26 1999 MATSUBAYASHI 'Shaolin' Kohji <shaolin@rins.st.ryukoku.ac.jp>
- 19990729-5
- specs slightly modified

* Sun Aug  8 1999 Taniguchi Yasuaki <yasuaki@matx.org>
- Apply perl patch

* Wed Aug  4 1999 Taniguchi Yasuaki <yasuaki@matx.org>
- Combine sumo-mule into sumo package

* Fri Jul 23 1999 Taniguchi Yasuaki <cr067197@e.cc.titech.ac.jp>
- 1st release
