xmlbasedsrs/xmlbasedsrs.spec

Wed, 14 Jan 2009 15:59:12 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 14 Jan 2009 15:59:12 +0100
changeset 86
78e7deb1d6ab
parent 60
e72e671d6f8c
child 244
c81553da0489
permissions
-rw-r--r--

Correct and improve many buildconf and code logic blocks. In particular:
1. Document potential problems building with current binutils releases.
2. Document the flawed webkit and explain its temporary exclusion.
3. Document the edition of Qt which is built and installed.
4. Remove the Solaris x11_supdir logic as it is no longer found.
5. Correct several .pr[io] files including QMAKE_CXXFLAGS and INCPATH,
which previously caused preexisting Qt installations to deliver
erroneous old include and library logic instead of relying on
that of the currently building package. -I/opkg/include is now
placed at the end of the compile statements.
6. Don't trust the QMAKE_[INC|LIB]DIR_X11 identifiers in qmake.conf.
7. Allow more 64-bit builds and more properly identify the platform.
8. Place plugins (which are shared objects) in lib instead of share.
9. Build components as plugins when possible if with_shared is enabled.
10. Translate German text to English to be more consistent.
11. Instead of removing the pkgconfig directory of with_shared builds,
place it in a child directory useful for shared building.
12. Document the nonstandard shared build directory structure,
including using the hidden pkgconfig directory (PKG_CONFIG_PATH.)
13. Change %doc to specify files rather than directories in the RPM DB.

