poweradmin.spec 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. ##
  2. ## poweradmin.spec -- OpenPKG RPM Package Specification
  3. ## Copyright (c) 2000-2007 OpenPKG Foundation e.V. <http://openpkg.net/>
  4. ## Copyright (c) 2000-2007 Ralf S. Engelschall <http://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: poweradmin
  26. Summary: PowerDNS Web Front-End
  27. URL: http://www.poweradmin.org/
  28. Vendor: The PowerAdmin Team
  29. Packager: OpenPKG Foundation e.V.
  30. Distribution: OpenPKG Community
  31. Class: EVAL
  32. Group: DNS
  33. License: QPL
  34. Version: 1.2.7
  35. Release: 20070622
  36. # list of sources
  37. Source0: http://switch.dl.sourceforge.net/poweradmin/poweradmin-%{version}.tar.bz2
  38. Source1: poweradmin.conf
  39. Patch0: poweradmin.patch
  40. # build information
  41. Prefix: %{l_prefix}
  42. BuildRoot: %{l_buildroot}
  43. BuildPreReq: OpenPKG, openpkg >= 20040130
  44. PreReq: OpenPKG, openpkg >= 20040130
  45. PreReq: apache, apache-php, apache-php::with_mysql = yes
  46. PreReq: php, php::with_pear = yes, php::with_mysql = yes
  47. AutoReq: no
  48. AutoReqProv: no
  49. %description
  50. This project is a web-based front-end for the PowerDNS DNS server.
  51. The goal is to create a web-based administration system that is more
  52. comprehensive in features and support than any other administration
  53. system currently existing. We aim to surpass the simplicity of
  54. webmin and keep the usability of phpMyAdmin.
  55. %track
  56. prog poweradmin = {
  57. version = %{version}
  58. url = http://prdownloads.sourceforge.net/poweradmin/
  59. regex = poweradmin-(__VER__)\.tar\.gz
  60. }
  61. %prep
  62. %setup -q
  63. %patch -p0
  64. %build
  65. %install
  66. rm -rf $RPM_BUILD_ROOT
  67. dir=$RPM_BUILD_ROOT%{l_prefix}/libexec/poweradmin
  68. %{l_shtool} mkdir -p -m 755 \
  69. $RPM_BUILD_ROOT%{l_prefix}/etc/poweradmin \
  70. $dir/bin \
  71. $dir/htdocs/inc \
  72. $dir/htdocs/images \
  73. $dir/htdocs/style \
  74. $RPM_BUILD_ROOT%{l_prefix}/share/poweradmin
  75. %{l_shtool} install -c -m 644 \
  76. *.php $dir/htdocs/
  77. %{l_shtool} install -c -m 644 \
  78. inc/*.php $dir/htdocs/inc/
  79. %{l_shtool} install -c -m 644 \
  80. images/* $dir/htdocs/images/
  81. %{l_shtool} install -c -m 644 \
  82. style/*.php $dir/htdocs/style/
  83. %{l_shtool} install -c -m 644 \
  84. docs/* \
  85. $RPM_BUILD_ROOT%{l_prefix}/share/poweradmin/
  86. %{l_shtool} install -c -m 644 \
  87. migrator.php-pa $dir/bin/migrator.php
  88. %{l_shtool} install -c -m 644 \
  89. %{SOURCE poweradmin.conf} $RPM_BUILD_ROOT%{l_prefix}/etc/poweradmin/
  90. # move install script out of htdocs
  91. mv $dir/htdocs/install.php $dir/bin/
  92. # move config file to etc/
  93. mv \
  94. $dir/htdocs/inc/config-block.inc.php \
  95. $RPM_BUILD_ROOT%{l_prefix}/etc/poweradmin/config.inc.php
  96. ln -s \
  97. %{l_prefix}/etc/poweradmin/config.inc.php \
  98. $dir/htdocs/inc/
  99. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} \
  100. '%config %{l_prefix}/etc/*'
  101. %files -f files
  102. %clean
  103. rm -rf $RPM_BUILD_ROOT