1 Summary: A GNU Emacs major mode for editing SGML documents
6 Group: Applications/Editors/Emacs
7 Source0: ftp://ftp.lysator.liu.se/pub/sgml/psgml-%{version}.tar.gz
8 # Source0-md5: d4f346b0242035e54860b29d7466b0a2
9 Patch0: %{name}-install-info.patch
10 Patch1: %{name}-DESTDIR.patch
15 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
17 %define psgmldir %{_datadir}/emacs/site-lisp/psgml/
20 Emacs is an advanced and extensible editor. An Emacs major mode
21 customizes Emacs for editing particular types of text documents. PSGML
22 is a major mode for SGML (a markup language) documents. PSGML provides
23 several functionalities for editing SGML documents: indentation
24 according to element nesting depth and identification of structural
25 errors (but it is not a validating SGML parser); menus and commands
26 for inserting tags with only the contextually valid tags; attribute
27 values can be edited in a separate window with information about types
28 and defaults; structure based editing includes movement and killing;
29 and also several commands for folding editing.
32 %setup -q -n psgml-%{version}
40 lispdir=%{_datadir}/emacs/site-lisp/psgml
43 rm -rf $RPM_BUILD_ROOT
44 install -d $RPM_BUILD_ROOT{%{_infodir},%{_datadir}/emacs/site-lisp/site-start.d}
46 %{__make} install install-info \
47 lispdir=%{_datadir}/emacs/site-lisp/psgml \
48 DESTDIR=$RPM_BUILD_ROOT
50 cat > $RPM_BUILD_ROOT%{_datadir}/emacs/site-lisp/site-start.d/psgml-init.el << __ELISP__
51 (setq load-path (append load-path '("%{_datadir}/emacs/site-lisp/psgml")))
53 (autoload 'sgml-mode "psgml" "Major mode for editing SGML." t)
54 (autoload 'xml-mode "psgml" "Major mode for editing XML." t)
55 (if (not (getenv "SGML_CATALOG_FILES"))
56 (defvar sgml-catalog-files '("CATALOG" "catalog" "%{_sysconfdir}/sgml/catalog" "%{_prefix}/lib/sgml/CATALOG" "%{_prefix}/lib/sgml-tools/dtd/catalog"))
57 "*List of catalog entry files.
58 The files are in the format defined in the SGML Open Draft Technical
59 Resolution on Entity Management.")
60 (put 'sgml-catalog-files 'sgml-type 'list)
65 rm -rf $RPM_BUILD_ROOT
68 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
71 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
74 %defattr(644,root,root,755)
75 %doc psgml.ps README.psgml
78 %{_datadir}/emacs/site-lisp/site-start.d/*