gated.spec 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. ##
  2. ## gated.spec -- OpenPKG RPM Specification
  3. ## Copyright (c) 2000-2002 Cable & Wireless Deutschland GmbH
  4. ## Copyright (c) 2000-2002 The OpenPKG Project <http://www.openpkg.org/>
  5. ## Copyright (c) 2000-2002 Ralf S. Engelschall <rse@engelschall.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: gated
  27. Summary: Routing Daemon
  28. URL: http://www.gated.org/
  29. Vendor: Merit GateD Consortium
  30. Packager: The OpenPKG Project
  31. Distribution: OpenPKG [EXP]
  32. Group: Net
  33. License: GPL
  34. Version: 3.6
  35. Release: 20011201
  36. # list of sources
  37. Source0: ftp://ftp.gated.merit.edu/net-research/gated/gated-3-6.tar.gz
  38. Source1: gated.8
  39. Source2: gdc.8
  40. Source3: rc.gated
  41. Source4: gated.conf
  42. Patch0: gated-3-6.patch
  43. # build information
  44. Prefix: %{l_prefix}
  45. BuildRoot: %{l_buildroot}
  46. BuildPreReq: OpenPKG, openpkg >= 20011227, gcc, flex, bison
  47. PreReq: OpenPKG, openpkg >= 20011227
  48. AutoReq: no
  49. AutoReqProv: no
  50. %description
  51. GateD is a modular software program consisting of core services
  52. a routing database protocol modules supporting multiple routing
  53. protocols: RIP, OSPF, IS-IS, EGP, BGP, ICMP DVMRP MSDP, PIM-SM, DM,
  54. IGMP, etc.
  55. %prep
  56. %setup -q -n gated-public-3_6
  57. %patch -p0
  58. %build
  59. PATH="%{l_prefix}/bin:$PATH"
  60. export PATH
  61. ( echo 'ac_cv_dir_PIDDIR=${ac_cv_dir_PIDDIR=%{l_prefix}/var/gated}'
  62. echo 'ac_cv_dir_DUMPDIR=${ac_cv_dir_DUMPDIR=%{l_prefix}/var/gated}'
  63. echo 'ac_cv_dir_SBINDIR=${ac_cv_dir_SBINDIR=%{l_prefix}/sbin}'
  64. ) >config.cache
  65. %{l_rpmtool} subst \
  66. 's;/etc/\(.\)s.conf;%{l_prefix}/etc/gated/\1s.conf;' \
  67. -- src/gated/paths.h.in
  68. CC="%{l_cc}" \
  69. CFLAGS="%{l_cflags -O}" \
  70. ./configure \
  71. --prefix=%{l_prefix}
  72. %{l_make} %{l_mflags}
  73. %install
  74. rm -rf $RPM_BUILD_ROOT
  75. %{l_shtool} mkdir -f -p -m 755 \
  76. $RPM_BUILD_ROOT%{l_prefix}/sbin \
  77. $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d \
  78. $RPM_BUILD_ROOT%{l_prefix}/etc/gated \
  79. $RPM_BUILD_ROOT%{l_prefix}/man/man8 \
  80. $RPM_BUILD_ROOT%{l_prefix}/var/gated
  81. %{l_shtool} install -c -s -m 755 \
  82. src/gated/gated src/gdc/gdc \
  83. $RPM_BUILD_ROOT%{l_prefix}/sbin/
  84. %{l_shtool} install -c -m 644 \
  85. %{SOURCE gated.8} %{SOURCE gdc.8} \
  86. $RPM_BUILD_ROOT%{l_prefix}/man/man8/
  87. %{l_shtool} install -c -m 644 -e 's;@l_prefix@;%{l_prefix};g' \
  88. %{SOURCE gated.conf} \
  89. $RPM_BUILD_ROOT%{l_prefix}/etc/gated/
  90. %{l_shtool} install -c -m 755 -e 's;@l_prefix@;%{l_prefix};g' \
  91. %{SOURCE rc.gated} \
  92. $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
  93. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
  94. %{l_files_std} \
  95. '%config %{l_prefix}/etc/gated/gated.conf'
  96. %files -f files
  97. %clean
  98. rm -rf $RPM_BUILD_ROOT