summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnas Nashif <anas.nashif@intel.com>2012-11-06 22:44:17 -0800
committerAnas Nashif <anas.nashif@intel.com>2012-11-06 22:44:17 -0800
commitbafcd6546e55b1255c5bc50abf79f0dfae8f2db6 (patch)
treee5e551539407acda5892fa54f0e27a9da8994850
parentbde67ea17d51d57f7f3365060c9bb04600aa7c56 (diff)
downloadsgml-skel-bafcd6546e55b1255c5bc50abf79f0dfae8f2db6.tar.gz
sgml-skel-bafcd6546e55b1255c5bc50abf79f0dfae8f2db6.tar.bz2
sgml-skel-bafcd6546e55b1255c5bc50abf79f0dfae8f2db6.zip
add packaging
-rw-r--r--packaging/sgml-skel-edit-cat.diff35
-rw-r--r--packaging/sgml-skel-regcat.diff23
-rw-r--r--packaging/sgml-skel-regcat2.diff22
-rw-r--r--packaging/sgml-skel.spec76
4 files changed, 156 insertions, 0 deletions
diff --git a/packaging/sgml-skel-edit-cat.diff b/packaging/sgml-skel-edit-cat.diff
new file mode 100644
index 0000000..ecc67fb
--- /dev/null
+++ b/packaging/sgml-skel-edit-cat.diff
@@ -0,0 +1,35 @@
+--- edit-xml-catalog.sh 2008-05-14 13:28:16.000000000 +0200
++++ edit-xml-catalog.sh 2008-05-14 13:54:11.000000000 +0200
+@@ -61,10 +61,8 @@
+ if [ "$ROOTCATALOG" != /etc/xml/catalog ]; then
+ root=${ROOTCATALOG#/etc/xml/}
+ if ! grep -q "nextCatalog.*catalog=\"${root}\"" /etc/xml/catalog; then
+- cp /etc/xml/catalog /etc/xml/catalog.tmp
+- sed "/<\/catalog>/i\\
+-<nextCatalog catalog=\"${root}\"/>" \
+- /etc/xml/catalog.tmp >/etc/xml/catalog
++ sed -i "/<\/catalog>/i\\
++<nextCatalog catalog=\"${root}\"/>" /etc/xml/catalog
+ fi
+ prep_catalog "$ROOTCATALOG"
+ fi
+@@ -79,6 +77,9 @@
+ /<catalog/{s=1}
+ END{print "</catalog>"}'
+ } >$ROOTCATALOG.tmp
++ if [ -x /bin/chmod ]; then
++ /bin/chmod --reference=$ROOTCATALOG $ROOTCATALOG.tmp
++ fi
+ $xmllint --nocatalogs --noout $ROOTCATALOG.tmp \
+ && mv $ROOTCATALOG.tmp $ROOTCATALOG
+ }
+@@ -104,6 +105,9 @@
+ /<!-- pac_start: $pattern do not remove! -->/{s=1;next}
+ {print}" > $ROOTCATALOG.tmp
+ fi
++ if [ -x /bin/chmod ]; then
++ /bin/chmod --reference=$ROOTCATALOG $ROOTCATALOG.tmp
++ fi
+ $xmllint --nocatalogs --noout $ROOTCATALOG.tmp \
+ && mv $ROOTCATALOG.tmp $ROOTCATALOG
+ fi
diff --git a/packaging/sgml-skel-regcat.diff b/packaging/sgml-skel-regcat.diff
new file mode 100644
index 0000000..c601bd8
--- /dev/null
+++ b/packaging/sgml-skel-regcat.diff
@@ -0,0 +1,23 @@
+--- sgml-skel-0.6/sgml-register-catalog.in 2002-11-25 09:42:46.000000000 +0100
++++ sgml-skel-0.6/sgml-register-catalog.in 2002-11-25 13:02:47.000000000 +0100
+@@ -126,13 +126,12 @@
+ # else
+ # echo "Warning: $SGML_ORDINARY was not found in the centralized catalog $SGML_CENTRALIZED" >&2
+ # fi
+- if [ ! -s $SGML_ORDINARY ]; then
++ # set -x
+ # rm $SGML_ORDINARY
+- echo "`basename $0`: removal of $SGML_ORDINARY from /etc/sgml/catalog"
+- sed -e "\:$SGML_POINTER \"\?$SGML_ORDINARY\"\?\>:d" /etc/sgml/catalog \
+- > /etc/sgml/catalog.new
+- mv /etc/sgml/catalog.new /etc/sgml/catalog
+- fi
++ echo "`basename $0`: removal of $SGML_ORDINARY from /etc/sgml/catalog"
++ sed -e "\:$SGML_POINTER \+\"\?$SGML_ORDINARY\"\?\>:d" /etc/sgml/catalog \
++ > /etc/sgml/catalog.new
++ mv /etc/sgml/catalog.new /etc/sgml/catalog
+ ;;
+ esac
+
+
+Diff finished at Mon Nov 25 13:20:03
diff --git a/packaging/sgml-skel-regcat2.diff b/packaging/sgml-skel-regcat2.diff
new file mode 100644
index 0000000..96ff27e
--- /dev/null
+++ b/packaging/sgml-skel-regcat2.diff
@@ -0,0 +1,22 @@
+--- sgml-skel-0.6/sgml-register-catalog.in.~1~ 2002-11-28 16:30:54.000000000 +0100
++++ sgml-skel-0.6/sgml-register-catalog.in 2002-11-28 16:41:59.000000000 +0100
+@@ -111,7 +111,7 @@
+ # else
+ # echo "$SGML_POINTER $SGML_ORDINARY" >> $SGML_CENTRALIZED
+ # fi
+- grep -q -e "\<$SGML_ORDINARY\>" /etc/sgml/catalog 2>/dev/null
++ grep -q -e "$SGML_ORDINARY\"\?[ ]*$" /etc/sgml/catalog 2>/dev/null
+ if [ $? -ne 0 ]; then
+ echo "`basename $0`: addition of $SGML_ORDINARY in /etc/sgml/catalog"
+ echo "$SGML_POINTER \"$SGML_ORDINARY\"" >> /etc/sgml/catalog
+@@ -129,7 +129,7 @@
+ # set -x
+ # rm $SGML_ORDINARY
+ echo "`basename $0`: removal of $SGML_ORDINARY from /etc/sgml/catalog"
+- sed -e "\:$SGML_POINTER \+\"\?$SGML_ORDINARY\"\?\>:d" /etc/sgml/catalog \
++ sed -e "\:$SGML_POINTER \+\"\?$SGML_ORDINARY\"\?[ ]*$:d" /etc/sgml/catalog \
+ > /etc/sgml/catalog.new
+ mv /etc/sgml/catalog.new /etc/sgml/catalog
+ ;;
+
+Diff finished at Thu Nov 28 16:42:05
diff --git a/packaging/sgml-skel.spec b/packaging/sgml-skel.spec
new file mode 100644
index 0000000..5ced5d7
--- /dev/null
+++ b/packaging/sgml-skel.spec
@@ -0,0 +1,76 @@
+Name: sgml-skel
+Version: 0.6
+Release: 0
+License: GPL-2.0+
+Summary: Helper Scripts for the SGML System
+Group: Productivity/Publishing/SGML
+# 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
+Patch0: sgml-skel-regcat.diff
+Patch1: sgml-skel-regcat2.diff
+Patch2: sgml-skel-edit-cat.diff
+BuildRequires: automake
+BuildRequires: libxml2-tools
+Requires(pre): /bin/awk
+Requires(pre): /bin/chmod
+Requires(pre): /bin/mv
+Requires: libxml2-tools
+BuildRoot: %{_tmppath}/%{name}-%{version}-build
+BuildArch: noarch
+
+%description
+These scripts will help prepare and maintain parts of an SGML system.
+
+%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
+%patch0 -p 1
+%patch1 -p 1
+# # cp -p $RPM_SOURCE_DIR/%{name}-README.SuSE .
+cp %{SOURCE1} .
+cp %{SOURCE2} .
+%patch2 -p 0
+
+%build
+# CFLAGS="%{optflags}"
+autoreconf -i -f
+./configure --prefix=%{_prefix} --infodir=%{_infodir} \
+ --datadir=%{_datadir} --mandir=%{_mandir} \
+ --build $RPM_ARCH-%vendor-linux
+
+%install
+%make_install
+%{INSTALL_SCRIPT} install-catalog.in %{buildroot}%{_bindir}/install-catalog
+%{INSTALL_SCRIPT} edit-xml-catalog.sh \
+ %{buildroot}%{_bindir}/edit-xml-catalog
+ln -sf sgml2xmlcat.sh %{buildroot}%{_bindir}/sgmlcat2x.sh
+ln -sf install-catalog %{buildroot}%{_bindir}/install-catalog.sh
+%{INSTALL_DIR} %{buildroot}%{sgmldir}
+%{INSTALL_DIR} %{buildroot}%{_sysconfdir}/{sgml,xml}
+%{INSTALL_DIR} %{buildroot}%{_localstatedir}/lib/sgml
+touch %{buildroot}%{_sysconfdir}/sgml/catalog
+xmlcatalog --noout --create %{buildroot}%{_sysconfdir}/xml/tizen-catalog.xml
+xmlcatalog --noout --create %{buildroot}%{_sysconfdir}/xml/catalog
+xmlcatalog --noout --add "nextCatalog" "tizen-catalog.xml" "tizen-catalog.xml" \
+ %{buildroot}%{_sysconfdir}/xml/catalog
+
+%files
+%defattr(-, root, root)
+%doc AUTHORS COPYING NEWS README*
+%ghost %{_sysconfdir}/sgml/catalog
+%ghost %{_sysconfdir}/xml/tizen-catalog.xml
+%config %verify(not md5 size mtime) %{_sysconfdir}/xml/catalog
+%dir %{_sysconfdir}/sgml
+%dir %{_sysconfdir}/xml
+%{_bindir}/*
+%dir %{_localstatedir}/lib/sgml
+
+%changelog