rpms/psgml/devel psgml.spec,1.24,1.25

alexlan alexlan at fedoraproject.org
Mon Feb 8 22:37:35 UTC 2010


Author: alexlan

Update of /cvs/pkgs/rpms/psgml/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv7236

Modified Files:
	psgml.spec 
Log Message:
- Updates for merge review (#226321)
- Add URL to upstream
- Fixed {Build}Requires to use sgml-common and emacs
- Make postun a preun
- Convert files to UTF-8
- Use macros throughout
- Fix scriptlets
- Add some missing %%doc files
- Fixes to quiet rpmlint
- Remove some non-existent catalog files used with old DTDs



Index: psgml.spec
===================================================================
RCS file: /cvs/pkgs/rpms/psgml/devel/psgml.spec,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -p -r1.24 -r1.25
--- psgml.spec	10 Aug 2009 09:22:48 -0000	1.24
+++ psgml.spec	8 Feb 2010 22:37:34 -0000	1.25
@@ -1,49 +1,55 @@
-Summary: A GNU Emacs major mode for editing SGML documents.
+Summary: GNU Emacs major mode for editing SGML documents
 name: psgml
 Version: 1.2.5
-Release: 11%{?dist}
-Prereq: sgml-common
+Release: 12%{?dist}
 License: GPLv2+
+URL: http://www.lysator.liu.se/projects/about_psgml.html
 Source: ftp://ftp.lysator.liu.se/pub/sgml/psgml-%{version}.tar.gz
 Patch0: psgml-install-info.patch
 Group: Applications/Editors
-BuildRoot: %{_tmppath}/%{name}-%{version}-root
+BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
 BuildArch: noarch
-Prefix: /usr
-%define psgmldir %{prefix}/share/emacs/site-lisp/psgml/
+%global psgmldir %{_datadir}/emacs/site-lisp/psgml/
 
 BuildRequires: emacs
+BuildRequires: sgml-common
+Requires: sgml-common emacs
 Requires(post): info
-Requires(postun): info
+Requires(preun): info
 
 %description
-Emacs is an advanced and extensible editor. An Emacs major mode
-customizes Emacs for editing particular types of text documents. PSGML
-is a major mode for SGML (a markup language) documents.  PSGML
-provides several functionalities for editing SGML documents:
-indentation according to element nesting depth and identification of
-structural errors (but it is not a validating SGML parser); menus and
-commands for inserting tags with only the contextually valid tags;
-attribute values can be edited in a separate window with information
-about types and defaults; structure based editing includes movement
-and killing; and also several commands for folding editing.
-
+Emacs is an advanced and extensible editor. An Emacs major mode customizes Emacs
+for editing particular types of text documents. PSGML is a major mode for SGML
+(a markup language) documents.  PSGML provides several functionalities for
+editing SGML documents: indentation according to element nesting depth and
+identification of structural errors (but it is not a validating SGML parser);
+menus and commands for inserting tags with only the contextually valid tags;
+attribute values can be edited in a separate window with information about types
+and defaults; structure based editing includes movement and killing; and also
+several commands for folding editing.
 
 %prep
 %setup -q
 %patch0 -p1 -b .install-info
 
+# Convert to utf-8
+for file in ChangeLog psgml.info psgml.texi; do
+    iconv -f ISO-8859-1 -t UTF-8 -o $file.new $file && \
+    touch -r $file $file.new && \
+    mv $file.new $file
+done
+
 %build
 # make sure we "find" etags in the installed place...
-PATH=/usr/bin:$PATH ./configure --prefix=/usr
-make infodir=%{_infodir} psgmldir=/usr/share/emacs/site-lisp/psgml
+%configure
+make infodir=%{_infodir} psgmldir=%{psgmldir}
 cat > psgml-init.el << __ELISP__
-(setq load-path (append load-path '("/usr/share/emacs/site-lisp/psgml")))
+(setq load-path (append load-path '("%{psgmldir}")))
 
 (autoload 'sgml-mode "psgml" "Major mode for editing SGML." t)
 (autoload 'xml-mode "psgml" "Major mode for editing XML." t)
 (if (not (getenv "SGML_CATALOG_FILES"))
-   (defvar sgml-catalog-files '("CATALOG" "catalog" "/etc/sgml/catalog" "%{prefix}/lib/sgml/CATALOG" "%{prefix}/lib/sgml-tools/dtd/catalog"))
+   (defvar sgml-catalog-files '("CATALOG" "catalog" "%{_sysconfdir}/sgml/catalog"))
   "*List of catalog entry files.
 The files are in the format defined in the SGML Open Draft Technical
 Resolution on Entity Management.")
@@ -57,7 +63,7 @@ rm -rf $RPM_BUILD_ROOT
 
 mkdir -p $RPM_BUILD_ROOT/%{psgmldir}
 mkdir -p $RPM_BUILD_ROOT%{_infodir}
-mkdir -p $RPM_BUILD_ROOT/%{prefix}/share/sgml/cdtd
+mkdir -p $RPM_BUILD_ROOT/%{_datadir}/sgml/cdtd
 
 touch $RPM_BUILD_ROOT%{_infodir}/dir
 
@@ -72,34 +78,44 @@ gzip $RPM_BUILD_ROOT%{_infodir}/*.info
 
 rm -f $RPM_BUILD_ROOT%{_infodir}/dir
 
-mkdir -p $RPM_BUILD_ROOT/usr/share/emacs/site-lisp/site-start.d
-install -m644 psgml-init.el $RPM_BUILD_ROOT/usr/share/emacs/site-lisp/site-start.d
+mkdir -p $RPM_BUILD_ROOT%{_datadir}/emacs/site-lisp/site-start.d
+install -p -m644 psgml-init.el $RPM_BUILD_ROOT%{_datadir}/emacs/site-lisp/site-start.d
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
 %post
-install-info --info-dir=%{_infodir} %{_infodir}/psgml.info
-install-info --info-dir=%{_infodir} %{_infodir}/psgml-api.info
-exit 0
+install-info --info-dir=%{_infodir} %{_infodir}/psgml.info || :
+install-info --info-dir=%{_infodir} %{_infodir}/psgml-api.info || :
 
-%postun
+%preun
 if [ "$1" = 0 ] ; then
-  install-info --info-dir=%{_infodir} --delete %{_infodir}/psgml.info
-  install-info --info-dir=%{_infodir} --delete %{_infodir}/psgml-api.info
+  install-info --info-dir=%{_infodir} --delete %{_infodir}/psgml.info || :
+  install-info --info-dir=%{_infodir} --delete %{_infodir}/psgml-api.info || :
 fi
-exit 0
 
 %files
-%defattr(-,root,root)
-%doc psgml.ps README.psgml
+%defattr(-,root,root,-)
+%doc psgml.ps psgml.texi README.psgml ChangeLog
 %dir %{psgmldir}
 %{psgmldir}/*
-/usr/share/emacs/site-lisp/site-start.d/*
+%{_datadir}/emacs/site-lisp/site-start.d/*
+%{_datadir}/sgml/cdtd
 %{_infodir}/psgml*
-%{prefix}/share/sgml/cdtd
 
 %changelog
+* Mon Feb  8 2010 Alex Lancaster <alexlan[AT]fedoraproject org> - 1.2.5-12
+- Updates for merge review (#226321)
+- Add URL to upstream
+- Fixed {Build}Requires to use sgml-common and emacs
+- Make postun a preun
+- Convert files to UTF-8
+- Use macros throughout
+- Fix scriptlets
+- Add some missing %%doc files
+- Fixes to quiet rpmlint
+- Remove some non-existent catalog files used with old DTDs
+
 * Mon Aug 10 2009 Ville Skyttä <ville.skytta at iki.fi> - 1.2.5-11
 - Convert specfile to UTF-8.
 
@@ -223,14 +239,14 @@ exit 0
 * Mon Aug 30 1999 Tim Powers <timp at redhat.com>
 - changed group
 - changed buildroot toe be in /var/tmp
-- added %defattr
+- added %%defattr
 
 * Tue Jul 21 1999 Tim Powers <timp at redhat.com>
 - rebuilt for 6.1
 
 * Fri Apr 23 1999 Michael K. Johnson <johnsonm at redhat.com>
 - PATH hack to protect "make install" from install-info
-- %doc path fixed
+- %%doc path fixed
 - protect postun from uninstall
 - Moved $V outside of '' so that it gets interpolated
 



More information about the scm-commits mailing list