Sophie

Sophie

distrib > Fedora > 14 > x86_64 > by-pkgid > 2e1967ea26ba87e7ac5b650cf66911d6 > files > 2

emacs-common-ebib-1.8.0-1.fc12.src.rpm

%define pkg ebib

# If the emacs-el package has installed a pkgconfig file, use that to
# determine install locations and Emacs version at build time, otherwise
# set defaults.
%if %($(pkg-config emacs) ; echo $?)
%define emacs_version 22.1
%define emacs_lispdir %{_datadir}/emacs/site-lisp
%define emacs_startdir %{_datadir}/emacs/site-lisp/site-start.d
%else
%define emacs_version %(pkg-config emacs --modversion)
%define emacs_lispdir %(pkg-config emacs --variable sitepkglispdir)
%define emacs_startdir %(pkg-config emacs --variable sitestartdir)
%endif

# If the xemacs-devel package has installed a pkgconfig file, use that
# to determine install locations and Emacs version at build time,
# otherwise set defaults.
%if %($(pkg-config xemacs) ; echo $?)
%define xemacs_version 21.5
%define xemacs_lispdir %{_datadir}/xemacs/site-lisp
%define xemacs_startdir %{_datadir}/xemacs/site-lisp/site-start.d
%else
%define xemacs_version %(pkg-config xemacs --modversion)
%define xemacs_lispdir %(pkg-config xemacs --variable sitepkglispdir)
%define xemacs_startdir %(pkg-config xemacs --variable sitestartdir)
%endif

Name:           emacs-common-%{pkg}
Version:        1.8.0
Release:        1%{?dist}
Summary:        A BibTeX database manager that runs in Emacs and XEmacs

Group:          Applications/Editors
License:        BSD
URL:            http://ebib.sourceforge.net/
Source0:        http://download.sourceforge.net/%{pkg}/%{pkg}-%{version}.tar.gz
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildArch:      noarch
BuildRequires:  emacs emacs-el xemacs xemacs-devel

Requires(post): /sbin/install-info
Requires(preun):/sbin/install-info

%description 
Ebib is a BibTeX database manager that runs in GNU Emacs and
XEmacs. With Ebib, you can create and manage .bib-files, all within
Emacs. It supports @string and @preamble definitions, multi-line field
values, searching, and integration with Emacs' (La)TeX mode.

Ebib provides the standard capabilities that one would expect from a
BibTeX database manager: .bib files can be opened, modified (adding,
deleting, modifying entries), searched, and saved. Obviously, it is also
possible to start a new database from scratch. A nice property is the
ability to copy single entries to another .bib file: this makes it
possible to create a new .bib file from a subset of the entries of an
existing database. This can be useful e.g. when you want to create a
.bib file for a paper containing only the works cited in that paper.

This package contains the files common to both the GNU Emacs and XEmacs
Ebib packages. You need to install the emacs-ebib and/or the xemacs-ebib
package to use Ebib.

%package -n emacs-%{pkg}
Summary:        Compiled elisp files to run Ebib under GNU Emacs
Group:          Applications/Editors
Requires:       emacs(bin) >= %{emacs_version}
Requires:       emacs-common-%{pkg} = %{version}-%{release}

%description -n emacs-%{pkg}
Ebib is a BibTeX database manager for GNU Emacs and XEmacs.

This package contains the byte compiled elisp packages to run Ebib with
GNU Emacs.

%package -n emacs-%{pkg}-el
Summary:        Elisp source files for Ebib under GNU Emacs
Group:          Applications/Editors
Requires:       emacs-%{pkg} = %{version}-%{release}

%description -n emacs-%{pkg}-el
This package contains the elisp source files for Ebib under GNU
Emacs. You do not need to install this package to run Ebib. Install the
emacs-%{pkg} package to use Ebib with GNU Emacs.

%package -n xemacs-%{pkg}
Summary:        Compiled elisp files to run Ebib under XEmacs
Group:          Applications/Editors
Requires:       xemacs(bin) >= %{xemacs_version}
Requires:       emacs-common-%{pkg} = %{version}-%{release}

%description -n xemacs-%{pkg}
Ebib is a BibTeX database manager for GNU Emacs and XEmacs.

This package contains the byte compiled elisp packages to run Ebib with
XEmacs.

%package -n xemacs-%{pkg}-el
Summary:        Elisp source files for Ebib under XEmacs
Group:          Applications/Editors
Requires:       xemacs-%{pkg} = %{version}-%{release}

%description -n xemacs-%{pkg}-el
This package contains the elisp source files for Ebib under XEmacs. You
do not need to install this package to run Ebib. Install the
xemacs-%{pkg} package to use Ebib with XEmacs.

