gated.spec 3.7 KB

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