bird.spec 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. ##
  2. ## bird.spec -- OpenPKG RPM Package Specification
  3. ## Copyright (c) 2000-2022 OpenPKG Project <http://openpkg.org/>
  4. ##
  5. ## Permission to use, copy, modify, and distribute this software for
  6. ## any purpose with or without fee is hereby granted, provided that
  7. ## the above copyright notice and this permission notice appear in all
  8. ## copies.
  9. ##
  10. ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  11. ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  12. ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  13. ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
  14. ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  15. ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  16. ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  17. ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  18. ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  19. ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  20. ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  21. ## SUCH DAMAGE.
  22. ##
  23. # package information
  24. Name: bird
  25. Summary: BIRD Internet Routing Daemon
  26. URL: http://bird.network.cz/
  27. Vendor: L. Forst, M. Mare, P. Machek, O. Filip
  28. Packager: OpenPKG Project
  29. Distribution: OpenPKG Community
  30. Class: EVAL
  31. Group: Routing
  32. License: GPL
  33. Version: 2.0.9
  34. Release: 20220220
  35. # list of sources
  36. Source0: ftp://bird.network.cz/pub/bird/bird-%{version}.tar.gz
  37. Source1: rc.bird
  38. Patch0: bird.patch
  39. # build information
  40. BuildPreReq: OpenPKG, openpkg >= 20160101, make, flex, bison, m4
  41. PreReq: OpenPKG, openpkg >= 20160101
  42. BuildPreReq: readline
  43. PreReq: readline
  44. %description
  45. BIRD is an IPv4/IPv6 capable Internet routing daemon supporting
  46. Border Gateway Protocol (BGPv4), Routing Information Protocol
  47. (RIPv2), Open Shortest Path First protocol (OSPFv2), static routes,
  48. inter-table protocol, etc.
  49. %track
  50. prog bird = {
  51. version = %{version}
  52. url = ftp://bird.network.cz/pub/bird/
  53. regex = bird-(\d+\.\d+\.\d+)\.tar\.gz
  54. }
  55. %prep
  56. %setup -q
  57. %patch -p0
  58. %build
  59. # configure package
  60. CC="%{l_cc}" \
  61. CFLAGS="%{l_cflags -O}" \
  62. CPPFLAGS="%{l_cppflags}" \
  63. LDFLAGS="%{l_ldflags}" \
  64. ./configure \
  65. --prefix=%{l_prefix} \
  66. --sysconfdir=%{l_prefix}/etc/bird \
  67. --localstatedir=%{l_prefix}/var/bird \
  68. --with-protocols=all
  69. # build package
  70. %{l_make} %{l_mflags}
  71. %install
  72. # install package
  73. %{l_make} %{l_mflags} install \
  74. prefix=$RPM_BUILD_ROOT%{l_prefix} \
  75. exec_prefix=$RPM_BUILD_ROOT%{l_prefix} \
  76. sysconfdir=$RPM_BUILD_ROOT%{l_prefix}/etc/bird \
  77. localstatedir=$RPM_BUILD_ROOT%{l_prefix}/var/bird
  78. # strip down package
  79. strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
  80. # install run-command script
  81. %{l_shtool} mkdir -f -p -m 755 \
  82. $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d
  83. %{l_shtool} install -c -m 755 %{l_value -s -a} \
  84. %{SOURCE rc.bird} \
  85. $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
  86. # adjust default configuration
  87. %{l_shtool} subst \
  88. -e 's;#log "tmp" all;log "%{l_prefix}/var/bird/bird.log" all;' \
  89. $RPM_BUILD_ROOT%{l_prefix}/etc/bird/bird.conf
  90. # determine installation files
  91. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
  92. %{l_files_std} \
  93. '%config %{l_prefix}/etc/bird/*'
  94. %files -f files
  95. %clean