選択できるのは25トピックまでです。
トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。
203 行
5.9 KiB
203 行
5.9 KiB
## |
|
## emacs.spec -- OpenPKG RPM Package Specification |
|
## Copyright (c) 2000-2006 OpenPKG Foundation e.V. <http://openpkg.net/> |
|
## Copyright (c) 2000-2006 Ralf S. Engelschall <http://engelschall.com/> |
|
## |
|
## Permission to use, copy, modify, and distribute this software for |
|
## any purpose with or without fee is hereby granted, provided that |
|
## the above copyright notice and this permission notice appear in all |
|
## copies. |
|
## |
|
## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED |
|
## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF |
|
## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
|
## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR |
|
## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
|
## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
|
## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF |
|
## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND |
|
## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
|
## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT |
|
## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
|
## SUCH DAMAGE. |
|
## |
|
|
|
# package version |
|
%define V_emacs 21.4a |
|
%define V_subdir 21.4 |
|
%define V_leim 21.4 |
|
|
|
# package information |
|
Name: emacs |
|
Summary: The GNU EMACS Text Editor |
|
URL: http://www.gnu.org/software/emacs/ |
|
Vendor: Richard Stallmann et al. |
|
Packager: OpenPKG Foundation e.V. |
|
Distribution: OpenPKG Community |
|
Class: BASE |
|
Group: Editor |
|
License: GPL |
|
Version: %{V_emacs} |
|
Release: 20061013 |
|
|
|
# package options |
|
%option with_x11 no |
|
%option with_xaw3d no |
|
%option with_jpeg no |
|
%option with_png no |
|
%option with_tiff no |
|
%option with_gif no |
|
%option with_leim no |
|
|
|
# package option dependencies |
|
%if "%{with_jpeg}" == "yes" || "%{with_png}" == "yes" || "%{with_tiff}" == "yes" || "%{with_gif}" == "yes" |
|
%undefine with_x11 |
|
%define with_x11 yes |
|
%endif |
|
|
|
# list of sources |
|
Source0: ftp://ftp.gnu.org/gnu/emacs/emacs-%{V_emacs}.tar.gz |
|
Source1: ftp://ftp.gnu.org/gnu/emacs/leim-%{V_leim}.tar.gz |
|
Patch0: emacs.patch |
|
|
|
# build information |
|
Prefix: %{l_prefix} |
|
BuildRoot: %{l_buildroot} |
|
BuildPreReq: OpenPKG, openpkg >= 20040130, make, binutils, texinfo |
|
PreReq: OpenPKG, openpkg >= 20040130 |
|
%if "%{with_x11}" == "yes" |
|
BuildPreReq: X11 |
|
PreReq: X11 |
|
%if "%{with_xaw3d}" == "yes" |
|
BuildPreReq: xaw3d |
|
PreReq: xaw3d |
|
%endif |
|
%if "%{with_jpeg}" == "yes" |
|
BuildPreReq: jpeg |
|
PreReq: jpeg |
|
%endif |
|
%if "%{with_png}" == "yes" |
|
BuildPreReq: png, zlib |
|
PreReq: png, zlib |
|
%endif |
|
%if "%{with_tiff}" == "yes" |
|
BuildPreReq: tiff |
|
PreReq: tiff |
|
%endif |
|
%if "%{with_gif}" == "yes" |
|
BuildPreReq: giflib |
|
PreReq: giflib |
|
%endif |
|
%endif |
|
AutoReq: no |
|
AutoReqProv: no |
|
|
|
%description |
|
The popular GNU EMACS text editor. |
|
|
|
%track |
|
prog emacs = { |
|
version = %{V_emacs} |
|
url = ftp://ftp.gnu.org/gnu/emacs/ |
|
regex = emacs-(__VER__)\.tar\.gz |
|
} |
|
prog emacs:leim = { |
|
version = %{V_leim} |
|
url = ftp://ftp.gnu.org/gnu/emacs/ |
|
regex = leim-(__VER__)\.tar\.gz |
|
} |
|
|
|
%prep |
|
%setup -q -n emacs-%{V_subdir} |
|
%if "%{with_leim}" == "yes" |
|
%setup -q -n emacs-%{V_subdir} -T -D -b 1 |
|
%endif |
|
%patch -p0 |
|
case "%{l_platform -p}" in |
|
ix86-fedora4 ) %{l_shtool} subst -e 's;/\* \(#define CANNOT_DUMP\) \*/;\1 1;' src/m/intel386.h ;; |
|
esac |
|
|
|
%build |
|
%if "%{with_xaw3d}" != "yes" |
|
( echo "ac_cv_header_X11_Xaw3d_Scrollbar_h=no" |
|
echo "ac_cv_lib_Xaw3d_XawScrollbarSetThumb=no" |
|
) >config.cache |
|
%endif |
|
%{l_shtool} subst \ |
|
-e 's;/${version}/;/;g' \ |
|
-e 's;/${version};;g' \ |
|
-e 's;/${configuration};;g' \ |
|
configure |
|
%if "%{with_leim}" == "yes" |
|
%{l_shtool} subst \ |
|
-e 's;/${version}/;/;g' \ |
|
leim/Makefile.in |
|
%endif |
|
CC="%{l_cc}" \ |
|
CFLAGS="%{l_cflags -O}" \ |
|
%if "%{with_tiff}" == "yes" |
|
CPPFLAGS="%{l_cppflags tiff .}" \ |
|
%else |
|
CPPFLAGS="%{l_cppflags}" \ |
|
%endif |
|
LDFLAGS="%{l_ldflags}" \ |
|
./configure \ |
|
%if "%{with_xaw3d}" != "yes" |
|
--cache-file=./config.cache \ |
|
%endif |
|
--prefix=%{l_prefix} \ |
|
%if "%{with_x11}" == "yes" |
|
--with-x \ |
|
--x-includes=`%{l_rc} --query x11_incdir` \ |
|
--x-libraries=`%{l_rc} --query x11_libdir` \ |
|
%if "%{with_xaw3d}" == "yes" |
|
--with-toolkit-scroll-bars \ |
|
%else |
|
--without-toolkit-scroll-bars \ |
|
%endif |
|
%if "%{with_jpeg}" == "yes" |
|
--with-jpeg \ |
|
%endif |
|
%if "%{with_png}" == "yes" |
|
--with-png \ |
|
%endif |
|
%if "%{with_tiff}" == "yes" |
|
--with-tiff \ |
|
%endif |
|
%if "%{with_gif}" == "yes" |
|
--with-gif \ |
|
%endif |
|
--with-x-toolkit=athena |
|
%else |
|
--with-x-toolkit=no \ |
|
--without-x |
|
%endif |
|
cmd="%{l_make} %{l_mflags -O}" |
|
if [ ".`uname -s`" = .Linux ] && %{l_shtool} path -s setarch; then |
|
# work-around conflicting Exec-shield security feature |
|
cmd="setarch i386 $cmd" |
|
fi |
|
eval $cmd |
|
|
|
%install |
|
rm -rf $RPM_BUILD_ROOT |
|
%{l_make} %{l_mflags} install \ |
|
prefix=$RPM_BUILD_ROOT%{l_prefix} \ |
|
exec_prefix=$RPM_BUILD_ROOT%{l_prefix} |
|
rm -f $RPM_BUILD_ROOT%{l_prefix}/info/dir |
|
rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/emacs-%{version} |
|
rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/rcs-checkin |
|
rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/[ce]tags |
|
rm -f $RPM_BUILD_ROOT%{l_prefix}/man/man1/[ce]tags.1 |
|
rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/b2m |
|
mv $RPM_BUILD_ROOT%{l_prefix}/info $RPM_BUILD_ROOT%{l_prefix}/info.old |
|
%{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/info |
|
mv $RPM_BUILD_ROOT%{l_prefix}/info.old/emacs* $RPM_BUILD_ROOT%{l_prefix}/info/ |
|
rm -rf $RPM_BUILD_ROOT%{l_prefix}/info.old |
|
%{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} |
|
|
|
%files -f files |
|
|
|
%clean |
|
rm -rf $RPM_BUILD_ROOT |
|
|
|
|