axkit.spec 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360
  1. ##
  2. ## axkit.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. # versions of individual parts
  25. %define V_perl 5.8.8
  26. %define V_axkit 1.7
  27. %define V_apache_axkit_language_xsp_objectaglib 0.08
  28. %define V_apache_axkit_plugin_session 1
  29. %define V_axkit_app_gallery 0.5
  30. %define V_axkit_app_taboo 0.51
  31. %define V_axkit_plugin_disablexsltparams 0.01
  32. %define V_axkit_provider_html 1.0
  33. %define V_axkit_xsp_attrparam 0.01
  34. %define V_axkit_xsp_basicsession 0.22
  35. %define V_axkit_xsp_charsetconv 0.02
  36. %define V_axkit_xsp_cookie 1.41
  37. %define V_axkit_xsp_esql 1.4
  38. %define V_axkit_xsp_exception 1.6
  39. %define V_axkit_xsp_ifparam 1.4
  40. %define V_axkit_xsp_l10n 0.04
  41. %define V_axkit_xsp_md5 0.01
  42. %define V_axkit_xsp_minisession 1.09
  43. %define V_axkit_xsp_param 1.4
  44. %define V_axkit_xsp_perform 1.83
  45. %define V_axkit_xsp_queryparam 0.02
  46. %define V_axkit_xsp_sendmail 1.5
  47. %define V_axkit_xsp_session 0.11
  48. %define V_axkit_xsp_util 1.6
  49. %define V_axkit_xsp_webutils 1.6
  50. %define V_http_ghttp 1.07
  51. # package information
  52. Name: axkit
  53. Summary: Apache XML Application Server
  54. URL: http://www.axkit.org/
  55. Vendor: AxKit.com Ltd
  56. Packager: OpenPKG Foundation e.V.
  57. Distribution: OpenPKG Community
  58. Class: EVAL
  59. Group: Web
  60. License: GPL/Artistic
  61. Version: %{V_axkit}
  62. Release: 20070622
  63. # list of sources
  64. Source0: http://www.apache.org/dist/xml/axkit/AxKit-%{V_axkit}.tar.gz
  65. Source1: http://www.cpan.org/modules/by-module/AxKit/Apache-AxKit-Language-XSP-ObjectTaglib-%{V_apache_axkit_language_xsp_objectaglib}.tar.gz
  66. Source2: http://www.cpan.org/modules/by-module/AxKit/Apache-AxKit-Plugin-Session-%{V_apache_axkit_plugin_session}.tar.gz
  67. Source3: http://www.cpan.org/modules/by-module/AxKit/AxKit-Plugin-DisableXSLTParams-%{V_axkit_plugin_disablexsltparams}.tar.gz
  68. Source4: http://www.cpan.org/modules/by-module/AxKit/AxKit-Provider-HTML-%{V_axkit_provider_html}.tar.gz
  69. Source5: http://www.cpan.org/modules/by-module/AxKit/AxKit-XSP-AttrParam-%{V_axkit_xsp_attrparam}.tar.gz
  70. Source6: http://www.cpan.org/modules/by-module/AxKit/AxKit-XSP-BasicSession-%{V_axkit_xsp_basicsession}.tar.gz
  71. Source7: http://www.cpan.org/modules/by-module/AxKit/AxKit-XSP-Util-%{V_axkit_xsp_util}.tar.gz
  72. Source8: http://www.cpan.org/modules/by-module/AxKit/AxKit-XSP-CharsetConv-%{V_axkit_xsp_charsetconv}.tar.gz
  73. Source9: http://www.cpan.org/modules/by-module/AxKit/AxKit-XSP-Cookie-%{V_axkit_xsp_cookie}.tar.gz
  74. Source10: http://www.cpan.org/modules/by-module/AxKit/AxKit-XSP-WebUtils-%{V_axkit_xsp_webutils}.tar.gz
  75. Source11: http://www.cpan.org/modules/by-module/AxKit/AxKit-XSP-ESQL-%{V_axkit_xsp_esql}.tar.gz
  76. Source12: http://www.cpan.org/modules/by-module/AxKit/AxKit-XSP-Exception-%{V_axkit_xsp_exception}.tar.gz
  77. Source13: http://www.cpan.org/modules/by-module/AxKit/AxKit-XSP-IfParam-%{V_axkit_xsp_ifparam}.tar.gz
  78. Source14: http://www.cpan.org/modules/by-module/AxKit/AxKit-XSP-L10N-%{V_axkit_xsp_l10n}.tar.gz
  79. Source15: http://www.cpan.org/modules/by-module/AxKit/AxKit-XSP-MD5-%{V_axkit_xsp_md5}.tar.gz
  80. Source16: http://www.cpan.org/modules/by-module/AxKit/AxKit-XSP-Minisession-%{V_axkit_xsp_minisession}.tar.gz
  81. Source17: http://www.cpan.org/modules/by-module/AxKit/AxKit-XSP-Param-%{V_axkit_xsp_param}.tar.gz
  82. Source18: http://www.cpan.org/modules/by-module/AxKit/AxKit-XSP-PerForm-%{V_axkit_xsp_perform}.tar.gz
  83. Source19: http://www.cpan.org/modules/by-module/AxKit/AxKit-XSP-QueryParam-%{V_axkit_xsp_queryparam}.tar.gz
  84. Source20: http://www.cpan.org/modules/by-module/AxKit/AxKit-XSP-Sendmail-%{V_axkit_xsp_sendmail}.tar.gz
  85. Source21: http://www.cpan.org/modules/by-module/AxKit/AxKit-XSP-Session-%{V_axkit_xsp_session}.tar.gz
  86. Source22: http://www.cpan.org/modules/by-module/HTTP/HTTP-GHTTP-%{V_http_ghttp}.tar.gz
  87. Source23: axkit-apache.conf
  88. Source24: axkit-index.xsp
  89. Source25: rc.axkit
  90. # build information
  91. Prefix: %{l_prefix}
  92. BuildRoot: %{l_buildroot}
  93. BuildPreReq: OpenPKG, openpkg >= 20040130, perl, perl-openpkg
  94. PreReq: OpenPKG, openpkg >= 20040130, perl
  95. BuildPreReq: apache-perl, perl-apache
  96. PreReq: apache-perl, perl-apache
  97. BuildPreReq: perl-crypto, perl-comp, perl-ldap, perl-time
  98. PreReq: perl-crypto, perl-comp, perl-ldap, perl-time
  99. BuildPreReq: perl-xml::with_sablotron = yes
  100. PreReq: perl-xml::with_sablotron = yes
  101. BuildPreReq: perl-xml::with_libxml = yes
  102. PreReq: perl-xml::with_libxml = yes
  103. BuildPreReq: libghttp
  104. PreReq: libghttp
  105. AutoReq: no
  106. AutoReqProv: no
  107. %description
  108. Apache AxKit is an XML Application Server for Apache. It provides
  109. on-the-fly conversion from XML to any format, such as HTML, WAP
  110. or text using either W3C standard techniques, or flexible custom
  111. code. AxKit also uses a built-in Perl interpreter to provide some
  112. amazingly powerful techniques for XML transformation.
  113. %track
  114. prog axkit:AxKit = {
  115. version = %{V_axkit}
  116. url = http://www.apache.org/dist/xml/axkit/
  117. regex = AxKit-(__VER__)\.tar\.gz
  118. }
  119. prog axkit:Apache-AxKit-Language-XSP-ObjectTaglib = {
  120. version = %{V_apache_axkit_language_xsp_objectaglib}
  121. url = http://www.cpan.org/modules/by-module/AxKit/
  122. regex = Apache-AxKit-Language-XSP-ObjectTaglib-(__VER__)\.tar\.gz
  123. }
  124. prog axkit:Apache-AxKit-Plugin-Session = {
  125. version = %{V_apache_axkit_plugin_session}
  126. url = http://www.cpan.org/modules/by-module/AxKit/
  127. regex = Apache-AxKit-Plugin-Session-(__VER__)\.tar\.gz
  128. }
  129. prog axkit:AxKit-Plugin-DisableXSLTParams = {
  130. version = %{V_axkit_plugin_disablexsltparams}
  131. url = http://www.cpan.org/modules/by-module/AxKit/
  132. regex = AxKit-Plugin-DisableXSLTParams-(__VER__)\.tar\.gz
  133. }
  134. prog axkit:AxKit-Provider-HTML = {
  135. version = %{V_axkit_provider_html}
  136. url = http://www.cpan.org/modules/by-module/AxKit/
  137. regex = AxKit-Provider-HTML-(__VER__)\.tar\.gz
  138. }
  139. prog axkit:AxKit-XSP-AttrParam = {
  140. version = %{V_axkit_xsp_attrparam}
  141. url = http://www.cpan.org/modules/by-module/AxKit/
  142. regex = AxKit-XSP-AttrParam-(__VER__)\.tar\.gz
  143. }
  144. prog axkit:AxKit-XSP-BasicSession = {
  145. version = %{V_axkit_xsp_basicsession}
  146. url = http://www.cpan.org/modules/by-module/AxKit/
  147. regex = AxKit-XSP-BasicSession-(__VER__)\.tar\.gz
  148. }
  149. prog axkit:AxKit-XSP-Util = {
  150. version = %{V_axkit_xsp_util}
  151. url = http://www.cpan.org/modules/by-module/AxKit/
  152. regex = AxKit-XSP-Util-(__VER__)\.tar\.gz
  153. }
  154. prog axkit:AxKit-XSP-CharsetConv = {
  155. version = %{V_axkit_xsp_charsetconv}
  156. url = http://www.cpan.org/modules/by-module/AxKit/
  157. regex = AxKit-XSP-CharsetConv-(__VER__)\.tar\.gz
  158. }
  159. prog axkit:AxKit-XSP-Cookie = {
  160. version = %{V_axkit_xsp_cookie}
  161. url = http://www.cpan.org/modules/by-module/AxKit/
  162. regex = AxKit-XSP-Cookie-(__VER__)\.tar\.gz
  163. }
  164. prog axkit:AxKit-XSP-WebUtils = {
  165. version = %{V_axkit_xsp_webutils}
  166. url = http://www.cpan.org/modules/by-module/AxKit/
  167. regex = AxKit-XSP-WebUtils-(__VER__)\.tar\.gz
  168. }
  169. prog axkit:AxKit-XSP-ESQL = {
  170. version = %{V_axkit_xsp_esql}
  171. url = http://www.cpan.org/modules/by-module/AxKit/
  172. regex = AxKit-XSP-ESQL-(__VER__)\.tar\.gz
  173. }
  174. prog axkit:AxKit-XSP-Exception = {
  175. version = %{V_axkit_xsp_exception}
  176. url = http://www.cpan.org/modules/by-module/AxKit/
  177. regex = AxKit-XSP-Exception-(__VER__)\.tar\.gz
  178. }
  179. prog axkit:AxKit-XSP-IfParam = {
  180. version = %{V_axkit_xsp_ifparam}
  181. url = http://www.cpan.org/modules/by-module/AxKit/
  182. regex = AxKit-XSP-IfParam-(__VER__)\.tar\.gz
  183. }
  184. prog axkit:AxKit-XSP-L10N = {
  185. version = %{V_axkit_xsp_l10n}
  186. url = http://www.cpan.org/modules/by-module/AxKit/
  187. regex = AxKit-XSP-L10N-(__VER__)\.tar\.gz
  188. }
  189. prog axkit:AxKit-XSP-MD5 = {
  190. version = %{V_axkit_xsp_md5}
  191. url = http://www.cpan.org/modules/by-module/AxKit/
  192. regex = AxKit-XSP-MD5-(__VER__)\.tar\.gz
  193. }
  194. prog axkit:AxKit-XSP-Minisession = {
  195. version = %{V_axkit_xsp_minisession}
  196. url = http://www.cpan.org/modules/by-module/AxKit/
  197. regex = AxKit-XSP-Minisession-(__VER__)\.tar\.gz
  198. }
  199. prog axkit:AxKit-XSP-Param = {
  200. version = %{V_axkit_xsp_param}
  201. url = http://www.cpan.org/modules/by-module/AxKit/
  202. regex = AxKit-XSP-Param-(__VER__)\.tar\.gz
  203. }
  204. prog axkit:AxKit-XSP-PerForm = {
  205. version = %{V_axkit_xsp_perform}
  206. url = http://www.cpan.org/modules/by-module/AxKit/
  207. regex = AxKit-XSP-PerForm-(__VER__)\.tar\.gz
  208. }
  209. prog axkit:AxKit-XSP-QueryParam = {
  210. version = %{V_axkit_xsp_queryparam}
  211. url = http://www.cpan.org/modules/by-module/AxKit/
  212. regex = AxKit-XSP-QueryParam-(__VER__)\.tar\.gz
  213. }
  214. prog axkit:AxKit-XSP-Sendmail = {
  215. version = %{V_axkit_xsp_sendmail}0
  216. url = http://www.cpan.org/modules/by-module/AxKit/
  217. regex = AxKit-XSP-Sendmail-(__VER__)\.tar\.gz
  218. transform = "s/^(\d+\.\d)$/${1}0/; $_"
  219. }
  220. prog axkit:AxKit-XSP-Session = {
  221. version = %{V_axkit_xsp_session}
  222. url = http://www.cpan.org/modules/by-module/AxKit/
  223. regex = AxKit-XSP-Session-(__VER__)\.tar\.gz
  224. }
  225. prog axkit:HTTP-GHTTP = {
  226. version = %{V_http_ghttp}
  227. url = http://www.cpan.org/modules/by-module/HTTP/
  228. regex = HTTP-GHTTP-(__VER__)\.tar\.gz
  229. }
  230. %prep
  231. %setup -q -c
  232. %setup -q -T -D -a 1
  233. %setup -q -T -D -a 2
  234. %setup -q -T -D -a 3
  235. %setup -q -T -D -a 4
  236. %setup -q -T -D -a 5
  237. %setup -q -T -D -a 6
  238. %setup -q -T -D -a 7
  239. %setup -q -T -D -a 8
  240. %setup -q -T -D -a 9
  241. %setup -q -T -D -a 10
  242. %setup -q -T -D -a 11
  243. %setup -q -T -D -a 12
  244. %setup -q -T -D -a 13
  245. %setup -q -T -D -a 14
  246. %setup -q -T -D -a 15
  247. %setup -q -T -D -a 16
  248. %setup -q -T -D -a 17
  249. %setup -q -T -D -a 18
  250. %setup -q -T -D -a 19
  251. %setup -q -T -D -a 20
  252. %setup -q -T -D -a 21
  253. %setup -q -T -D -a 22
  254. %build
  255. %install
  256. # create installation hierarchy
  257. rm -rf $RPM_BUILD_ROOT
  258. %{l_shtool} mkdir -f -p -m 755 \
  259. $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d \
  260. $RPM_BUILD_ROOT%{l_prefix}/etc/axkit \
  261. $RPM_BUILD_ROOT%{l_prefix}/share/axkit \
  262. $RPM_BUILD_ROOT%{l_prefix}/var/axkit/cache \
  263. $RPM_BUILD_ROOT%{l_prefix}/var/axkit/run \
  264. $RPM_BUILD_ROOT%{l_prefix}/var/axkit/log
  265. # prepare installation
  266. %{l_prefix}/bin/perl-openpkg prepare
  267. # install AxKit components
  268. %{l_prefix}/bin/perl-openpkg -d %{SOURCE0} \
  269. --args --skip configure build install
  270. %{l_prefix}/bin/perl-openpkg -d %{SOURCE1} configure build install
  271. %{l_prefix}/bin/perl-openpkg -d %{SOURCE2} configure build install
  272. %{l_prefix}/bin/perl-openpkg -d %{SOURCE3} configure build install
  273. %{l_prefix}/bin/perl-openpkg -d %{SOURCE4} configure build install
  274. %{l_prefix}/bin/perl-openpkg -d %{SOURCE5} configure build install
  275. %{l_prefix}/bin/perl-openpkg -d %{SOURCE6} configure build install
  276. %{l_prefix}/bin/perl-openpkg -d %{SOURCE7} configure build install
  277. %{l_prefix}/bin/perl-openpkg -d %{SOURCE8} configure build install
  278. %{l_prefix}/bin/perl-openpkg -d %{SOURCE9} configure build install
  279. %{l_prefix}/bin/perl-openpkg -d %{SOURCE10} configure build install
  280. %{l_prefix}/bin/perl-openpkg -d %{SOURCE11} configure build install
  281. %{l_prefix}/bin/perl-openpkg -d %{SOURCE12} configure build install
  282. %{l_prefix}/bin/perl-openpkg -d %{SOURCE13} configure build install
  283. %{l_prefix}/bin/perl-openpkg -d %{SOURCE14} configure build install
  284. %{l_prefix}/bin/perl-openpkg -d %{SOURCE15} configure build install
  285. %{l_prefix}/bin/perl-openpkg -d %{SOURCE16} configure build install
  286. %{l_prefix}/bin/perl-openpkg -d %{SOURCE17} configure build install
  287. %{l_prefix}/bin/perl-openpkg -d %{SOURCE18} configure build install
  288. %{l_prefix}/bin/perl-openpkg -d %{SOURCE19} configure build install
  289. %{l_prefix}/bin/perl-openpkg -d %{SOURCE20} configure build install
  290. %{l_prefix}/bin/perl-openpkg -d %{SOURCE21} configure build install
  291. %{l_prefix}/bin/perl-openpkg -d %{SOURCE22} \
  292. --args "LIBS='%{l_ldflags}'" \
  293. --args "INC='%{l_cppflags}'" \
  294. configure build install
  295. # finalize Perl module installation
  296. %{l_prefix}/bin/perl-openpkg -F perl-openpkg-files fixate cleanup
  297. # install run-command script
  298. %{l_shtool} install -c -m 755 %{l_value -s -a} \
  299. %{SOURCE rc.axkit} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
  300. # install custom Apache configuration
  301. l_hostname=`%{l_shtool} echo -e %h`
  302. l_domainname=`%{l_shtool} echo -e %d | cut -c2-`
  303. %{l_shtool} install -c -m 644 %{l_value -s -a} \
  304. -e "s;@l_hostname@;$l_hostname;g" \
  305. -e "s;@l_domainname@;$l_domainname;g" \
  306. %{SOURCE axkit-apache.conf} \
  307. $RPM_BUILD_ROOT%{l_prefix}/etc/axkit/
  308. # install index files
  309. %{l_shtool} install -c -m 644 %{l_value -s -a} \
  310. %{SOURCE axkit-index.xsp} $RPM_BUILD_ROOT%{l_prefix}/share/axkit/index.xsp
  311. # install demo files
  312. ( cd AxKit-%{V_axkit}
  313. # LibXSLT > 1.59 doesn't work with AxKit 1.7: use Sablotron
  314. %{l_shtool} subst -e 's/LibXSLT/Sablot/' `find demo -name ".htaccess" -print`
  315. cp -rp demo/* $RPM_BUILD_ROOT%{l_prefix}/share/axkit/
  316. ) || exit $?
  317. # determine installation files
  318. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
  319. %{l_files_std} `cat perl-openpkg-files` \
  320. '%config %{l_prefix}/etc/axkit/*'
  321. %files -f files
  322. %clean
  323. rm -rf $RPM_BUILD_ROOT
  324. %post
  325. if [ ".$1" = .1 ]; then
  326. # display information about steps the admin should perform next
  327. ( echo "You should now start Apache with"
  328. echo " \$ $RPM_INSTALL_PREFIX/bin/openpkg rc axkit start"
  329. echo "and access the Axkit homepage under:"
  330. echo " http://localhost:8080/"
  331. ) | %{l_rpmtool} msg -b -t notice
  332. fi
  333. %preun
  334. if [ ".$1" = .0 ]; then
  335. # remove AxKit cache files
  336. rm -rf $RPM_INSTALL_PREFIX/var/axkit/* 2>/dev/null || true
  337. fi