ecartis.spec 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170
  1. ##
  2. ## ecartis.spec -- OpenPKG RPM Package Specification
  3. ## Copyright (c) 2000-2005 OpenPKG Foundation e.V. <http://openpkg.net/>
  4. ## Copyright (c) 2000-2005 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 version
  25. %define V_main 1.0.0
  26. %define V_snap 20050909
  27. %define V_here %{V_main}.%{V_snap}
  28. # package information
  29. Name: ecartis
  30. Summary: Ecartis Mailing List Manager
  31. URL: http://www.ecartis.org/
  32. Vendor: Noderunner Computing
  33. Packager: OpenPKG
  34. Distribution: OpenPKG
  35. Class: EVAL
  36. Group: Mail
  37. License: GPL
  38. Version: %{V_here}
  39. Release: 20050911
  40. # list of sources
  41. Source0: ftp://ftp.ecartis.org/pub/ecartis/snapshots/tar/ecartis-%{V_main}-snap%{V_snap}.tar.gz
  42. Source1: ecartis.cfg
  43. Source2: ecartis.aliases
  44. Source3: banned
  45. Patch0: ecartis.patch
  46. # build information
  47. Prefix: %{l_prefix}
  48. BuildRoot: %{l_buildroot}
  49. BuildPreReq: OpenPKG, openpkg >= 20040130, gcc, make
  50. PreReq: OpenPKG, openpkg >= 20040130, MTA
  51. AutoReq: no
  52. AutoReqProv: no
  53. %description
  54. Ecartis is a open-source software package that administers mailing
  55. lists similar to Majordomo and Listserv. Ecartis' feature list
  56. includes anti-spam hooks, ability to strip down MIME messages and
  57. remove their attachments, virtual hosts, just to name a few).
  58. Ecartis was formerly known as Listar.
  59. %track
  60. prog ecartis = {
  61. version = %{V_main}-snap%{V_snap}
  62. url = ftp://ftp.ecartis.org/pub/ecartis/snapshots/tar
  63. regex = ecartis-((\d+\.)*\d+(-snap\d{8})?)\.tar\.gz
  64. }
  65. %prep
  66. %setup -q -n ecartis-%{V_main}
  67. %patch -p0
  68. ( cd src
  69. %{l_shtool} install -c -m 644 Makefile.dist Makefile
  70. %{l_shtool} subst \
  71. -e 's;^\(DYNMOD=.*\)$;#\1;' \
  72. -e 's;^\(CC=\).*$;\1%{l_cc};' \
  73. -e 's;^\( \{1,\}\)chmod \(.*\)$;\1-chmod \2;' \
  74. -e 's;^\(WFLAGS *=.*\)$;#\1;' \
  75. Makefile
  76. case "%{l_platform -t}" in
  77. *-sunos5* )
  78. %{l_shtool} subst \
  79. -e 's;^\#\(SUNOS_5 *=\).*$;\1 1;' \
  80. -e 's;^\#\(NEED_FLOCK *=.*\)$;\1;' \
  81. -e 's;^\#\(NEED_STRERROR *=.*\)$;\1;' \
  82. Makefile
  83. ;;
  84. esac
  85. ) || exit $?
  86. %build
  87. ( cd src
  88. # we call 'make' twice intentionally since the dependencies described
  89. # in the Makefile are not sufficient and one could end up in a broken
  90. # or incomplete build -- sigh
  91. %{l_make} %{l_mflags} make_modules
  92. %{l_make} %{l_mflags} ecartis
  93. ) || exit $?
  94. %install
  95. rm -rf $RPM_BUILD_ROOT
  96. # create directory structure
  97. %{l_shtool} mkdir -f -p -m 755 \
  98. $RPM_BUILD_ROOT%{l_prefix}/etc/ecartis
  99. %{l_shtool} mkdir -f -p -m 711 \
  100. $RPM_BUILD_ROOT%{l_prefix}/libexec/ecartis
  101. %{l_shtool} mkdir -f -p -m 751 \
  102. $RPM_BUILD_ROOT%{l_prefix}/libexec/ecartis/lists
  103. %{l_shtool} mkdir -f -p -m 750 \
  104. $RPM_BUILD_ROOT%{l_prefix}/libexec/ecartis/modules \
  105. $RPM_BUILD_ROOT%{l_prefix}/libexec/ecartis/queue \
  106. $RPM_BUILD_ROOT%{l_prefix}/libexec/ecartis/scripts \
  107. $RPM_BUILD_ROOT%{l_prefix}/libexec/ecartis/templates \
  108. $RPM_BUILD_ROOT%{l_prefix}/var/ecartis/log
  109. # install Ecartis executable
  110. %{l_shtool} install -c -s -m 755 \
  111. src/build/ecartis \
  112. $RPM_BUILD_ROOT%{l_prefix}/libexec/ecartis/
  113. # install Ecartis configuration file
  114. %{l_shtool} install -c -m 644 %{l_value -s -a} \
  115. %{SOURCE ecartis.cfg} \
  116. $RPM_BUILD_ROOT%{l_prefix}/etc/ecartis/
  117. ln -s ../../etc/ecartis/ecartis.cfg \
  118. $RPM_BUILD_ROOT%{l_prefix}/libexec/ecartis/ecartis.cfg
  119. # install alias configuration file
  120. %{l_shtool} install -c -m 644 %{l_value -s -a} \
  121. %{SOURCE ecartis.aliases} \
  122. $RPM_BUILD_ROOT%{l_prefix}/etc/ecartis/
  123. ln -s ../../etc/ecartis/ecartis.aliases \
  124. $RPM_BUILD_ROOT%{l_prefix}/libexec/ecartis/ecartis.aliases
  125. # install global blacklist configuration file
  126. %{l_shtool} install -c -m 644 %{l_value -s -a} \
  127. %{SOURCE banned} \
  128. $RPM_BUILD_ROOT%{l_prefix}/etc/ecartis/
  129. ln -s ../../etc/ecartis/banned \
  130. $RPM_BUILD_ROOT%{l_prefix}/libexec/ecartis/banned
  131. # install additional files
  132. %{l_shtool} install -c -m 644 \
  133. ecartis.hlp \
  134. spam-regexp.sample \
  135. $RPM_BUILD_ROOT%{l_prefix}/libexec/ecartis/
  136. %{l_shtool} install -c -m 644 \
  137. scripts/* \
  138. $RPM_BUILD_ROOT%{l_prefix}/libexec/ecartis/scripts/
  139. %{l_shtool} install -c -m 644 \
  140. templates/* \
  141. $RPM_BUILD_ROOT%{l_prefix}/libexec/ecartis/templates/
  142. # determine file list
  143. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} \
  144. '%config %attr(0600,%{l_susr},%{l_mgrp}) %{l_prefix}/etc/ecartis/*' \
  145. '%attr(4711,%{l_rgrp},%{l_rgrp}) %{l_prefix}/libexec/ecartis/ecartis' \
  146. '%dir %attr(0750,%{l_rgrp},%{l_rgrp}) %{l_prefix}/libexec/ecartis/lists' \
  147. '%dir %attr(0750,%{l_rgrp},%{l_rgrp}) %{l_prefix}/libexec/ecartis/queue'
  148. %files -f files
  149. %clean
  150. rm -rf $RPM_BUILD_ROOT