clearsilver.spec 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  1. ##
  2. ## clearsilver.spec -- OpenPKG RPM Package Specification
  3. ## Copyright (c) 2000-2006 OpenPKG Foundation e.V. <http://openpkg.net/>
  4. ## Copyright (c) 2000-2006 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: clearsilver
  26. Summary: Language-Neutral HTML Template System
  27. URL: http://www.clearsilver.net/
  28. Vendor: Brandon Long et al.
  29. Packager: OpenPKG
  30. Distribution: OpenPKG
  31. Class: EVAL
  32. Group: HTML
  33. License: Neotonic ClearSilver License and others
  34. Version: 0.10.3
  35. Release: 20061011
  36. # package options
  37. %option with_perl no
  38. %option with_python no
  39. %option with_zlib no
  40. # list of sources
  41. Source0: http://www.clearsilver.net/downloads/clearsilver-%{version}.tar.gz
  42. # build information
  43. Prefix: %{l_prefix}
  44. BuildRoot: %{l_buildroot}
  45. BuildPreReq: OpenPKG, openpkg >= 20040130, make, gcc, python
  46. PreReq: OpenPKG, openpkg >= 20040130
  47. %if "%{with_perl}" == "yes"
  48. BuildPreReq: perl
  49. PreReq: perl
  50. %endif
  51. %if "%{with_zlib}" == "yes"
  52. BuildPreReq: zlib
  53. PreReq: zlib
  54. %endif
  55. AutoReq: no
  56. AutoReqProv: no
  57. %description
  58. Clearsilver is a fast, powerful, and language-neutral HTML template
  59. system. In both static content sites and dynamic HTML applications,
  60. it provides a separation between presentation code and application
  61. logic which makes working with your project easier.
  62. %track
  63. prog clearsilver = {
  64. version = %{version}
  65. url = http://www.clearsilver.net/downloads/
  66. regex = clearsilver-(__VER__)\.tar\.gz
  67. }
  68. %prep
  69. %setup -q
  70. %{l_shtool} subst \
  71. -e 's;^#!.*$;#!%{l_prefix}/bin/python;' \
  72. scripts/document.py
  73. %if "%{with_zlib}" == "yes"
  74. %{l_shtool} subst \
  75. -e 's;^\(LIBS[ ]*+=.*\)$;\1 -lz;' \
  76. cgi/Makefile
  77. %endif
  78. %build
  79. CC="%{l_cc}" \
  80. CFLAGS="%{l_cflags -O}" \
  81. CPPFLAGS="%{l_cppflags}" \
  82. LDFLAGS="%{l_ldflags}" \
  83. ./configure \
  84. --prefix=%{l_prefix} \
  85. %if "%{with_zlib}" == "yes"
  86. --enable-compression \
  87. %else
  88. --disable-compression \
  89. %endif
  90. --disable-apache \
  91. %if "%{with_perl}" == "yes"
  92. --enable-perl \
  93. --with-perl=%{l_prefix}/bin/perl \
  94. %else
  95. --disable-perl \
  96. %endif
  97. %if "%{with_python}" == "yes"
  98. --enable-python \
  99. --with-python=%{l_prefix}/bin/python \
  100. %else
  101. --disable-python \
  102. %endif
  103. --disable-ruby \
  104. --disable-java \
  105. --disable-csharp \
  106. --disable-remote-debugger \
  107. --disable-gettext
  108. %{l_make} %{l_mflags -O}
  109. %install
  110. rm -rf $RPM_BUILD_ROOT
  111. # build ClearSilver
  112. %{l_make} %{l_mflags} install DESTDIR="$RPM_BUILD_ROOT"
  113. # prepend namespace to all man pages to avoid conflicts
  114. ( cd $RPM_BUILD_ROOT%{l_prefix}/man/man3
  115. for m in *.3; do
  116. case "$m" in
  117. cs_* ) continue ;;
  118. esac
  119. base=`echo $m | sed -e 's;\.3$;;'`
  120. mv $m cs_$m
  121. %{l_shtool} subst \
  122. -e "1,/^\.SH .SEE ALSO./!s;$base;cs_$base;g" \
  123. *.3
  124. done
  125. ) || exit $?
  126. # strip installation
  127. strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
  128. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  129. %files -f files
  130. %clean
  131. rm -rf $RPM_BUILD_ROOT