nntpcache.spec 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. ##
  2. ## nntpcache.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: nntpcache
  26. Summary: NNTP Caching Proxy
  27. URL: http://www.nntpcache.org/
  28. Vendor: Julian Assange, Luke Bowker
  29. Packager: The OpenPKG Project
  30. Distribution: OpenPKG [EXP]
  31. Group: News
  32. License: BSD
  33. Version: 2.3.3
  34. Release: %{l_branch}.0
  35. # list of sources
  36. Source0: ftp://ftp.nntpcache.org/pub/nntpcache/nntpcache-%{version}.tar.gz
  37. # build information
  38. Prefix: %{l_prefix}
  39. BuildRoot: %{l_buildroot}
  40. BuildPreReq: OpenPKG, openpkg >= 20011023.0
  41. PreReq: OpenPKG, openpkg >= 20011023.0
  42. AutoReq: no
  43. AutoReqProv: no
  44. %description
  45. NNTPCache (efficiently) executes on the localhost pretending to
  46. be an NNRP news reading server. In fact, what it does is pass
  47. certain NNTP commands through to real (remote and possibly local)
  48. news-servers based on various pattern matching rules. NNTPCache
  49. then takes the output from those servers and caches & indexes it in
  50. funky ways (much case specific magic goes into this). The next time
  51. such information is asked for, or other information which can be
  52. logically inferred from the previously collated information, it is
  53. sent directly from the cache, without consulting the remote servers.
  54. %prep
  55. %setup -q
  56. %build
  57. CC="%{l_cc}" \
  58. CFLAGS="%{l_cflags -O}" \
  59. ./configure \
  60. --prefix=%{l_prefix} \
  61. --sysconfdir=%{l_prefix}/etc/nntpcache \
  62. --localstatedir=%{l_prefix}/var/nntpcache
  63. %{l_make} %{l_mflags}
  64. %install
  65. rm -rf $RPM_BUILD_ROOT
  66. %{l_rpmtool} subst \
  67. "s;chown;true;g" "s;chgrp;true;g" \
  68. -- `find . -type f -name Makefile -print`
  69. %{l_make} %{l_mflags} install \
  70. prefix=$RPM_BUILD_ROOT%{l_prefix} \
  71. exec_prefix=$RPM_BUILD_ROOT%{l_prefix} \
  72. sysconfdir=$RPM_BUILD_ROOT%{l_prefix}/etc/nntpcache \
  73. configDir=$RPM_BUILD_ROOT%{l_prefix}/etc/nntpcache \
  74. localstatedir=$RPM_BUILD_ROOT%{l_prefix}/var/nntpcache \
  75. cacheDir=$RPM_BUILD_ROOT%{l_prefix}/var/nntpcache
  76. rm -rf $RPM_BUILD_ROOT%{l_prefix}/include
  77. rm -rf $RPM_BUILD_ROOT%{l_prefix}/etc/nntpcache/http
  78. rm -rf $RPM_BUILD_ROOT%{l_prefix}/bin
  79. rm -rf $RPM_BUILD_ROOT%{l_prefix}/sbin/innreport.sh
  80. rm -f $RPM_BUILD_ROOT%{l_prefix}/etc/nntpcache/pubring*
  81. rm -f $RPM_BUILD_ROOT%{l_prefix}/etc/nntpcache/innreport*
  82. strip $RPM_BUILD_ROOT%{l_prefix}/sbin/* >/dev/null 2>&1 || true
  83. ( cd $RPM_BUILD_ROOT%{l_prefix}/etc/nntpcache
  84. for file in *-dist; do
  85. mv $file `echo $file | sed -e 's;-dist$;;'`
  86. done
  87. )
  88. find $RPM_BUILD_ROOT%{l_prefix} -type d -print | xargs chmod 755
  89. find $RPM_BUILD_ROOT%{l_prefix} -type f -print | xargs chmod 644
  90. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  91. %files -f files
  92. %clean
  93. rm -rf $RPM_BUILD_ROOT