Blob Blame History Raw
%define pkg htmlize
%define pkgname HTMLize

%if %($(pkg-config emacs) ; echo $?)
%define emacs_lispdir %{_datadir}/emacs/site-lisp
%define emacs_startdir %{_datadir}/emacs/site-lisp/site-start.d
%define emacs_version 22.2
%else
%define emacs_lispdir %(pkg-config emacs --variable sitepkglispdir)
%define emacs_startdir %(pkg-config emacs --variable sitestartdir)
%define emacs_version %(pkg-config emacs --modversion)
%endif

Summary:	Convert buffer text and decorations to HTML
Name:		emacs-%{pkg}
Version:	1.34
Release:	5%{?dist}
License:	GPLv2+
Group:		Applications/Publishing
URL:		http://www.emacswiki.org/emacs-en/Htmlize
Source0:	http://fly.srk.fer.hr/~hniksic/emacs/%{pkg}.el
Source1:	%{pkg}-init.el

BuildRoot:	%(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)

Requires:	emacs(bin) >= emacs_version

BuildRequires:	emacs
BuildRequires:	emacs-el

BuildArch:	noarch

%description
%{pkgname} is an add-on package for GNU Emacs. It converts the buffer text and
the associated decorations to HTML. The conversion is quite sophisticated, it
understands non-ascii characters, looks up colours in the X11 RGB database,
and can generate either CSS or old style font bits.

%package el
Summary:	Emacs Lisp source files for %{name}
Group:		Development/Libraries

Requires:	%{name} = %{version}-%{release}

%description el
This package contains Emacs Lisp source files for %{name} under
GNU Emacs. You do not need to install this package to run %{pkgname}.
Install the %{name} package to use %{pkgname} with GNU Emacs.

%prep
%setup -cT
cp -p %{SOURCE0} .

%build
emacs -batch -f batch-byte-compile ./%{pkg}.el

%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT%{emacs_lispdir}/%{pkg}
mkdir -p $RPM_BUILD_ROOT%{emacs_startdir}

install -p -m644 ./%{pkg}.el $RPM_BUILD_ROOT%{emacs_lispdir}/%{pkg}
install -p -m644 ./%{pkg}.elc $RPM_BUILD_ROOT%{emacs_lispdir}/%{pkg}
install -p -m644 %{SOURCE1} $RPM_BUILD_ROOT%{emacs_startdir}

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root,-)
%dir %{emacs_lispdir}/%{pkg}
%{emacs_lispdir}/%{pkg}/%{pkg}.elc
%{emacs_startdir}/%{pkg}-init.el

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

%changelog
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.34-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild

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

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

* Fri Jan 23 2009 Debarshi Ray <rishi@fedoraproject.org> - 1.34-2
- Added copyright and distribution notices to htmlize-init.el.

* Sat Jan 17 2009 Debarshi Ray <rishi@fedoraproject.org> - 1.34-1
- Initial build.