michael@60 1 ##
michael@60 2 ## xmlbasedsrs.spec -- OpenPKG RPM Package Specification
michael@62 3 ## Copyright (c) 2009 Michael Schloh von Bennewitz <michael@schloh.com>
michael@60 4 ##
michael@60 5 ## Permission to use, copy, modify, and distribute this software for
michael@60 6 ## any purpose with or without fee is hereby granted, provided that
michael@60 7 ## the above copyright notice and this permission notice appear in all
michael@60 8 ## copies.
michael@60 9 ##
michael@60 10 ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
michael@60 11 ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
michael@60 12 ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
michael@60 13 ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
michael@60 14 ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
michael@60 15 ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
michael@60 16 ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
michael@60 17 ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
michael@60 18 ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
michael@60 19 ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
michael@60 20 ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
michael@60 21 ## SUCH DAMAGE.
michael@60 22 ##
michael@60 23
michael@60 24 # package information
michael@60 25 Name: xmlbasedsrs
michael@60 26 Summary: Software requirements specifications (SRS) DTD and tools
michael@60 27 URL: http://xmlbasedsrs.tigris.org/
michael@60 28 Vendor: Tigris
michael@62 29 Packager: Michael Schloh von Bennewitz
michael@62 30 Distribution: MSvB Recherche Production
michael@60 31 Class: EVAL
michael@60 32 Group: SGML
michael@60 33 License: GPL
michael@60 34 Version: 0.1
michael@60 35 Release: 20090106
michael@60 36
michael@60 37 # list of sources
michael@60 38 Source0: http://xmlbasedsrs.tigris.org/files/documents/673/3179/xmlbasedsrs-%{version}.tar.gz
michael@60 39
michael@60 40 # build information
michael@60 41 Prefix: %{l_prefix}
michael@60 42 BuildRoot: %{l_buildroot}
michael@60 43 BuildPreReq: OpenPKG, openpkg >= 20040130, sgml, libxslt, perl
michael@60 44 PreReq: OpenPKG, openpkg >= 20040130, sgml, libxslt, perl
michael@60 45 AutoReq: no
michael@60 46 AutoReqProv: no
michael@60 47
michael@60 48 %description
michael@60 49 The goal of xmlbasedsrc is to define the DTD used for Software
michael@60 50 Requirements Specifications (SRS) and provide useful tools to
michael@60 51 transform a XML based SRS document to useful formats. This
michael@60 52 distribution includes basic transformation XSL stylesheets to
michael@60 53 improve software development through requirements engineering.
michael@60 54
michael@60 55 %track
michael@60 56 prog xmlbasedsrs = {
michael@60 57 version = %{version}
michael@60 58 url = http://xmlbasedsrs.tigris.org/files/documents/673/3179/
michael@60 59 regex = xmlbasedsrs-(__VER__)\.tar\.gz
michael@60 60 }
michael@60 61
michael@60 62 %prep
michael@60 63 # unpack sources
michael@60 64 %setup -q -n xmlbasedsrs
michael@60 65
michael@60 66 # create a utility to generate new SRS from template
michael@60 67 ( echo "#! /bin/sh"
michael@60 68 echo "mkdir newsrs"
michael@60 69 echo "( cd newsrs || exit -1"
michael@60 70 echo " ln -s %{l_prefix}/share/sgml/xmlbasedsrs-xml/dtd/srs.dtd"
michael@60 71 echo " cp %{l_prefix}/share/sgml/xmlbasedsrs-xml/xml/filesToDiff.xml ."
michael@60 72 echo " cp %{l_prefix}/share/sgml/xmlbasedsrs-xml/xml/srs.xml ."
michael@60 73 echo ") || echo 'Failed.'"
michael@60 74 ) >newsrs_tmpl
michael@60 75 chmod +x newsrs_tmpl
michael@60 76
michael@60 77 # correct hard coded variable text
michael@60 78 %{l_shtool} subst \
michael@60 79 -e 's;\(xsltproc\);%{l_prefix}/bin/\1;g' \
michael@60 80 -e 's;^#!/usr/bin/perl;#! %{l_prefix}/bin/perl;' \
michael@60 81 -e 's;$XML_DIR\."/\(filesToDiff\.xml\)";"./\1";' \
michael@60 82 -e 's;^\(@XSL_FILES\)\ *=\ *\((.*\)"intro",\ *\(.*\);\1 = \2\3;' \
michael@60 83 -e 's;^\(\$SRS_ROOT\)\ *=\ *"/home/lapsystems/Projects/xmlbasedsrs";\1 = "%{l_prefix}/share/sgml/xmlbasedsrs-xml";;' \
michael@60 84 bin/gsrs
michael@60 85
michael@60 86 # # lump nonfunctional and functional requirements together
michael@60 87 # %{l_shtool} subst \
michael@60 88 # -e 's;\([Nn]on\)\ \([Ff]unctional\ [Rr]equirements\);(\1)\2;' \
michael@60 89 # dtd/srs.dtd \
michael@60 90 # xsl/imp_standard.xsl \
michael@60 91 # xsl/print.xsl
michael@60 92
michael@60 93 # remove obscured attribution text until correctly implemented
michael@60 94 %{l_shtool} subst \
michael@60 95 -e 's;\ *<a href="http://xmlbasedsrs\.tigris\.org">xmlbasedsrs\.tigris\.org</a>\ *;;' \
michael@60 96 xsl/imp_standard.xsl
michael@60 97
michael@60 98 %build
michael@60 99
michael@60 100 %install
michael@60 101 rm -rf $RPM_BUILD_ROOT
michael@60 102
michael@60 103 # create installation hierarchy
michael@60 104 %{l_shtool} mkdir -f -p -m 755 \
michael@60 105 $RPM_BUILD_ROOT%{l_prefix}/bin \
michael@60 106 $RPM_BUILD_ROOT%{l_prefix}/share/sgml/xmlbasedsrs-xml
michael@60 107
michael@60 108 # install xsltproc(1) wrapper
michael@60 109 %{l_shtool} install -m 755 \
michael@60 110 bin/gsrs \
michael@60 111 newsrs_tmpl \
michael@60 112 $RPM_BUILD_ROOT%{l_prefix}/bin/
michael@60 113
michael@60 114 # clean sources
michael@60 115 rmdir bin
michael@60 116 rm INSTALL
michael@60 117
michael@60 118 # install XML based SRS DTD
michael@60 119 cp -r * $RPM_BUILD_ROOT%{l_prefix}/share/sgml/xmlbasedsrs-xml/
michael@60 120
michael@60 121 # determine file list
michael@60 122 %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
michael@60 123 %{l_files_std} \
michael@60 124 '%not %dir %{l_prefix}/share/sgml'
michael@60 125
michael@60 126 %files -f files
michael@60 127
michael@60 128 %clean
michael@60 129 rm -rf $RPM_BUILD_ROOT
michael@60 130
michael@60 131 %post
michael@60 132 # if [ $1 -eq 1 ]; then
michael@60 133 # $RPM_INSTALL_PREFIX/bin/sgmlcatalog \
michael@60 134 # -? compile similar to docbook package
michael@60 135 # fi
michael@60 136
michael@60 137 %preun
michael@60 138 # if [ $1 -eq 0 ]; then
michael@60 139 # $RPM_INSTALL_PREFIX/bin/sgmlcatalog \
michael@60 140 # -? compile similar to docbook package
michael@60 141 # fi
michael@60 142

mercurial