You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
173 lines
5.4 KiB
173 lines
5.4 KiB
## |
|
## xemacs.spec -- OpenPKG RPM Package Specification |
|
## Copyright (c) 2000-2010 OpenPKG Foundation e.V. <http://openpkg.net/> |
|
## |
|
## 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 versions |
|
%define V_xemacs 21.4.22 |
|
%define V_sumo 2009-02-17 |
|
|
|
# package information |
|
Name: xemacs |
|
Summary: The XEmacs Text Editor |
|
URL: http://www.xemacs.org/ |
|
Vendor: The XEmacs Project |
|
Packager: OpenPKG Foundation e.V. |
|
Distribution: OpenPKG Community |
|
Class: EVAL |
|
Group: Editor |
|
License: GPL |
|
Version: %{V_xemacs} |
|
Release: 20090218 |
|
|
|
# package options |
|
%option with_sumo yes |
|
%option with_gtk no |
|
|
|
# list of sources |
|
Source0: http://ftp.xemacs.org/pub/xemacs/stable/xemacs-%{V_xemacs}.tar.gz |
|
Source1: http://ftp.xemacs.org/pub/xemacs/packages/xemacs-sumo-%{V_sumo}.tar.gz |
|
Patch0: xemacs.patch |
|
|
|
# build information |
|
Prefix: %{l_prefix} |
|
BuildRoot: %{l_buildroot} |
|
BuildPreReq: OpenPKG, openpkg >= 20040130, X11, make |
|
PreReq: OpenPKG, openpkg >= 20040130, X11 |
|
BuildPreReq: ncurses, jpeg, png, zlib, tiff, db, xpm |
|
PreReq: ncurses, jpeg, png, zlib, tiff, db, xpm |
|
%if "%{with_gtk}" == "yes" |
|
BuildPreReq: gtk |
|
PreReq: gtk |
|
%else |
|
BuildPreReq: xaw3d |
|
PreReq: xaw3d |
|
%endif |
|
AutoReq: no |
|
AutoReqProv: no |
|
|
|
%description |
|
XEmacs is a highly customizable open source text editor and |
|
application development system. It is related to other versions of |
|
Emacs, in particular GNU Emacs. Its emphasis is on modern graphical |
|
user interface support. |
|
|
|
%track |
|
prog xemacs = { |
|
version = %{V_xemacs} |
|
url = http://ftp.xemacs.org/pub/xemacs/stable/ |
|
regex = xemacs-(__VER__)\.tar\.gz |
|
} |
|
prog xemacs:sumo = { |
|
version = %{V_sumo} |
|
url = http://ftp.xemacs.org/pub/xemacs/packages/ |
|
regex = xemacs-sumo-([\d-]+)\.tar\.bz2 |
|
} |
|
|
|
%prep |
|
%setup -q |
|
%patch -p0 |
|
|
|
%build |
|
# configure package |
|
PACKAGE_PATH="" |
|
for i in xemacs mule site; do |
|
[ ".$PACKAGE_PATH" != . ] && PACKAGE_PATH="${PACKAGE_PATH}::" |
|
PACKAGE_PATH="${PACKAGE_PATH}%{l_prefix}/lib/xemacs/${i}-packages" |
|
done |
|
export CC="%{l_cc}" |
|
export CFLAGS="%{l_cflags -O}" |
|
export CPPFLAGS="%{l_cppflags tiff glib}" |
|
export LDFLAGS="%{l_ldflags}" |
|
export LIBS="-ldb" |
|
case "%{l_platform -t}" in |
|
*-sunos* ) LIBS="$LIBS -lrt" ;; |
|
esac |
|
./configure \ |
|
--prefix=%{l_prefix} \ |
|
%if "%{with_gtk}" == "yes" |
|
--with-gtk \ |
|
%else |
|
--without-gtk \ |
|
%endif |
|
--without-gnome \ |
|
--with-x \ |
|
--x-includes=`%{l_rc} --query x11_incdir` \ |
|
--x-libraries=`%{l_rc} --query x11_libdir` \ |
|
--package-path="$PACKAGE_PATH" \ |
|
--site-includes=%{l_prefix}/include \ |
|
--site-libraries=%{l_prefix}/lib \ |
|
--with-site-lisp \ |
|
--with-database=berkdb \ |
|
--with-sound=none \ |
|
--with-ncurses \ |
|
--with-jpeg \ |
|
--with-tiff \ |
|
--with-png \ |
|
--with-xpm \ |
|
--pdump |
|
|
|
# build package |
|
%{l_make} %{l_mflags} |
|
|
|
%install |
|
# install package |
|
rm -rf $RPM_BUILD_ROOT |
|
%{l_make} %{l_mflags} install \ |
|
prefix=$RPM_BUILD_ROOT%{l_prefix} \ |
|
exec_prefix=$RPM_BUILD_ROOT%{l_prefix} |
|
|
|
# post-adjust installation |
|
rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/xemacs |
|
mv $RPM_BUILD_ROOT%{l_prefix}/bin/xemacs-%{version} \ |
|
$RPM_BUILD_ROOT%{l_prefix}/bin/xemacs |
|
mv $RPM_BUILD_ROOT%{l_prefix}/lib/xemacs-%{version}/info \ |
|
$RPM_BUILD_ROOT%{l_prefix}/info |
|
|
|
# create directories for additional packages |
|
for i in xemacs mule site; do |
|
%{l_shtool} mkdir -f -p -m 755 \ |
|
$RPM_BUILD_ROOT%{l_prefix}/lib/xemacs/${i}-packages |
|
done |
|
|
|
# install optional sumo package cluster |
|
%if "%{with_sumo}" == "yes" |
|
( cd $RPM_BUILD_ROOT%{l_prefix}/lib/xemacs |
|
%{l_gzip} -dc %{SOURCE xemacs-sumo-%{V_sumo}.tar.gz} | %{l_tar} -xvf - |
|
) || exit $? |
|
%endif |
|
|
|
# strip down installation |
|
rm -f \ |
|
$RPM_BUILD_ROOT%{l_prefix}/info/dir \ |
|
$RPM_BUILD_ROOT%{l_prefix}/info/info.info* \ |
|
$RPM_BUILD_ROOT%{l_prefix}/info/standards.info* \ |
|
$RPM_BUILD_ROOT%{l_prefix}/info/texinfo.info* |
|
strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true |
|
|
|
# determine installation files |
|
%{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} |
|
|
|
%files -f files |
|
|
|
%clean |
|
rm -rf $RPM_BUILD_ROOT |
|
|
|
|