%prep
%setup -q -n %{pkg}-%{version}
cp ebib.el ebib.xemacs.el

%build
emacs -batch -f batch-byte-compile ebib.el
xemacs -batch -f batch-byte-compile ebib.xemacs.el

# Create init file
cat > ebib-init.el << EOF
;; Load Ebib mode
(autoload 'ebib "ebib" "Ebib, a BibTeX database manager." t)
EOF

# Construct license file from source file
head -28 ebib.el | sed 's/;;//g' > COPYING

%install
rm -rf $RPM_BUILD_ROOT

# Files for GNU Emacs
install -d $RPM_BUILD_ROOT%{emacs_lispdir}/%{pkg}
install -p -m 0644 ebib.el* $RPM_BUILD_ROOT%{emacs_lispdir}/%{pkg}
install -d $RPM_BUILD_ROOT%{emacs_lispdir}/site-start.d
install -p -m 0644 ebib-init.el $RPM_BUILD_ROOT%{emacs_lispdir}/site-start.d

# Files for XEmacs
install -d $RPM_BUILD_ROOT%{xemacs_lispdir}/%{pkg}
install -p -m 0644 ebib.xemacs.el $RPM_BUILD_ROOT%{xemacs_lispdir}/%{pkg}/ebib.el
install -p -m 0644 ebib.xemacs.elc $RPM_BUILD_ROOT%{xemacs_lispdir}/%{pkg}/ebib.elc
install -d $RPM_BUILD_ROOT%{xemacs_lispdir}/site-start.d
install -p -m 0644 ebib-init.el $RPM_BUILD_ROOT%{xemacs_lispdir}/site-start.d

# Documentation
install -d $RPM_BUILD_ROOT%{_infodir}
install -p -m 0644 info/ebib-manual.info $RPM_BUILD_ROOT%{_infodir}/ebib.info
mv doc/html/* .

%clean
rm -rf $RPM_BUILD_ROOT

%post
/sbin/install-info %{_infodir}/ebib.info %{_infodir}/dir 2>/dev/null || :

%preun
if [ $1 -eq 0 ]; then
  /sbin/install-info --delete %{_infodir}/ebib.info %{_infodir}/dir 2>/dev/null || :
fi

%files
%defattr(-,root,root,-)
%doc README VERSION COPYING ebib-manual.*
%{_infodir}/*

%files -n emacs-%{pkg}
%defattr(-,root,root,-)
%{emacs_lispdir}/%{pkg}/*.elc
%{emacs_lispdir}/site-start.d/*.el
%dir %{emacs_lispdir}/%{pkg}

%files -n emacs-%{pkg}-el
%defattr(-,root,root,-)
%{emacs_lispdir}/%{pkg}/*.el

%files -n xemacs-%{pkg}
%defattr(-,root,root,-)
%{xemacs_lispdir}/%{pkg}/*.elc
%{xemacs_lispdir}/site-start.d/*.el
%dir %{xemacs_lispdir}/%{pkg}

%files -n xemacs-%{pkg}-el
%defattr(-,root,root,-)
%{xemacs_lispdir}/%{pkg}/*.el

%changelog
* Sun Jul 26 2009 Jonathan G. Underwood <jonathan.underwood@gmail.com> - 1.8.0-1
- Update to version 1.8.0
- Correct typo in spec file changelog

* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.7.2-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild

* Tue Feb 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.7.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild

* Thu Nov  6 2008 Jonathan G. Underwood <jonathan.underwood@gmail.com> - 1.7.2-1
- Update to version 1.7.2
- Fix Source0 URL
- Correct email adresses in spec file changelog
- Remove ebib-1.5.2-info-fix.patch

* Fri Jan 25 2008 Jonathan G. Underwood <jonathan.underwood@gmail.com> - 1.5.2-3
- Bump release

* Sat Jan 19 2008 Jonathan G. Underwood <jonathan.underwood@gmail.com> - 1.5.2-2
- Add information about installing emacs-ebib/xemacs-ebib to emacs-common-ebib
  package description
- Fix error in the info file installation

* Sat Jan 19 2008 Jonathan G. Underwood <jonathan.underwood@gmail.com> - 1.5.2-1
- Update to version 1.5.2
- Conform to emacs packaging guidelines

* Wed May 30 2007 Jonathan G. Underwood <jonathan.underwood@gmail.com> - 1.3.1-1
- Add macros to get Emacs and XEmacs versions at package build time
- Add Requires for build time Emacs and XEmacs versions
- Rewrap description at 72 columns

* Sun May  6 2007 Jonathan G. Underwood <jonathan.underwood@gmail.com> - 1.3.1-1
- Initial package