odoc.spec 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. ##
  2. ## odoc.spec -- OpenPKG RPM Package Specification
  3. ## Copyright (c) 2000-2005 OpenPKG Foundation e.V. <http://openpkg.net/>
  4. ## Copyright (c) 2000-2005 Ralf S. Engelschall <http://engelschall.com/>
  5. ##
  6. ## Permission to use, copy, modify, and distribute this software for
  7. ## any purpose with or without fee is hereby granted, provided that
  8. ## the above copyright notice and this permission notice appear in all
  9. ## copies.
  10. ##
  11. ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  12. ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  13. ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  14. ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
  15. ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  16. ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  17. ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  18. ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  19. ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  20. ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  21. ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  22. ## SUCH DAMAGE.
  23. ##
  24. # package information
  25. Name: odoc
  26. Summary: Extended OpenPKG Documentation Support
  27. URL: -
  28. Vendor: OpenPKG
  29. Packager: OpenPKG
  30. Distribution: OpenPKG
  31. Class: EVAL
  32. Group: Development
  33. License: GPL
  34. Version: 20050824
  35. Release: 20050824
  36. # list of sources
  37. Source0: odoc
  38. Source1: odoc.8
  39. Source2: odoc.apache
  40. # build information
  41. Prefix: %{l_prefix}
  42. BuildRoot: %{l_buildroot}
  43. BuildPreReq: OpenPKG, openpkg >= 20040130
  44. PreReq: OpenPKG, openpkg >= 20040130
  45. AutoReq: no
  46. AutoReqProv: no
  47. %description
  48. Odoc provides the "openpkg odoc" command, that aids in installing
  49. browsable HTML docs. See "openpkg man odoc" after installation.
  50. %track
  51. # no external stuff
  52. %prep
  53. # nothing to do
  54. %build
  55. # nothing to do
  56. %install
  57. rm -rf $RPM_BUILD_ROOT
  58. # generate temporary installation tree
  59. %{l_shtool} mkdir -f -p -m 755 \
  60. $RPM_BUILD_ROOT%{l_prefix}/libexec/openpkg \
  61. $RPM_BUILD_ROOT%{l_prefix}/share/openpkg \
  62. $RPM_BUILD_ROOT%{l_prefix}/share/openpkg/docs
  63. # copy files into temporary installation tree
  64. %{l_shtool} install -c -m 755 %{l_value -s -a} \
  65. %{SOURCE odoc} $RPM_BUILD_ROOT%{l_prefix}/libexec/openpkg/
  66. %{l_shtool} install -c -m 644 %{l_value -s -a} \
  67. %{SOURCE odoc.8} $RPM_BUILD_ROOT%{l_prefix}/libexec/openpkg/
  68. %{l_shtool} install -c -m 644 %{l_value -s -a} \
  69. %{SOURCE odoc.apache} $RPM_BUILD_ROOT%{l_prefix}/share/openpkg/docs/
  70. # determine installation files
  71. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  72. %files -f files
  73. %clean
  74. rm -rf $RPM_BUILD_ROOT
  75. %post
  76. if [ $1 -eq 1 ]; then
  77. # hook into OpenPKG bootstrap
  78. echo "%%l_odoc %%""{l_prefix}/libexec/openpkg/odoc" | \
  79. %{l_rpmtool} config \
  80. -a -i "$RPM_INSTALL_PREFIX:odoc" $RPM_INSTALL_PREFIX/etc/openpkg/rpmmacros
  81. fi
  82. exit 0
  83. %postun
  84. if [ $1 -eq 0 ]; then
  85. # unhook from OpenPKG bootstrap
  86. %{l_rpmtool} config \
  87. -r -i "$RPM_INSTALL_PREFIX:odoc" $RPM_INSTALL_PREFIX/etc/openpkg/rpmmacros
  88. fi
  89. exit 0
  90. # make it more (re|in)sistant against openpkg's with new rpmmacros
  91. %triggerin -- openpkg
  92. if [ $1 -eq 1 ]; then
  93. # hook into OpenPKG bootstrap
  94. echo "%%l_odoc %%""{l_prefix}/libexec/openpkg/odoc" | \
  95. %{l_rpmtool} config \
  96. -a -i "$RPM_INSTALL_PREFIX:odoc" $RPM_INSTALL_PREFIX/etc/openpkg/rpmmacros
  97. fi
  98. exit 0