diff -r 65ddf2e1fe94 -r e72e671d6f8c xmlbasedsrs/xmlbasedsrs.spec
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/xmlbasedsrs/xmlbasedsrs.spec Fri Jan 09 17:17:28 2009 +0100
@@ -0,0 +1,143 @@
+##
+## xmlbasedsrs.spec -- OpenPKG RPM Package Specification
+## Copyright (c) 2006 Spacenet AG
+## Copyright (c) 2006 Michael Schloh von Bennewitz
+##
+## Permission to use, copy, modify, and distribute this software for
+## any purpose with or without fee is hereby granted, provided that
+## the above copyright notice and this permission notice appear in all
+## copies.
+##
+## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
+## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+## SUCH DAMAGE.
+##
+
+# package information
+Name: xmlbasedsrs
+Summary: Software requirements specifications (SRS) DTD and tools
+URL: http://xmlbasedsrs.tigris.org/
+Vendor: Tigris
+Packager: Spacenet
+Distribution: Spacenet
+Class: EVAL
+Group: SGML
+License: GPL
+Version: 0.1
+Release: 20090106
+
+# list of sources
+Source0: http://xmlbasedsrs.tigris.org/files/documents/673/3179/xmlbasedsrs-%{version}.tar.gz
+
+# build information
+Prefix: %{l_prefix}
+BuildRoot: %{l_buildroot}
+BuildPreReq: OpenPKG, openpkg >= 20040130, sgml, libxslt, perl
+PreReq: OpenPKG, openpkg >= 20040130, sgml, libxslt, perl
+AutoReq: no
+AutoReqProv: no
+
+%description
+ The goal of xmlbasedsrc is to define the DTD used for Software
+ Requirements Specifications (SRS) and provide useful tools to
+ transform a XML based SRS document to useful formats. This
+ distribution includes basic transformation XSL stylesheets to
+ improve software development through requirements engineering.
+
+%track
+ prog xmlbasedsrs = {
+ version = %{version}
+ url = http://xmlbasedsrs.tigris.org/files/documents/673/3179/
+ regex = xmlbasedsrs-(__VER__)\.tar\.gz
+ }
+
+%prep
+ # unpack sources
+ %setup -q -n xmlbasedsrs
+
+ # create a utility to generate new SRS from template
+ ( echo "#! /bin/sh"
+ echo "mkdir newsrs"
+ echo "( cd newsrs || exit -1"
+ echo " ln -s %{l_prefix}/share/sgml/xmlbasedsrs-xml/dtd/srs.dtd"
+ echo " cp %{l_prefix}/share/sgml/xmlbasedsrs-xml/xml/filesToDiff.xml ."
+ echo " cp %{l_prefix}/share/sgml/xmlbasedsrs-xml/xml/srs.xml ."
+ echo ") || echo 'Failed.'"
+ ) >newsrs_tmpl
+ chmod +x newsrs_tmpl
+
+ # correct hard coded variable text
+ %{l_shtool} subst \
+ -e 's;\(xsltproc\);%{l_prefix}/bin/\1;g' \
+ -e 's;^#!/usr/bin/perl;#! %{l_prefix}/bin/perl;' \
+ -e 's;$XML_DIR\."/\(filesToDiff\.xml\)";"./\1";' \
+ -e 's;^\(@XSL_FILES\)\ *=\ *\((.*\)"intro",\ *\(.*\);\1 = \2\3;' \
+ -e 's;^\(\$SRS_ROOT\)\ *=\ *"/home/lapsystems/Projects/xmlbasedsrs";\1 = "%{l_prefix}/share/sgml/xmlbasedsrs-xml";;' \
+ bin/gsrs
+
+# # lump nonfunctional and functional requirements together
+# %{l_shtool} subst \
+# -e 's;\([Nn]on\)\ \([Ff]unctional\ [Rr]equirements\);(\1)\2;' \
+# dtd/srs.dtd \
+# xsl/imp_standard.xsl \
+# xsl/print.xsl
+
+ # remove obscured attribution text until correctly implemented
+ %{l_shtool} subst \
+ -e 's;\ *xmlbasedsrs\.tigris\.org\ *;;' \
+ xsl/imp_standard.xsl
+
+%build
+
+%install
+ rm -rf $RPM_BUILD_ROOT
+
+ # create installation hierarchy
+ %{l_shtool} mkdir -f -p -m 755 \
+ $RPM_BUILD_ROOT%{l_prefix}/bin \
+ $RPM_BUILD_ROOT%{l_prefix}/share/sgml/xmlbasedsrs-xml
+
+ # install xsltproc(1) wrapper
+ %{l_shtool} install -m 755 \
+ bin/gsrs \
+ newsrs_tmpl \
+ $RPM_BUILD_ROOT%{l_prefix}/bin/
+
+ # clean sources
+ rmdir bin
+ rm INSTALL
+
+ # install XML based SRS DTD
+ cp -r * $RPM_BUILD_ROOT%{l_prefix}/share/sgml/xmlbasedsrs-xml/
+
+ # determine file list
+ %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
+ %{l_files_std} \
+ '%not %dir %{l_prefix}/share/sgml'
+
+%files -f files
+
+%clean
+ rm -rf $RPM_BUILD_ROOT
+
+%post
+# if [ $1 -eq 1 ]; then
+# $RPM_INSTALL_PREFIX/bin/sgmlcatalog \
+# -? compile similar to docbook package
+# fi
+
+%preun
+# if [ $1 -eq 0 ]; then
+# $RPM_INSTALL_PREFIX/bin/sgmlcatalog \
+# -? compile similar to docbook package
+# fi
+