#!/bin/sh ## script for auto-build RPM ## checked in RedHatLinux7.3 ## Time-stamp: ## Itou Hiroki RPMDIR="$HOME/rpmdir" #DBG='echo' DBG= ## ## get SourceCodes and Patches from net ## SOURCEURL=' ftp://ftp.sra.co.jp/pub/misc/freepwing/freepwing-1.4.3.tar.gz http://openlab.jp/edict/epwutil/epwutil-1.1.tar.gz ftp://ftp.sra.co.jp/pub/misc/eb/eb-3.3.4.tar.gz http://openlab.jp/edict/eblook/dist/eblook-1.5.1.tar.gz http://openlab.jp/edict/lookup/lookup-1.4devel-021115.tar.gz http://openlab.ring.gr.jp/Jcode/Jcode-0.83.tar.gz ' getsource() { FILE=`echo $1 | sed -e 's@^.*/@@'` if [ ! -s $FILE ] ; then $DBG wget --timeout=20 --tries=2 $1 fi } $DBG mkdir -p $RPMDIR/{RPMS,SRPMS,BUILD,SOURCES,SPECS} $DBG cd $RPMDIR/SOURCES for F in $SOURCEURL; do getsource $F; done $DBG cd $RPMDIR/SRPMS getsource 'http://ftp.freshrpms.net/pub/freshrpms/redhat/9/cabextract/cabextract-0.6-fr2.src.rpm' ## ## prepare to make rpm ## SPECS=" Summary: FreePWING - Free JIS X 4081 Formatter Name: freepwing Version: 1.4.3 Release: 1ih URL: http://www.sra.co.jp/people/m-kasahr/freepwing/ Source0: ftp://ftp.sra.co.jp/pub/misc/freepwing/%{name}-%{version}.tar.gz License: GPL Group: Applications/Publishing BuildRoot: %{_tmppath}/%{name}-root Requires: perl >= 5.005 %description FreePWING is a software that generates book data formatted in JIS X 4081. JIS X 4081 is a subset of EPWING V1, so EPWING searching softwares can search book data generated with FreePWING. EPWING is a uniform format for electronic publiching. The format is made by Japanese various campanies concerned about publishing, printing, electronics, and software. %prep %setup -q %build ./configure --prefix=/usr make %install rm -rf %{buildroot} make install DESTDIR=%{buildroot} # consider perl version find %{buildroot} -type f | sed -e 's@%{buildroot}@@' > filelist.txt %clean rm -rf %{buildroot} %files -f filelist.txt %defattr(-,root,root) %doc AUTHORS README COPYING NEWS %changelog * Sun Nov 9 2003 Itou Hiroki - Initial build with RedHatLinux7.3 ? Summary: EPWUTIL - utility for electronic book and EPWING Name: epwutil Version: 1.1 Release: 1ih URL: http://openlab.jp/edict/epwutil/ Source0: %{name}-%{version}.tar.gz License: Public Domain Group: Applications/Publishing BuildRoot: %{_tmppath}/%{name}-root %description EPWUTIL is a collection of utilities which modify EPWING/ElectronicBook dictonary files for availability, that were copied from CD-ROM to HardDisk. EPWING is a uniform format for electronic publiching. The format is made by Japanese various campanies concerned about publishing, printing, electronics, and software. %prep %setup -q %build make -f makefile.unx CFLAGS='-DUNIX -DEUC -O2' strip bookinfo catdump squeeze %install rm -rf %{buildroot} mkdir -p %{buildroot}/usr/bin cp bookinfo catdump squeeze %{buildroot}/usr/bin/ %clean rm -rf %{buildroot} %files %defattr(-,root,root) /usr/bin/bookinfo /usr/bin/catdump /usr/bin/squeeze %doc bookinfo.man catdump.man squeeze.man README %changelog * Sun Nov 9 2003 Itou Hiroki - Initial build with RedHatLinux7.3 ? Summary: EB Library - C Library for accessing CD-ROM books Name: eb Version: 3.3.4 Release: 3ih License: GPL Group: Development/Libraries URL: http://www.sra.co.jp/people/m-kasahr/eb/ Source0: ftp://ftp.sra.co.jp/pub/misc/eb/%{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-buildroot %description EB Library is a C library for accessing CD-ROM books. It can be built on UNIX derived systems. EB Library supports to access CD-ROM books of EB, EBG, EBXA, EBXA-C, S-EBXA and EPWING formats. CD-ROM books of those formats are popular in Japan. Since CD-ROM books themseves are stands on the ISO 9660 format, you can mount the discs by the same way as other ISO 9660 discs. EB Library also provides some utility commands. %prep %setup -q %build ./configure --prefix=/usr --infodir=/usr/share/info make make check %install rm -rf %{buildroot} make install DESTDIR=%{buildroot} %clean rm -rf %{buildroot} %files %defattr(-,root,root,-) /usr/lib/libeb.so.6.1.4 /usr/lib/libeb.so.6 /usr/lib/libeb.so /usr/lib/libeb.la /usr/lib/libeb.a /usr/include/eb /usr/bin/ebappendix /usr/bin/ebfont /usr/bin/ebinfo /usr/bin/ebrefile /usr/bin/ebzip /usr/bin/ebunzip /usr/bin/ebzipinfo /usr/share/aclocal/eb3.m4 /usr/share/eb/appendix %doc /usr/share/info/ebfont.info* %doc /usr/share/info/ebinfo.info* %doc /usr/share/info/ebrefile.info* %doc /usr/share/info/ebzip.info* %doc /usr/share/info/eb-ja.info* %doc /usr/share/info/ebfont-ja.info* %doc /usr/share/info/ebinfo-ja.info* %doc /usr/share/info/ebrefile-ja.info* %doc /usr/share/info/ebzip-ja.info* %config /usr/etc/eb.conf %doc AUTHORS COPYING NEWS README README-ja %changelog * Sun Nov 9 2003 Itou Hiroki - bugfix * Sat Aug 2 2003 Itou Hiroki - change info-directory * Thu Jul 24 2003 Itou Hiroki - Initial build. ? Summary: interactive searching tool for electric dictionary with EB Library Name: eblook Version: 1.5.1 Release: 3ih License: GPL Group: Applications/Text URL: http://openlab.jp/edict/eblook/ Source0: %{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-buildroot BuildRequires: eb >= 3.0 %description ebbook is an interactive searching tool for electronic dictionary with EB Library. You can search EPWING-compatible dictionary with easy setting. %prep %setup -q %build ./configure --with-eb-conf=/usr/etc/eb.conf --prefix=/usr --infodir=/usr/share/info make %install rm -rf %{buildroot} make install DESTDIR=%{buildroot} %clean rm -rf %{buildroot} %files %defattr(-,root,root,-) /usr/bin/eblook %doc /usr/share/info/eblook.info* %doc AUTHORS COPYING NEWS README %changelog * Sat Aug 2 2003 Itou Hiroki - change info-directory * Thu Jul 24 2003 Itou Hiroki - Initial build. ? Summary: Lookup - a dictionary search interface with Emacs editor Name: lookup Version: 1.4devel_021115 Release: 3ih License: GPL Group: Applications/Text URL: http://openlab.jp/edict/lookup/ Source0: %{name}-1.4devel-021115.tar.gz BuildRoot: %{_tmppath}/%{name}-buildroot Requires: eblook, emacs %description Lookup is a dictionary search interface with Emacs editor. %prep %setup -q -n lookup-1 %build ./autogen.sh --prefix=/usr --with-emacs=emacs --with-lispdir=/usr/share/emacs/site-lisp/lookup --infodir=/usr/share/info make %install rm -rf %{buildroot} make install DESTDIR=%{buildroot} %clean rm -rf %{buildroot} %files %defattr(-,root,root,-) /usr/share/emacs/site-lisp/lookup %doc /usr/share/info/lookup.info* %doc /usr/share/info/lookup-guide.info* %changelog * Sun Nov 9 2003 Itou Hiroki - change version,revision * Sat Aug 2 2003 Itou Hiroki - change info-directory * Thu Jul 24 2003 Itou Hiroki - Initial build. ? Summary: A Perl module that handles various Japanese charsets. Name: Jcode Version: 0.83 Release: 1ih URL: http://openlab.jp/Jcode/index.html Source0: %{name}-%{version}.tar.gz License: Perl License Group: Applications/Text BuildRoot: %{_tmppath}/%{name}-root %description Jcode.pm is a Perl module that handles various Japanese charsets. It has all features available on jcode.pl-2.10 PLUS * Object-oriented approach on Japanese text handling * mime header handling * Unicode feature (UCS2 and UTF8) %prep %setup -q %build perl Makefile.PL PREFIX=%{buildroot}/usr make make test %install rm -rf %{buildroot} #avoid error perl -pi -e 's@\\\$\(INSTALLSITEARCHLIB\)@\\\$\(INSTALLSITELIB\)@g' Makefile make install # consider perl version find %{buildroot} -type f | sed -e 's@%{buildroot}@@' | sed -e 's/^.*perllocal\.pod.*$//' | sed -e 's@^.*man/man.*\$@&\*@' > filelist.txt %clean rm -rf %{buildroot} %files -f filelist.txt %defattr(-,root,root) %doc README %changelog * Sun Nov 9 2003 Itou Hiroki - Initial build with RedHatLinux7.3 " SPECNAMES='' writespec() { SPEC=`echo $1 | sed -e 's/^ //'` NAME=`echo $1 | grep -i "^ *Name" | sed -e 's/^ *Name: *//'` SPECNAMES="$SPECNAMES:$NAME" $DBG echo $SPEC > $RPMDIR/SPECS/$NAME.spec } if [ -s $RPMDIR/../.rpmmacros ]; then $DBG cp -p $RPMDIR/../.rpmmacros $RPMDIR/../.rpmmacros-`date +%Y-%m%M-%T` fi $DBG echo %_topdir $RPMDIR > $RPMDIR/../.rpmmacros IFS='?' for S in $SPECS; do writespec $S; done ## ## make rpm ## ERRORCOMPILE='' ERRORINSTALL='' IFS=':' for N in $SPECNAMES; do if [ "$N" = "" ]; then continue fi $DBG rpmbuild -ba $RPMDIR/SPECS/$N.spec if [ $? -ne 0 ]; then ERRORCOMPILE="$ERRORCOMPILE $N" continue fi $DBG sudo rpm -Uvh $RPMDIR/RPMS/i386/$N-*rpm if [ $? -ne 0 ]; then ERRORINSTALL="$ERRORINSTALL $N" fi done $DBG rpmbuild --rebuild $RPMDIR/SRPMS/cabextract-*.src.rpm if [ $? -ne 0 ]; then ERRORCOMPILE="$ERRORCOMPILE cabextract" else $DBG sudo rpm -Uvh $RPMDIR/RPMS/i386/cabextract-*rpm if [ $? -ne 0 ]; then ERRORINSTALL="$ERRORINSTALL cabextract" fi fi ## ## error report ## echo echo コンパイル中にエラーが出たパッケージ: $ERRORCOMPILE echo インストール中にエラーが出たパッケージ: $ERRORINSTALL echo そのほかのパッケージは正常にインストールされました。