Import new package spec for introduction into repository.

Fri, 09 Jan 2009 17:17:28 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Fri, 09 Jan 2009 17:17:28 +0100
changeset 60
e72e671d6f8c
parent 59
65ddf2e1fe94
child 61
0bdf5a6a5ccc

Import new package spec for introduction into repository.

xmlbasedsrs/xmlbasedsrs.spec file | annotate | diff | comparison | revisions
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/xmlbasedsrs/xmlbasedsrs.spec	Fri Jan 09 17:17:28 2009 +0100
     1.3 @@ -0,0 +1,143 @@
     1.4 +##
     1.5 +##  xmlbasedsrs.spec -- OpenPKG RPM Package Specification
     1.6 +##  Copyright (c) 2006 Spacenet AG <http://www.space.net/>
     1.7 +##  Copyright (c) 2006 Michael Schloh von Bennewitz <michael@schloh.com>
     1.8 +##
     1.9 +##  Permission to use, copy, modify, and distribute this software for
    1.10 +##  any purpose with or without fee is hereby granted, provided that
    1.11 +##  the above copyright notice and this permission notice appear in all
    1.12 +##  copies.
    1.13 +##
    1.14 +##  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
    1.15 +##  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
    1.16 +##  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
    1.17 +##  IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
    1.18 +##  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
    1.19 +##  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
    1.20 +##  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
    1.21 +##  USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
    1.22 +##  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
    1.23 +##  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
    1.24 +##  OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
    1.25 +##  SUCH DAMAGE.
    1.26 +##
    1.27 +
    1.28 +#   package information
    1.29 +Name:         xmlbasedsrs
    1.30 +Summary:      Software requirements specifications (SRS) DTD and tools
    1.31 +URL:          http://xmlbasedsrs.tigris.org/
    1.32 +Vendor:       Tigris
    1.33 +Packager:     Spacenet
    1.34 +Distribution: Spacenet
    1.35 +Class:        EVAL
    1.36 +Group:        SGML
    1.37 +License:      GPL
    1.38 +Version:      0.1
    1.39 +Release:      20090106
    1.40 +
    1.41 +#   list of sources
    1.42 +Source0:      http://xmlbasedsrs.tigris.org/files/documents/673/3179/xmlbasedsrs-%{version}.tar.gz
    1.43 +
    1.44 +#   build information
    1.45 +Prefix:       %{l_prefix}
    1.46 +BuildRoot:    %{l_buildroot}
    1.47 +BuildPreReq:  OpenPKG, openpkg >= 20040130, sgml, libxslt, perl
    1.48 +PreReq:       OpenPKG, openpkg >= 20040130, sgml, libxslt, perl
    1.49 +AutoReq:      no
    1.50 +AutoReqProv:  no
    1.51 +
    1.52 +%description
    1.53 +    The goal of xmlbasedsrc is to define the DTD used for Software
    1.54 +    Requirements Specifications (SRS) and provide useful tools to
    1.55 +    transform a XML based SRS document to useful formats. This
    1.56 +    distribution includes basic transformation XSL stylesheets to
    1.57 +    improve software development through requirements engineering.
    1.58 +
    1.59 +%track
    1.60 +    prog xmlbasedsrs = {
    1.61 +        version   = %{version}
    1.62 +        url       = http://xmlbasedsrs.tigris.org/files/documents/673/3179/
    1.63 +        regex     = xmlbasedsrs-(__VER__)\.tar\.gz
    1.64 +    }
    1.65 +
    1.66 +%prep
    1.67 +    #   unpack sources
    1.68 +    %setup -q -n xmlbasedsrs
    1.69 +
    1.70 +    #   create a utility to generate new SRS from template
    1.71 +    ( echo "#! /bin/sh"
    1.72 +      echo "mkdir newsrs"
    1.73 +      echo "( cd newsrs || exit -1"
    1.74 +      echo "  ln -s %{l_prefix}/share/sgml/xmlbasedsrs-xml/dtd/srs.dtd"
    1.75 +      echo "  cp %{l_prefix}/share/sgml/xmlbasedsrs-xml/xml/filesToDiff.xml ."
    1.76 +      echo "  cp %{l_prefix}/share/sgml/xmlbasedsrs-xml/xml/srs.xml ."
    1.77 +      echo ") || echo 'Failed.'"
    1.78 +    ) >newsrs_tmpl
    1.79 +    chmod +x newsrs_tmpl
    1.80 +
    1.81 +    #   correct hard coded variable text
    1.82 +    %{l_shtool} subst \
    1.83 +        -e 's;\(xsltproc\);%{l_prefix}/bin/\1;g' \
    1.84 +        -e 's;^#!/usr/bin/perl;#! %{l_prefix}/bin/perl;' \
    1.85 +        -e 's;$XML_DIR\."/\(filesToDiff\.xml\)";"./\1";' \
    1.86 +        -e 's;^\(@XSL_FILES\)\ *=\ *\((.*\)"intro",\ *\(.*\);\1 = \2\3;' \
    1.87 +        -e 's;^\(\$SRS_ROOT\)\ *=\ *"/home/lapsystems/Projects/xmlbasedsrs";\1 = "%{l_prefix}/share/sgml/xmlbasedsrs-xml";;' \
    1.88 +        bin/gsrs
    1.89 +
    1.90 +#    #   lump nonfunctional and functional requirements together
    1.91 +#    %{l_shtool} subst \
    1.92 +#        -e 's;\([Nn]on\)\ \([Ff]unctional\ [Rr]equirements\);(\1)\2;' \
    1.93 +#        dtd/srs.dtd \
    1.94 +#        xsl/imp_standard.xsl \
    1.95 +#        xsl/print.xsl
    1.96 +
    1.97 +    #   remove obscured attribution text until correctly implemented
    1.98 +    %{l_shtool} subst \
    1.99 +        -e 's;\ *<a href="http://xmlbasedsrs\.tigris\.org">xmlbasedsrs\.tigris\.org</a>\ *;;' \
   1.100 +        xsl/imp_standard.xsl
   1.101 +
   1.102 +%build
   1.103 +
   1.104 +%install
   1.105 +    rm -rf $RPM_BUILD_ROOT
   1.106 +
   1.107 +    #   create installation hierarchy
   1.108 +    %{l_shtool} mkdir -f -p -m 755 \
   1.109 +        $RPM_BUILD_ROOT%{l_prefix}/bin \
   1.110 +        $RPM_BUILD_ROOT%{l_prefix}/share/sgml/xmlbasedsrs-xml
   1.111 +
   1.112 +    #   install xsltproc(1) wrapper
   1.113 +    %{l_shtool} install -m 755 \
   1.114 +        bin/gsrs \
   1.115 +        newsrs_tmpl \
   1.116 +        $RPM_BUILD_ROOT%{l_prefix}/bin/
   1.117 +
   1.118 +    #   clean sources
   1.119 +    rmdir bin
   1.120 +    rm INSTALL
   1.121 +
   1.122 +    #   install XML based SRS DTD
   1.123 +    cp -r * $RPM_BUILD_ROOT%{l_prefix}/share/sgml/xmlbasedsrs-xml/
   1.124 +
   1.125 +    #   determine file list
   1.126 +    %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
   1.127 +        %{l_files_std} \
   1.128 +        '%not %dir %{l_prefix}/share/sgml'
   1.129 +
   1.130 +%files -f files
   1.131 +
   1.132 +%clean
   1.133 +    rm -rf $RPM_BUILD_ROOT
   1.134 +
   1.135 +%post
   1.136 +#    if [ $1 -eq 1 ]; then
   1.137 +#        $RPM_INSTALL_PREFIX/bin/sgmlcatalog \
   1.138 +#            -? compile similar to docbook package
   1.139 +#    fi
   1.140 +
   1.141 +%preun
   1.142 +#    if [ $1 -eq 0 ]; then
   1.143 +#        $RPM_INSTALL_PREFIX/bin/sgmlcatalog \
   1.144 +#            -? compile similar to docbook package
   1.145 +#    fi
   1.146 +

mercurial