xmlbasedsrs/xmlbasedsrs.spec

changeset 244
c81553da0489
parent 62
53785d38f0e4
child 248
cee99faf0afd
equal deleted inserted replaced
1:8363db119852 2:4c44b5b3f9df
1 ## 1 ##
2 ## xmlbasedsrs.spec -- OpenPKG RPM Package Specification 2 ## xmlbasedsrs.spec -- OpenPKG RPM Package Specification
3 ## Copyright (c) 2009 Michael Schloh von Bennewitz <michael@schloh.com> 3 ## Copyright (c) 2010 Michael Schloh von Bennewitz <michael@schloh.com>
4 ## 4 ##
5 ## Permission to use, copy, modify, and distribute this software for 5 ## Permission to use, copy, modify, and distribute this software for
6 ## any purpose with or without fee is hereby granted, provided that 6 ## any purpose with or without fee is hereby granted, provided that
7 ## the above copyright notice and this permission notice appear in all 7 ## the above copyright notice and this permission notice appear in all
8 ## copies. 8 ## copies.
25 Name: xmlbasedsrs 25 Name: xmlbasedsrs
26 Summary: Software requirements specifications (SRS) DTD and tools 26 Summary: Software requirements specifications (SRS) DTD and tools
27 URL: http://xmlbasedsrs.tigris.org/ 27 URL: http://xmlbasedsrs.tigris.org/
28 Vendor: Tigris 28 Vendor: Tigris
29 Packager: Michael Schloh von Bennewitz 29 Packager: Michael Schloh von Bennewitz
30 Distribution: MSvB Recherche Production 30 Distribution: Michael Schloh von Bennewitz
31 Class: EVAL 31 Class: EVAL
32 Group: SGML 32 Group: SGML
33 License: GPL 33 License: GPL
34 Version: 0.1 34 Version: 0.1
35 Release: 20090106 35 Release: 20100512
36 36
37 # list of sources 37 # list of sources
38 Source0: http://xmlbasedsrs.tigris.org/files/documents/673/3179/xmlbasedsrs-%{version}.tar.gz 38 Source0: http://xmlbasedsrs.tigris.org/files/documents/673/3179/xmlbasedsrs-%{version}.tar.gz
39 39
40 # build information 40 # build information
61 61
62 %prep 62 %prep
63 # unpack sources 63 # unpack sources
64 %setup -q -n xmlbasedsrs 64 %setup -q -n xmlbasedsrs
65 65
66 # rename projplan doc from defunct
67 mv xsl/mrproject.xsl xsl/planner.xsl
68
66 # create a utility to generate new SRS from template 69 # create a utility to generate new SRS from template
67 ( echo "#! /bin/sh" 70 ( echo "#! /bin/sh"
68 echo "mkdir newsrs" 71 echo "mkdir srsnew"
69 echo "( cd newsrs || exit -1" 72 echo "( cd srsnew || exit -1"
70 echo " ln -s %{l_prefix}/share/sgml/xmlbasedsrs-xml/dtd/srs.dtd" 73 echo " ln -s %{l_prefix}/share/sgml/xmlbasedsrs-xml/dtd/srs.dtd"
71 echo " cp %{l_prefix}/share/sgml/xmlbasedsrs-xml/xml/filesToDiff.xml ." 74 echo " cp %{l_prefix}/share/sgml/xmlbasedsrs-xml/xml/filesToDiff.xml ."
72 echo " cp %{l_prefix}/share/sgml/xmlbasedsrs-xml/xml/srs.xml ." 75 echo " cp %{l_prefix}/share/sgml/xmlbasedsrs-xml/xml/srs.xml ."
73 echo ") || echo 'Failed.'" 76 echo ") || echo 'Failed.'"
74 ) >newsrs_tmpl 77 ) >newsrs
75 chmod +x newsrs_tmpl 78 chmod +x newsrs
76 79
77 # correct hard coded variable text 80 # correct hard coded variable text
78 %{l_shtool} subst \ 81 %{l_shtool} subst \
79 -e 's;\(xsltproc\);%{l_prefix}/bin/\1;g' \ 82 -e 's;\(xsltproc\);%{l_prefix}/bin/\1;g' \
80 -e 's;^#!/usr/bin/perl;#! %{l_prefix}/bin/perl;' \ 83 -e 's;^#!/usr/bin/perl;#! %{l_prefix}/bin/perl;' \
81 -e 's;$XML_DIR\."/\(filesToDiff\.xml\)";"./\1";' \ 84 -e 's;$XML_DIR\."/\(filesToDiff\.xml\)";"./\1";' \
82 -e 's;^\(@XSL_FILES\)\ *=\ *\((.*\)"intro",\ *\(.*\);\1 = \2\3;' \ 85 -e 's;^\(@XSL_FILES\)\ *=\ *\((.*\)"intro",\ *\(.*\);\1 = \2\3;' \
83 -e 's;^\(\$SRS_ROOT\)\ *=\ *"/home/lapsystems/Projects/xmlbasedsrs";\1 = "%{l_prefix}/share/sgml/xmlbasedsrs-xml";;' \ 86 -e 's;^\(\$SRS_ROOT\)\ *=\ *"/home/lapsystems/Projects/xmlbasedsrs";\1 = "%{l_prefix}/share/sgml/xmlbasedsrs-xml";;' \
84 bin/gsrs 87 bin/gsrs
88 %{l_shtool} subst \
89 -e 's;mrproject;planner;g' \
90 -e 's;MrProject;ProjPlan;g' \
91 xsl/imp_standard.xsl \
92 bin/gsrs
93 %{l_shtool} subst \
94 -e 's;\(<file>\).*\(filesToDiff.xml\);\1\2;' \
95 xml/filesToDiff.xml
85 96
86 # # lump nonfunctional and functional requirements together 97 # # lump nonfunctional and functional requirements together
87 # %{l_shtool} subst \ 98 # %{l_shtool} subst \
88 # -e 's;\([Nn]on\)\ \([Ff]unctional\ [Rr]equirements\);(\1)\2;' \ 99 # -e 's;\([Nn]on\)\ \([Ff]unctional\ [Rr]equirements\);(\1)\2;' \
89 # dtd/srs.dtd \ 100 # dtd/srs.dtd \
106 $RPM_BUILD_ROOT%{l_prefix}/share/sgml/xmlbasedsrs-xml 117 $RPM_BUILD_ROOT%{l_prefix}/share/sgml/xmlbasedsrs-xml
107 118
108 # install xsltproc(1) wrapper 119 # install xsltproc(1) wrapper
109 %{l_shtool} install -m 755 \ 120 %{l_shtool} install -m 755 \
110 bin/gsrs \ 121 bin/gsrs \
111 newsrs_tmpl \ 122 newsrs \
112 $RPM_BUILD_ROOT%{l_prefix}/bin/ 123 $RPM_BUILD_ROOT%{l_prefix}/bin/
113 124
114 # clean sources 125 # clean sources
115 rmdir bin 126 rmdir bin
116 rm INSTALL 127 rm INSTALL

mercurial