File apel-xemacs.spec of Package apel-xemacs

#
# spec file for package apel-xemacs (Version 10.6)
#
# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#

# norootforbuild

Name:           apel-xemacs
BuildRequires:  compface krb5 libpng-devel libtiff-devel openldap2-devel xemacs xorg-x11-devel
License:        GPL v2 or later
Group:          Productivity/Editors/Emacs
Requires:       xemacs
AutoReqProv:    on
Version:        10.6
Release:        350
Url:            ftp://ftp.m17n.org/pub/mule/apel/
# original source is gzipped.
Source0:        ftp://ftp.m17n.org/pub/mule/apel/apel-10.6.tar.bz2
Patch0:         autoloads.patch
Summary:        A Portable Emacs Library
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:      noarch
%define prefix  /usr

%description
APEL stands for "A Portable Emacs Library".



Authors:
--------
    MORIOKA Tomohiko  <tomo@m17n.org>
    Katsumi Yamoaka   <yamaoka@jpl.org>
    Tanaka Akira  <akr@jaist.ac.jp>
    Shuhei KOBAYASHI  <shuhei-k@jaist.ac.jp>

%prep
%setup -q -n apel-%{version}
%patch0 -p1
# necessary to generate the auto-autoloads.el file:
touch *.el

%build
%define xemacs_package_dir /usr/share/xemacs/site-packages/
make package PACKAGEDIR=%{xemacs_package_dir}

%install
make install-package PACKAGEDIR=$RPM_BUILD_ROOT%{xemacs_package_dir}
# replace buildroot in comments in .elc files by spaces with the same total length:
RPM_BUILD_ROOT_REPLACEMENT=$(echo "$RPM_BUILD_ROOT" | tr [:print:] ' ')
for i in $(find $RPM_BUILD_ROOT -name "*.elc")
do
    perl -pi -e "s|(;;; from file )$RPM_BUILD_ROOT(/usr/share/xemacs/site-packages/.*)|\1$RPM_BUILD_ROOT_REPLACEMENT\2|" $i
done
for i in $(find $RPM_BUILD_ROOT -name custom-load.el)
do
    perl -pi -e "s|$RPM_BUILD_ROOT/usr/share/xemacs/site-packages/|/usr/share/xemacs/site-packages/|g" $i
done

%files 
%defattr(-,root,root)
%doc README* ChangeLog
%dir %{xemacs_package_dir}/
%{xemacs_package_dir}/*

%changelog
* Tue Dec 04 2007 - mfabian@suse.de
- remove openldap2 from BuildRequires.
* Wed Jan 25 2006 - mls@suse.de
- converted neededforbuild to BuildRequires
* Wed May 18 2005 - mfabian@suse.de
- fix build with XEmacs 21.5.20 (function 'batch-update-directory'
  has disappeared in XEmacs 21.5.20).
* Mon Jan 03 2005 - mfabian@suse.de
- fix build with XEmacs 21.5.18.
* Mon Feb 23 2004 - hmacht@suse.de
- building as non-root
* Sun Aug 24 2003 - mfabian@suse.de
- new package: apel-xemacs, version 10.6.
openSUSE Build Service is sponsored by