]> git.pld-linux.org Git - packages/sgml-common.git/blame - sgml-common.spec
allow libxml2-progs uninstallation to succeed
[packages/sgml-common.git] / sgml-common.spec
CommitLineData
b255486a 1Summary: Common SGML catalog and DTD files
10c5c9a1 2Summary(pl.UTF-8): Opisane w normie ISO 8879/1986 katalogi i DTD SGML-owe
b255486a 3Name: sgml-common
b91b944e 4Version: 0.6.3
c1968826
ER
5Release: 8
6#Copyright: (C) International Organization for Standardization 1986
c84740bd 7License: distributable
acb97e86 8URL: http://www.iso.ch/cate/3524030.html
b255486a 9Group: Applications/Publishing/SGML
c16d96dd 10Source0: ftp://ftp.kde.org/pub/kde/devel/docbook/SOURCES/%{name}-%{version}.tgz
7e9e65f7 11# Source0-md5: 103c9828f24820df86e55e7862e28974
b91b944e 12Patch0: %{name}-chmod.patch
6c3d0cd8 13BuildRequires: autoconf
afa0a31f 14BuildRequires: automake
391d7150 15BuildRequires: libxml2-progs
be0c32b0 16Requires(post,preun): /usr/bin/xmlcatalog
a8c41b15
JB
17Requires: fileutils
18Requires: grep
a2b4c6ba 19Requires: libxml2-progs
a8c41b15 20Requires: sed
2bc02e51
AF
21Provides: iso-entities
22Provides: iso-entities-8879.1986
23Provides: sgml-catalog
a8c41b15 24BuildArch: noarch
273d630b 25BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
0e479097 26
b91b944e
AF
27%define xml_catalog %{_datadir}/sgml/xml-iso-entities-8879.1986/catalog.xml
28
0e479097 29%description
acb97e86 30sgml-common is a collection of entities and dtds that are useful for
31SGML processing, but shouldn't need to be included in multiple
32packages. It also includes an up-to-date Open Catalog file.
0e479097 33
6da9d96c
JR
34%description -l pl.UTF-8
35sgml-common jest zestawem wspólnych dla większości aplikacji SGML-a
e549d225 36(bo opisanych w normie ISO 8879/1986) encji i DTD. Poza tym zawiera
6da9d96c 37aktualizowany przy dodawaniu nowych pakietów katalog SGML oraz
acb97e86 38instalator nowych DTD.
0e479097 39
40%prep
4702f196 41%setup -q
acb97e86 42%patch0 -p1
b91b944e
AF
43
44%build
45%{__autoconf}
46%configure
acb97e86 47
848884ad 48%install
c603b364 49rm -rf $RPM_BUILD_ROOT
b91b944e
AF
50%{__make} install \
51 DESTDIR=$RPM_BUILD_ROOT
52
f2e8fc91 53# directory commonly used by docbook-* packages
81fce42a
JB
54# and the second used by {,x}html-dtd* ones
55install -d $RPM_BUILD_ROOT%{_datadir}/sgml/{docbook,html}
f2e8fc91 56
b91b944e 57xmlcatalog --noout --create $RPM_BUILD_ROOT%{xml_catalog}
c1968826
ER
58grep PUBLIC $RPM_BUILD_ROOT%{_datadir}/sgml/xml-iso-entities-8879.1986/catalog | \
59 sed 's/^/xmlcatalog --noout --add /;s/PUBLIC/public/;s=$= '$RPM_BUILD_ROOT'%{xml_catalog}=' | sh
917b5d11 60
b91b944e 61rm -rf $RPM_BUILD_ROOT%{_prefix}/doc
02162f8e 62
c16d96dd
JB
63%clean
64rm -rf $RPM_BUILD_ROOT
848884ad 65
a825d1be 66%triggerpostun -- sgml-common < 0.5-9
c71e26d7 67if ! grep -qs /etc/sgml/sgml-iso-entities-8879.1986.cat /etc/sgml/catalog ; then
2bc02e51 68 /usr/bin/install-catalog --add /etc/sgml/sgml-iso-entities-8879.1986.cat /usr/share/sgml/sgml-iso-entities-8879.1986/catalog > /dev/null
a825d1be 69fi
2bc02e51 70
c603b364 71%post
c71e26d7 72if ! grep -qs /etc/sgml/sgml-iso-entities-8879.1986.cat /etc/sgml/catalog ; then
2bc02e51 73 /usr/bin/install-catalog --add /etc/sgml/sgml-iso-entities-8879.1986.cat /usr/share/sgml/sgml-iso-entities-8879.1986/catalog > /dev/null
a825d1be 74fi
c71e26d7 75if ! grep -qs /etc/sgml/xml-iso-entities-8879.1986.cat /etc/sgml/catalog ; then
b91b944e
AF
76 /usr/bin/install-catalog --add /etc/sgml/xml-iso-entities-8879.1986.cat /usr/share/sgml/xml-iso-entities-8879.1986/catalog > /dev/null
77fi
c71e26d7 78if ! grep -qs %{xml_catalog} /etc/xml/catalog ; then
b91b944e
AF
79 /usr/bin/xmlcatalog --noout --add nextCatalog "" %{xml_catalog} /etc/xml/catalog
80fi
acb97e86 81
82%preun
2bc02e51
AF
83if [ "$1" = "0" ] ; then
84 /usr/bin/install-catalog --remove /etc/sgml/sgml-iso-entities-8879.1986.cat /usr/share/sgml/sgml-iso-entities-8879.1986/catalog > /dev/null
b91b944e 85 /usr/bin/install-catalog --remove /etc/sgml/xml-iso-entities-8879.1986.cat /usr/share/sgml/xml-iso-entities-8879.1986/catalog > /dev/null
c1968826 86 [ ! -x /usr/bin/xmlcatalog ] || /usr/bin/xmlcatalog --noout --del %{xml_catalog} /etc/xml/catalog
a825d1be 87fi
0e479097 88
0e479097 89%files
789f6e30 90%defattr(644,root,root,755)
b91b944e 91%doc doc/HTML/*
81fce42a 92%dir %{_sysconfdir}/sgml
a2b4c6ba 93%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/sgml/sgml.conf
acb97e86 94%attr(755,root,root) %{_bindir}/*
95%{_datadir}/sgml
96%{_mandir}/*/*
This page took 0.10166 seconds and 4 git commands to generate.