powerdns.spec 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172
  1. ##
  2. ## powerdns.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. # FIXME mlelstv - JUNK because not well tested and no config
  26. # package information
  27. Name: powerdns
  28. Summary: PowerDNS high performance authoritative-only name server
  29. URL: http://www.powerdns.com/products/powerdns/
  30. Vendor: PowerDNS.COM BV
  31. Packager: The OpenPKG Project
  32. Distribution: OpenPKG [JUNK]
  33. Group: unknown
  34. License: GPL
  35. Version: 2.9.6
  36. Release: 20030227
  37. # list of sources
  38. Source0: http://downloads.powerdns.com/releases/pdns-%{version}.tar.gz
  39. Source1: rc.powerdns
  40. Source2: fsl.powerdns
  41. # package options
  42. %option with_pipe no
  43. %option with_mysql no
  44. %option with_pgsql no
  45. # build information
  46. Prefix: %{l_prefix}
  47. BuildRoot: %{l_buildroot}
  48. BuildPreReq: OpenPKG, openpkg >= 20021204
  49. %if "%{with_mysql}" == "yes"
  50. BuildPreReq: MYSQL
  51. %endif
  52. %if "%{with_pgsql}" == "yes"
  53. BuildPreReq: postgresql
  54. %endif
  55. PreReq: OpenPKG, openpkg >= 20021204
  56. %if "%{with_mysql}" == "yes"
  57. PreReq: MYSQL
  58. %endif
  59. %if "%{with_pgsql}" == "yes"
  60. PreReq: postgresql
  61. %endif
  62. AutoReq: no
  63. AutoReqProv: no
  64. %description
  65. The PowerDNS name server is a modern, advanced and high performance
  66. authoritative-only nameserver. It is written from scratch and conforms
  67. to all the relevant DNS standards documents.
  68. The PowerDNS name server utilizes a flexible backend architecture which
  69. can access DNS information from any data source. This includes file
  70. formats, Bind zone files, relational databases or LDAP directories.
  71. By connecting directly to a database, no 'reloading' is needed. Changes
  72. committed to the database are effective immediately.
  73. If you have specific needs for your DNS infrastructure then you can use
  74. the Backend Developers Kit to write the 'glue' between PowerDNS and your
  75. data or logic.
  76. Since version 2.9, PowerDNS is licensed under GNU General Public License
  77. version 2.
  78. %prep
  79. %setup -q -n pdns-%{version}
  80. %build
  81. MODULES=""
  82. %if "%{with_pipe}" == "yes"
  83. MODULES="$MODULES pipe"
  84. %endif
  85. %if "%{with_mysql}" == "yes"
  86. MODULES="$MODULES gmysql"
  87. %endif
  88. %if "%{with_pgsql}" == "yes"
  89. MODULES="$MODULES gpgsql"
  90. %endif
  91. MODULES=`echo "$MODULES" | sed 's;^ ;;'`
  92. CC="%{l_cc}" \
  93. CXX="%{l_cxx}" \
  94. CFLAGS="%{l_cflags -O} -g" \
  95. CXXFLAGS="%{l_cxxflags -O} -g -DDLLIMPORT=" \
  96. CPPFLAGS="%{l_cppflags} -DDLLIMPORT=" \
  97. LDFLAGS="%{l_ldflags}" \
  98. ./configure \
  99. --prefix=%{l_prefix} \
  100. --sysconfdir=%{l_prefix}/etc/powerdns \
  101. %if "%{with_mysql}" == "yes"
  102. --enable-mysql \
  103. --with-mysql=%{l_prefix} \
  104. %else
  105. --disable-mysql \
  106. %endif
  107. %if "%{with_pgsql}" == "yes"
  108. --enable-pgsql \
  109. --with-pgsql=%{l_prefix} \
  110. --with-pgsql-includes=%{l_prefix}/include/libpq++ \
  111. --with-pgsql-lib=%{l_prefix}/lib \
  112. %else
  113. --disable-pgsql \
  114. %endif
  115. --with-modules="$MODULES" \
  116. --with-dynmodules="" \
  117. --disable-shared \
  118. --enable-verbose-logging
  119. CXXFLAGS="%{l_cxxflags -O} -DDLLIMPORT= -DHAVE_NAMESPACE_STD" \
  120. CPPFLAGS="%{l_cppflags} -DDLLIMPORT= -DHAVE_NAMESPACE_STD" \
  121. %{l_make} %{l_mflags -O}
  122. %install
  123. rm -rf $RPM_BUILD_ROOT
  124. %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT"
  125. # Clean up installation
  126. rm -rf $RPM_BUILD_ROOT%{l_prefix}/lib
  127. # Setup config file
  128. mv $RPM_BUILD_ROOT%{l_prefix}/etc/powerdns/pdns.conf-dist \
  129. $RPM_BUILD_ROOT%{l_prefix}/etc/powerdns/pdns.conf
  130. # Creating run-command script
  131. %{l_shtool} mkdir -f -p -m 755 \
  132. $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d
  133. %{l_shtool} install -c -m 755 -e 's;@l_prefix@;%{l_prefix};g' \
  134. -e 's;@l_susr@;%{l_susr};g' -e 's;@l_sgrp@;%{l_sgrp};g' \
  135. -e 's;@l_musr@;%{l_musr};g' -e 's;@l_mgrp@;%{l_mgrp};g' \
  136. %{SOURCE rc.powerdns} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
  137. # Creating fsl directory
  138. %{l_shtool} mkdir -f -p -m 755 \
  139. $RPM_BUILD_ROOT%{l_prefix}/etc/fsl
  140. %{l_shtool} install -c -m 644 -e 's;@l_prefix@;%{l_prefix};g' \
  141. %{SOURCE fsl.powerdns} $RPM_BUILD_ROOT%{l_prefix}/etc/fsl/
  142. strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
  143. strip $RPM_BUILD_ROOT%{l_prefix}/sbin/* >/dev/null 2>&1 || true
  144. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} \
  145. '%config %attr(0600,root,%{l_mgrp}) %{l_prefix}/etc/powerdns/*' \
  146. '%config %{l_prefix}/etc/fsl/fsl.powerdns' \
  147. '%not %dir %{l_prefix}/etc/fsl'
  148. %files -f files
  149. %clean
  150. rm -rf $RPM_BUILD_ROOT