rbldnsd.spec 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. ##
  2. ## rbldnsd.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: rbldnsd
  27. Summary: Realtime Blackhole List (RBL) DNS Daemon
  28. URL: http://www.corpit.ru/mjt/rbldnsd.html
  29. Vendor: Michael Tokarev
  30. Packager: The OpenPKG Project
  31. Distribution: OpenPKG
  32. Class: PLUS
  33. Group: DNS
  34. License: GPL
  35. Version: 0.993.1
  36. Release: 20041011
  37. # package options
  38. %option with_fsl yes
  39. # list of sources
  40. Source0: http://www.corpit.ru/mjt/rbldnsd/rbldnsd-%{version}.tar.gz
  41. Source1: rc.rbldnsd
  42. Source3: fsl.rbldnsd
  43. Source4: rbldnsd.zones
  44. Source5: zone.rbl
  45. Patch0: rbldnsd.patch
  46. # build information
  47. Prefix: %{l_prefix}
  48. BuildRoot: %{l_buildroot}
  49. BuildPreReq: OpenPKG, openpkg >= 20040130
  50. PreReq: OpenPKG, openpkg >= 20040130
  51. %if "%{with_fsl}" == "yes"
  52. BuildPreReq: fsl >= 1.3.0
  53. PreReq: fsl >= 1.3.0
  54. %endif
  55. AutoReq: no
  56. AutoReqProv: no
  57. %description
  58. RBLDNSD is a small authoritate-only DNS nameserver designed to serve
  59. DNS-based blocklists (DNSBLs). It may handle IP-based and name-based
  60. blocklists. It is extremely fast and outperforms BIND greatly. It
  61. has very small memory footprint.
  62. %track
  63. prog rbldnsd = {
  64. version = %{version}
  65. url = http://www.corpit.ru/mjt/rbldnsd/
  66. regex = rbldnsd-(__VER__)\.tar\.gz
  67. }
  68. %prep
  69. %setup -q
  70. %patch -p0
  71. %build
  72. # configure program
  73. CC="%{l_cc}" \
  74. CFLAGS="%{l_cflags -O}" \
  75. CPPFLAGS="%{l_cppflags}" \
  76. LDFLAGS="%{l_ldflags} %{l_fsl_ldflags}" \
  77. LIBS="%{l_fsl_libs}" \
  78. ./configure
  79. # build program
  80. %{l_make} %{l_mflags}
  81. %install
  82. # create installation hierarchy
  83. rm -rf $RPM_BUILD_ROOT
  84. %{l_shtool} mkdir -f -p -m 755 \
  85. $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d \
  86. $RPM_BUILD_ROOT%{l_prefix}/etc/fsl \
  87. $RPM_BUILD_ROOT%{l_prefix}/etc/rbldnsd \
  88. $RPM_BUILD_ROOT%{l_prefix}/sbin \
  89. $RPM_BUILD_ROOT%{l_prefix}/man/man8 \
  90. $RPM_BUILD_ROOT%{l_prefix}/var/rbldnsd
  91. # install program and manual page
  92. %{l_shtool} install -c -s -m 755 \
  93. rbldnsd $RPM_BUILD_ROOT%{l_prefix}/sbin/
  94. %{l_shtool} install -c -m 644 \
  95. rbldnsd.8 $RPM_BUILD_ROOT%{l_prefix}/man/man8/
  96. # install run-command script
  97. %{l_shtool} install -c -m 755 %{l_value -s -a} \
  98. %{SOURCE rc.rbldnsd} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
  99. # install OSSP fsl configuration
  100. %{l_shtool} install -c -m 644 %{l_value -s -a} \
  101. %{SOURCE fsl.rbldnsd} $RPM_BUILD_ROOT%{l_prefix}/etc/fsl/
  102. # install default configuration
  103. %{l_shtool} install -c -m 644 %{l_value -s -a} \
  104. %{SOURCE rbldnsd.zones} %{SOURCE zone.rbl} \
  105. $RPM_BUILD_ROOT%{l_prefix}/etc/rbldnsd/
  106. # determine installation files
  107. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
  108. %{l_files_std} \
  109. '%config %{l_prefix}/etc/rbldnsd/*' \
  110. '%attr(-,%{l_rusr},%{l_rgrp}) %{l_prefix}/var/rbldnsd'
  111. %files -f files
  112. %clean
  113. rm -rf $RPM_BUILD_ROOT