221a548
%define pkg htmlize
221a548
%define pkgname HTMLize
221a548
221a548
%if %($(pkg-config emacs) ; echo $?)
221a548
%define emacs_lispdir %{_datadir}/emacs/site-lisp
221a548
%define emacs_startdir %{_datadir}/emacs/site-lisp/site-start.d
221a548
%define emacs_version 22.2
221a548
%else
221a548
%define emacs_lispdir %(pkg-config emacs --variable sitepkglispdir)
221a548
%define emacs_startdir %(pkg-config emacs --variable sitestartdir)
221a548
%define emacs_version %(pkg-config emacs --modversion)
221a548
%endif
221a548
221a548
Summary:	Convert buffer text and decorations to HTML
221a548
Name:		emacs-%{pkg}
221a548
Version:	1.34
221a548
Release:	2%{?dist}
221a548
License:	GPLv2+
221a548
Group:		Applications/Publishing
221a548
URL:		http://www.emacswiki.org/emacs-en/Htmlize
221a548
Source0:	http://fly.srk.fer.hr/~hniksic/emacs/%{pkg}.el
221a548
Source1:	%{pkg}-init.el
221a548
221a548
BuildRoot:	%(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
221a548
221a548
Requires:	emacs(bin) >= emacs_version
221a548
221a548
BuildRequires:	emacs
221a548
BuildRequires:	emacs-el
221a548
221a548
BuildArch:	noarch
221a548
221a548
%description
221a548
%{pkgname} is an add-on package for GNU Emacs. It converts the buffer text and
221a548
the associated decorations to HTML. The conversion is quite sophisticated, it
221a548
understands non-ascii characters, looks up colours in the X11 RGB database,
221a548
and can generate either CSS or old style font bits.
221a548
221a548
%package el
221a548
Summary:	Emacs Lisp source files for %{name}
221a548
Group:		Development/Libraries
221a548
221a548
Requires:	%{name} = %{version}-%{release}
221a548
221a548
%description el
221a548
This package contains Emacs Lisp source files for %{name} under
221a548
GNU Emacs. You do not need to install this package to run %{pkgname}.
221a548
Install the %{name} package to use %{pkgname} with GNU Emacs.
221a548
221a548
%prep
221a548
%setup -cT
221a548
cp -p %{SOURCE0} .
221a548
221a548
%build
221a548
emacs -batch -f batch-byte-compile ./%{pkg}.el
221a548
221a548
%install
221a548
rm -rf $RPM_BUILD_ROOT
221a548
mkdir -p $RPM_BUILD_ROOT%{emacs_lispdir}/%{pkg}
221a548
mkdir -p $RPM_BUILD_ROOT%{emacs_startdir}
221a548
221a548
install -p -m644 ./%{pkg}.el $RPM_BUILD_ROOT%{emacs_lispdir}/%{pkg}
221a548
install -p -m644 ./%{pkg}.elc $RPM_BUILD_ROOT%{emacs_lispdir}/%{pkg}
221a548
install -p -m644 %{SOURCE1} $RPM_BUILD_ROOT%{emacs_startdir}
221a548
221a548
%clean
221a548
rm -rf $RPM_BUILD_ROOT
221a548
221a548
%files
221a548
%defattr(-,root,root,-)
221a548
%dir %{emacs_lispdir}/%{pkg}
221a548
%{emacs_lispdir}/%{pkg}/%{pkg}.elc
221a548
%{emacs_startdir}/%{pkg}-init.el
221a548
221a548
%files el
221a548
%defattr(-,root,root,-)
221a548
%{emacs_lispdir}/%{pkg}/%{pkg}.el
221a548
221a548
%changelog
221a548
* Fri Jan 23 2009 Debarshi Ray <rishi@fedoraproject.org> - 1.34-2
221a548
- Added copyright and distribution notices to htmlize-init.el.
221a548
221a548
* Sat Jan 17 2009 Debarshi Ray <rishi@fedoraproject.org> - 1.34-1
221a548
- Initial build.