111 lines
3.4 KiB
RPMSpec
111 lines
3.4 KiB
RPMSpec
#
|
|
# spec file for package sgml-skel
|
|
#
|
|
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
|
|
#
|
|
# All modifications and additions to the file contributed by third parties
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
# upon. The license for this file, and modifications and additions to the
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
# license for the pristine package is not an Open Source License, in which
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
# published by the Open Source Initiative.
|
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
#
|
|
|
|
|
|
Name: sgml-skel
|
|
BuildRequires: automake
|
|
BuildRequires: libxml2
|
|
Summary: Helper Scripts for the SGML System
|
|
License: GPL-2.0+
|
|
Group: Productivity/Publishing/SGML
|
|
Version: 0.6
|
|
Release: 0
|
|
Requires: libxml2
|
|
PreReq: /bin/awk
|
|
PreReq: /bin/mv
|
|
PreReq: /bin/chmod
|
|
# URL:
|
|
Source0: http://www.suse.de/~ke/%{name}/%{name}-%{version}.tar.bz2
|
|
# :pserver:anoncvs@sources.redhat.com:/cvs/docbook-tools
|
|
Source1: docbook-tools/sgml-common/bin/install-catalog.in
|
|
Source2: edit-xml-catalog.sh
|
|
Patch: sgml-skel-regcat.diff
|
|
Patch1: sgml-skel-regcat2.diff
|
|
Patch2: sgml-skel-edit-cat.diff
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
BuildArch: noarch
|
|
|
|
%description
|
|
These scripts will help prepare and maintain parts of an SGML system.
|
|
|
|
|
|
|
|
Authors:
|
|
--------
|
|
Eric Bischoff <eric@caldera.de>
|
|
Karl Eichwalder <ke@suse.de>
|
|
|
|
%define sgmldir %{_datadir}/sgml
|
|
%define INSTALL install -m755 -s
|
|
%define INSTALL_SCRIPT install -m755
|
|
%define INSTALL_DIR install -d -m755
|
|
%define INSTALL_DATA install -m644
|
|
|
|
%prep
|
|
%setup -q
|
|
%patch -p 1
|
|
%patch1 -p 1
|
|
# # cp -p $RPM_SOURCE_DIR/%{name}-README.SuSE .
|
|
cp %{S:1} .
|
|
cp %{S:2} .
|
|
%patch2 -p 0
|
|
|
|
%build
|
|
# CFLAGS="$RPM_OPT_FLAGS"
|
|
autoreconf -i -f
|
|
./configure --prefix=%{_prefix} --infodir=%{_infodir} \
|
|
--datadir=%{_datadir} --mandir=%{_mandir} \
|
|
--build $RPM_ARCH-suse-linux
|
|
|
|
%install
|
|
make install DESTDIR=$RPM_BUILD_ROOT
|
|
%{INSTALL_SCRIPT} install-catalog.in $RPM_BUILD_ROOT%{_bindir}/install-catalog
|
|
%{INSTALL_SCRIPT} edit-xml-catalog.sh \
|
|
$RPM_BUILD_ROOT%{_bindir}/edit-xml-catalog
|
|
ln -sf sgml2xmlcat.sh $RPM_BUILD_ROOT%{_bindir}/sgmlcat2x.sh
|
|
ln -sf install-catalog $RPM_BUILD_ROOT%{_bindir}/install-catalog.sh
|
|
%{INSTALL_DIR} $RPM_BUILD_ROOT%{sgmldir}
|
|
%{INSTALL_DIR} $RPM_BUILD_ROOT%{_sysconfdir}/{sgml,xml}
|
|
%{INSTALL_DIR} $RPM_BUILD_ROOT/var/lib/sgml
|
|
touch $RPM_BUILD_ROOT%{_sysconfdir}/sgml/catalog
|
|
xmlcatalog --noout --create $RPM_BUILD_ROOT%{_sysconfdir}/xml/suse-catalog.xml
|
|
xmlcatalog --noout --create $RPM_BUILD_ROOT%{_sysconfdir}/xml/catalog
|
|
xmlcatalog --noout --add "nextCatalog" "suse-catalog.xml" "suse-catalog.xml" \
|
|
$RPM_BUILD_ROOT%{_sysconfdir}/xml/catalog
|
|
|
|
%clean
|
|
rm -fr $RPM_BUILD_ROOT
|
|
|
|
%post
|
|
# only create suse-catalog.xml at installation time; not in the update case
|
|
if ["$1" = 1 ]; then
|
|
[ -r %{_sysconfdir}/xml/suse-catalog.xml ] || xmlcatalog --noout --create %{_sysconfdir}/xml/suse-catalog.xml
|
|
fi
|
|
|
|
%files
|
|
%defattr(-, root, root)
|
|
%doc AUTHORS COPYING NEWS README*
|
|
%ghost %{_sysconfdir}/sgml/catalog
|
|
%ghost %{_sysconfdir}/xml/suse-catalog.xml
|
|
%config %verify(not md5 size mtime) %{_sysconfdir}/xml/catalog
|
|
%dir %{_sysconfdir}/sgml
|
|
%dir %{_sysconfdir}/xml
|
|
%{_bindir}/*
|
|
%dir /var/lib/sgml
|
|
|
|
%changelog
|