cfg.spec 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. ##
  2. ## cfg.spec -- OpenPKG RPM Specification
  3. ## Copyright (c) 2000-2004 The OpenPKG Project <http://www.openpkg.org/>
  4. ## Copyright (c) 2000-2004 Ralf S. Engelschall <rse@engelschall.com>
  5. ## Copyright (c) 2000-2004 Cable & Wireless <http://www.cw.com/>
  6. ##
  7. ## Permission to use, copy, modify, and distribute this software for
  8. ## any purpose with or without fee is hereby granted, provided that
  9. ## the above copyright notice and this permission notice appear in all
  10. ## copies.
  11. ##
  12. ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  13. ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  14. ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  15. ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
  16. ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  17. ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  18. ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  19. ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  20. ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  21. ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  22. ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  23. ## SUCH DAMAGE.
  24. ##
  25. # package information
  26. Name: cfg
  27. Summary: Configuration Parsing Library
  28. URL: http://www.ossp.org/pkg/lib/cfg/
  29. Vendor: The OSSP Project
  30. Packager: The OpenPKG Project
  31. Distribution: OpenPKG
  32. Class: EVAL
  33. Group: System
  34. License: MIT-style
  35. Version: 0.9.4
  36. Release: 20041031
  37. # list of sources
  38. Source0: ftp://ftp.ossp.org/pkg/lib/cfg/cfg-%{version}.tar.gz
  39. # build information
  40. Prefix: %{l_prefix}
  41. BuildRoot: %{l_buildroot}
  42. BuildPreReq: OpenPKG, openpkg >= 20040130, gcc
  43. PreReq: OpenPKG, openpkg >= 20040130
  44. AutoReq: no
  45. AutoReqProv: no
  46. %description
  47. OSSP cfg is a ISO-C library for parsing arbitrary C/C++-style
  48. configuration files. A configuration is sequence of directives. Each
  49. directive consists of zero or more tokens. Each token can be either
  50. a string or again a complete sequence. This means the configuration
  51. syntax has a recursive structure and this way allows to create
  52. configurations with arbitrarily nested sections.
  53. Additionally the configuration syntax provides complex
  54. single/double/balanced quoting of tokens, hexadecimal/octal/decimal
  55. character encodings, character escaping, C/C++ and Shell-style
  56. comments, etc. The library API allows importing a configuration text
  57. into an Abstract Syntax Tree (AST), traversing the AST and optionally
  58. exporting the AST again as a configuration text.
  59. %track
  60. prog cfg = {
  61. version = %{version}
  62. url = ftp://ftp.ossp.org/pkg/lib/cfg/
  63. regex = cfg-(__VER__)\.tar\.gz
  64. }
  65. %prep
  66. %setup -q
  67. %build
  68. CC="%{l_cc}" \
  69. CFLAGS="%{l_cflags -O}" \
  70. ./configure \
  71. --prefix=%{l_prefix} \
  72. --disable-shared
  73. %{l_make} %{l_mflags}
  74. %install
  75. rm -rf $RPM_BUILD_ROOT
  76. %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT
  77. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  78. %files -f files
  79. %clean
  80. rm -rf $RPM_BUILD_ROOT