kwiki.spec 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418
  1. ##
  2. ## kwiki.spec -- OpenPKG RPM Specification
  3. ## Copyright (c) 2000-2004 The OpenPKG Project <http://www.openpkg.org/>
  4. ## Copyright (c) 2000-2004 Ralf S. Engelschall <rse@engelschall.com>
  5. ## Copyright (c) 2000-2004 Cable & Wireless <http://www.cw.com/>
  6. ##
  7. ## Permission to use, copy, modify, and distribute this software for
  8. ## any purpose with or without fee is hereby granted, provided that
  9. ## the above copyright notice and this permission notice appear in all
  10. ## copies.
  11. ##
  12. ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  13. ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  14. ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  15. ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
  16. ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  17. ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  18. ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  19. ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  20. ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  21. ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  22. ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  23. ## SUCH DAMAGE.
  24. ##
  25. # package versions
  26. %define V_spoon 0.20
  27. %define V_kwiki 0.36
  28. %define V_kwiki_modperl 0.03
  29. %define V_kwiki_anchorlink 0.02
  30. %define V_kwiki_archive_rcs 0.13
  31. %define V_kwiki_autoformat 0.02
  32. %define V_kwiki_cache 0.11
  33. %define V_kwiki_revisions 0.13
  34. %define V_kwiki_diff 0.01
  35. %define V_kwiki_recentchanges 0.12
  36. %define V_kwiki_recentchangesrss 0.05
  37. %define V_kwiki_search 0.12
  38. %define V_kwiki_gdgraphgenerator 0.03
  39. %define V_kwiki_googlelink 0.01
  40. %define V_kwiki_icons_crystal 0.12
  41. %define V_kwiki_icons_gnome 0.14
  42. %define V_kwiki_image 0.01
  43. %define V_kwiki_mindmap 0.08
  44. %define V_kwiki_newpage 0.12
  45. %define V_kwiki_notify_mail 0.02
  46. %define V_kwiki_pageinclude 0.01
  47. %define V_kwiki_paragraphblocks 0.12
  48. %define V_kwiki_preformattedblocks 0.11
  49. %define V_kwiki_shellblocks 0.02
  50. %define V_kwiki_shortcutlinks 0.02
  51. %define V_kwiki_toolbar_list 0.01
  52. %define V_kwiki_username 0.13
  53. %define V_kwiki_userpreferences 0.12
  54. %define V_kwiki_vimmode 0.04
  55. # package information
  56. Name: kwiki
  57. Summary: Kwiki Wiki Engine
  58. URL: http://www.kwiki.org/
  59. Vendor: Brian Ingerson et al.
  60. Packager: The OpenPKG Project
  61. Distribution: OpenPKG
  62. Class: EVAL
  63. Group: Web
  64. License: GPL/Artistic
  65. Version: %{V_kwiki}
  66. Release: 20041218
  67. # list of sources
  68. Source0: http://www.cpan.org/authors/id/I/IN/INGY/Spoon-%{V_spoon}.tar.gz
  69. Source1: http://www.cpan.org/modules/by-module/Kwiki/Kwiki-%{V_kwiki}.tar.gz
  70. Source2: http://www.cpan.org/modules/by-module/Kwiki/Kwiki-AnchorLink-%{V_kwiki_anchorlink}.tar.gz
  71. Source3: http://www.cpan.org/modules/by-module/Kwiki/Kwiki-Archive-Rcs-%{V_kwiki_archive_rcs}.tar.gz
  72. Source4: http://www.cpan.org/modules/by-module/Kwiki/Kwiki-Autoformat-%{V_kwiki_autoformat}.tar.gz
  73. Source5: http://www.cpan.org/modules/by-module/Kwiki/Kwiki-Cache-%{V_kwiki_cache}.tar.gz
  74. Source6: http://www.cpan.org/modules/by-module/Kwiki/Kwiki-Revisions-%{V_kwiki_revisions}.tar.gz
  75. Source7: http://www.cpan.org/modules/by-module/Kwiki/Kwiki-Diff-%{V_kwiki_diff}.tar.gz
  76. Source8: http://www.cpan.org/modules/by-module/Kwiki/Kwiki-RecentChanges-%{V_kwiki_recentchanges}.tar.gz
  77. Source9: http://www.cpan.org/modules/by-module/Kwiki/Kwiki-RecentChangesRSS-%{V_kwiki_recentchangesrss}.tar.gz
  78. Source10: http://www.cpan.org/modules/by-module/Kwiki/Kwiki-Search-%{V_kwiki_search}.tar.gz
  79. Source11: http://www.cpan.org/modules/by-module/Kwiki/Kwiki-GDGraphGenerator-%{V_kwiki_gdgraphgenerator}.tar.gz
  80. Source12: http://www.cpan.org/modules/by-module/Kwiki/Kwiki-GoogleLink-%{V_kwiki_googlelink}.tar.gz
  81. Source13: http://www.cpan.org/modules/by-module/Kwiki/Kwiki-Icons-Crystal-%{V_kwiki_icons_crystal}.tar.gz
  82. Source14: http://www.cpan.org/modules/by-module/Kwiki/Kwiki-Icons-Gnome-%{V_kwiki_icons_gnome}.tar.gz
  83. Source15: http://www.cpan.org/modules/by-module/Kwiki/Kwiki-Image-%{V_kwiki_image}.tar.gz
  84. Source16: http://www.cpan.org/modules/by-module/Kwiki/Kwiki-MindMap-%{V_kwiki_mindmap}.tar.gz
  85. Source17: http://www.cpan.org/modules/by-module/Kwiki/Kwiki-ModPerl-%{V_kwiki_modperl}.tar.gz
  86. Source18: http://www.cpan.org/modules/by-module/Kwiki/Kwiki-NewPage-%{V_kwiki_newpage}.tar.gz
  87. Source19: http://www.cpan.org/modules/by-module/Kwiki/Kwiki-Notify-Mail-%{V_kwiki_notify_mail}.tar.gz
  88. Source20: http://www.cpan.org/modules/by-module/Kwiki/Kwiki-PageInclude-%{V_kwiki_pageinclude}.tar.gz
  89. Source21: http://www.cpan.org/modules/by-module/Kwiki/Kwiki-ParagraphBlocks-%{V_kwiki_paragraphblocks}.tar.gz
  90. Source22: http://www.cpan.org/modules/by-module/Kwiki/Kwiki-PreformattedBlocks-%{V_kwiki_preformattedblocks}.tar.gz
  91. Source23: http://www.cpan.org/modules/by-module/Kwiki/Kwiki-ShellBlocks-%{V_kwiki_shellblocks}.tar.gz
  92. Source24: http://www.cpan.org/modules/by-module/Kwiki/Kwiki-ShortcutLinks-%{V_kwiki_shortcutlinks}.tar.gz
  93. Source25: http://www.cpan.org/modules/by-module/Kwiki/Kwiki-Toolbar-List-%{V_kwiki_toolbar_list}.tar.gz
  94. Source26: http://www.cpan.org/modules/by-module/Kwiki/Kwiki-UserName-%{V_kwiki_username}.tar.gz
  95. Source27: http://www.cpan.org/modules/by-module/Kwiki/Kwiki-UserPreferences-%{V_kwiki_userpreferences}.tar.gz
  96. Source28: http://www.cpan.org/modules/by-module/Kwiki/Kwiki-VimMode-%{V_kwiki_vimmode}.tar.gz
  97. Source100: kwiki-apache.conf
  98. # build information
  99. Prefix: %{l_prefix}
  100. BuildRoot: %{l_buildroot}
  101. BuildPreReq: OpenPKG, openpkg >= 20040130, perl, perl-openpkg
  102. PreReq: OpenPKG, openpkg >= 20040130, perl, apache
  103. BuildPreReq: perl-sys, perl-parse, perl-text, perl-mail, perl-vcs, perl-gd
  104. PreReq: perl-sys, perl-parse, perl-text, perl-mail, perl-vcs, perl-gd
  105. AutoReq: no
  106. AutoReqProv: no
  107. %description
  108. Kwiki is perhaps the simplest to install, most modular, and easiest
  109. to extend Wiki engine. It is implemented in Perl and uses a flexible
  110. plugin architecture.
  111. %track
  112. prog kwiki:Spoon = {
  113. version = %{V_spoon}
  114. url = http://www.cpan.org/authors/id/I/IN/INGY/
  115. regex = Spoon-(__VER__)\.tar\.gz
  116. }
  117. prog kwiki:Kwiki = {
  118. version = %{V_kwiki}
  119. url = http://www.cpan.org/modules/by-module/Kwiki/
  120. regex = Kwiki-(__VER__)\.tar\.gz
  121. }
  122. prog kwiki:Kwiki-AnchorLink = {
  123. version = %{V_kwiki_anchorlink}
  124. url = http://www.cpan.org/modules/by-module/Kwiki/
  125. regex = Kwiki-AnchorLink-(__VER__)\.tar\.gz
  126. }
  127. prog kwiki:Kwiki-Archive-Rcs = {
  128. version = %{V_kwiki_archive_rcs}
  129. url = http://www.cpan.org/modules/by-module/Kwiki/
  130. regex = Kwiki-Archive-Rcs-(__VER__)\.tar\.gz
  131. }
  132. prog kwiki:Kwiki-Autoformat = {
  133. version = %{V_kwiki_autoformat}
  134. url = http://www.cpan.org/modules/by-module/Kwiki/
  135. regex = Kwiki-Autoformat-(__VER__)\.tar\.gz
  136. }
  137. prog kwiki:Kwiki-Cache = {
  138. version = %{V_kwiki_cache}
  139. url = http://www.cpan.org/modules/by-module/Kwiki/
  140. regex = Kwiki-Cache-(__VER__)\.tar\.gz
  141. }
  142. prog kwiki:Kwiki-Revisions = {
  143. version = %{V_kwiki_revisions}
  144. url = http://www.cpan.org/modules/by-module/Kwiki/
  145. regex = Kwiki-Revisions-(__VER__)\.tar\.gz
  146. }
  147. prog kwiki:Kwiki-Diff = {
  148. version = %{V_kwiki_diff}
  149. url = http://www.cpan.org/modules/by-module/Kwiki/
  150. regex = Kwiki-Diff-(__VER__)\.tar\.gz
  151. }
  152. prog kwiki:Kwiki-RecentChanges = {
  153. version = %{V_kwiki_recentchanges}
  154. url = http://www.cpan.org/modules/by-module/Kwiki/
  155. regex = Kwiki-RecentChanges-(__VER__)\.tar\.gz
  156. }
  157. prog kwiki:Kwiki-RecentChangesRSS = {
  158. version = %{V_kwiki_recentchangesrss}
  159. url = http://www.cpan.org/modules/by-module/Kwiki/
  160. regex = Kwiki-RecentChangesRSS-(__VER__)\.tar\.gz
  161. }
  162. prog kwiki:Kwiki-Search = {
  163. version = %{V_kwiki_search}
  164. url = http://www.cpan.org/modules/by-module/Kwiki/
  165. regex = Kwiki-Search-(__VER__)\.tar\.gz
  166. }
  167. prog kwiki:Kwiki-GDGraphGenerator = {
  168. version = %{V_kwiki_gdgraphgenerator}
  169. url = http://www.cpan.org/modules/by-module/Kwiki/
  170. regex = Kwiki-GDGraphGenerator-(__VER__)\.tar\.gz
  171. }
  172. prog kwiki:Kwiki-GoogleLink = {
  173. version = %{V_kwiki_googlelink}
  174. url = http://www.cpan.org/modules/by-module/Kwiki/
  175. regex = Kwiki-GoogleLink-(__VER__)\.tar\.gz
  176. }
  177. prog kwiki:Kwiki-Icons-Crystal = {
  178. version = %{V_kwiki_icons_crystal}
  179. url = http://www.cpan.org/modules/by-module/Kwiki/
  180. regex = Kwiki-Icons-Crystal-(__VER__)\.tar\.gz
  181. }
  182. prog kwiki:Kwiki-Icons-Gnome = {
  183. version = %{V_kwiki_icons_gnome}
  184. url = http://www.cpan.org/modules/by-module/Kwiki/
  185. regex = Kwiki-Icons-Gnome-(__VER__)\.tar\.gz
  186. }
  187. prog kwiki:Kwiki-Image = {
  188. version = %{V_kwiki_image}
  189. url = http://www.cpan.org/modules/by-module/Kwiki/
  190. regex = Kwiki-Image-(__VER__)\.tar\.gz
  191. }
  192. prog kwiki:Kwiki-MindMap = {
  193. version = %{V_kwiki_mindmap}
  194. url = http://www.cpan.org/modules/by-module/Kwiki/
  195. regex = Kwiki-MindMap-(__VER__)\.tar\.gz
  196. }
  197. prog kwiki:Kwiki-ModPerl = {
  198. version = %{V_kwiki_modperl}
  199. url = http://www.cpan.org/modules/by-module/Kwiki/
  200. regex = Kwiki-ModPerl-(__VER__)\.tar\.gz
  201. }
  202. prog kwiki:Kwiki-NewPage = {
  203. version = %{V_kwiki_newpage}
  204. url = http://www.cpan.org/modules/by-module/Kwiki/
  205. regex = Kwiki-NewPage-(__VER__)\.tar\.gz
  206. }
  207. prog kwiki:Kwiki-Notify-Mail = {
  208. version = %{V_kwiki_notify_mail}
  209. url = http://www.cpan.org/modules/by-module/Kwiki/
  210. regex = Kwiki-Notify-Mail-(__VER__)\.tar\.gz
  211. }
  212. prog kwiki:Kwiki-PageInclude = {
  213. version = %{V_kwiki_pageinclude}
  214. url = http://www.cpan.org/modules/by-module/Kwiki/
  215. regex = Kwiki-PageInclude-(__VER__)\.tar\.gz
  216. }
  217. prog kwiki:Kwiki-ParagraphBlocks = {
  218. version = %{V_kwiki_paragraphblocks}
  219. url = http://www.cpan.org/modules/by-module/Kwiki/
  220. regex = Kwiki-ParagraphBlocks-(__VER__)\.tar\.gz
  221. }
  222. prog kwiki:Kwiki-PreformattedBlocks = {
  223. version = %{V_kwiki_preformattedblocks}
  224. url = http://www.cpan.org/modules/by-module/Kwiki/
  225. regex = Kwiki-PreformattedBlocks-(__VER__)\.tar\.gz
  226. }
  227. prog kwiki:Kwiki-ShellBlocks = {
  228. version = %{V_kwiki_shellblocks}
  229. url = http://www.cpan.org/modules/by-module/Kwiki/
  230. regex = Kwiki-ShellBlocks-(__VER__)\.tar\.gz
  231. }
  232. prog kwiki:Kwiki-ShortcutLinks = {
  233. version = %{V_kwiki_shortcutlinks}
  234. url = http://www.cpan.org/modules/by-module/Kwiki/
  235. regex = Kwiki-ShortcutLinks-(__VER__)\.tar\.gz
  236. }
  237. prog kwiki:Kwiki-Toolbar-List = {
  238. version = %{V_kwiki_toolbar_list}
  239. url = http://www.cpan.org/modules/by-module/Kwiki/
  240. regex = Kwiki-Toolbar-List-(__VER__)\.tar\.gz
  241. }
  242. prog kwiki:Kwiki-UserName = {
  243. version = %{V_kwiki_username}
  244. url = http://www.cpan.org/modules/by-module/Kwiki/
  245. regex = Kwiki-UserName-(__VER__)\.tar\.gz
  246. }
  247. prog kwiki:Kwiki-UserPreferences = {
  248. version = %{V_kwiki_userpreferences}
  249. url = http://www.cpan.org/modules/by-module/Kwiki/
  250. regex = Kwiki-UserPreferences-(__VER__)\.tar\.gz
  251. }
  252. prog kwiki:Kwiki-VimMode = {
  253. version = %{V_kwiki_vimmode}
  254. url = http://www.cpan.org/modules/by-module/Kwiki/
  255. regex = Kwiki-VimMode-(__VER__)\.tar\.gz
  256. }
  257. %prep
  258. %setup -q -c
  259. %setup -q -T -D -a 1
  260. %setup -q -T -D -a 2
  261. %setup -q -T -D -a 3
  262. %setup -q -T -D -a 4
  263. %setup -q -T -D -a 5
  264. %setup -q -T -D -a 6
  265. %setup -q -T -D -a 7
  266. %setup -q -T -D -a 8
  267. %setup -q -T -D -a 9
  268. %setup -q -T -D -a 10
  269. %setup -q -T -D -a 11
  270. %setup -q -T -D -a 12
  271. %setup -q -T -D -a 13
  272. %setup -q -T -D -a 14
  273. %setup -q -T -D -a 15
  274. %setup -q -T -D -a 16
  275. %setup -q -T -D -a 17
  276. %setup -q -T -D -a 18
  277. %setup -q -T -D -a 19
  278. %setup -q -T -D -a 20
  279. %setup -q -T -D -a 21
  280. %setup -q -T -D -a 22
  281. %setup -q -T -D -a 23
  282. %setup -q -T -D -a 24
  283. %setup -q -T -D -a 25
  284. %setup -q -T -D -a 26
  285. %setup -q -T -D -a 27
  286. %setup -q -T -D -a 28
  287. %build
  288. %install
  289. rm -rf $RPM_BUILD_ROOT
  290. # install program components
  291. %{l_prefix}/bin/perl-openpkg prepare
  292. %{l_prefix}/bin/perl-openpkg -d %{SOURCE0} configure build install
  293. %{l_prefix}/bin/perl-openpkg -d %{SOURCE1} configure build install
  294. %{l_prefix}/bin/perl-openpkg -d %{SOURCE2} configure build install
  295. %{l_prefix}/bin/perl-openpkg -d %{SOURCE3} configure build install
  296. %{l_prefix}/bin/perl-openpkg -d %{SOURCE4} configure build install
  297. %{l_prefix}/bin/perl-openpkg -d %{SOURCE5} configure build install
  298. %{l_prefix}/bin/perl-openpkg -d %{SOURCE6} configure build install
  299. %{l_prefix}/bin/perl-openpkg -d %{SOURCE7} configure build install
  300. %{l_prefix}/bin/perl-openpkg -d %{SOURCE8} configure build install
  301. %{l_prefix}/bin/perl-openpkg -d %{SOURCE9} configure build install
  302. %{l_prefix}/bin/perl-openpkg -d %{SOURCE10} configure build install
  303. %{l_prefix}/bin/perl-openpkg -d %{SOURCE11} configure build install
  304. %{l_prefix}/bin/perl-openpkg -d %{SOURCE12} configure build install
  305. %{l_prefix}/bin/perl-openpkg -d %{SOURCE13} configure build install
  306. %{l_prefix}/bin/perl-openpkg -d %{SOURCE14} configure build install
  307. %{l_prefix}/bin/perl-openpkg -d %{SOURCE15} configure build install
  308. %{l_prefix}/bin/perl-openpkg -d %{SOURCE16} configure build install
  309. %{l_prefix}/bin/perl-openpkg -d %{SOURCE17} configure build install
  310. %{l_prefix}/bin/perl-openpkg -d %{SOURCE18} configure build install
  311. %{l_prefix}/bin/perl-openpkg -d %{SOURCE19} configure build install
  312. %{l_prefix}/bin/perl-openpkg -d %{SOURCE20} configure build install
  313. %{l_prefix}/bin/perl-openpkg -d %{SOURCE21} configure build install
  314. %{l_prefix}/bin/perl-openpkg -d %{SOURCE22} configure build install
  315. %{l_prefix}/bin/perl-openpkg -d %{SOURCE23} configure build install
  316. %{l_prefix}/bin/perl-openpkg -d %{SOURCE24} configure build install
  317. %{l_prefix}/bin/perl-openpkg -d %{SOURCE25} configure build install
  318. %{l_prefix}/bin/perl-openpkg -d %{SOURCE26} configure build install
  319. %{l_prefix}/bin/perl-openpkg -d %{SOURCE27} configure build install
  320. %{l_prefix}/bin/perl-openpkg -d %{SOURCE28} configure build install
  321. %{l_prefix}/bin/perl-openpkg -F perl-openpkg-files fixate cleanup
  322. # install Apache configuration
  323. %{l_shtool} mkdir -f -p -m 755 \
  324. $RPM_BUILD_ROOT%{l_prefix}/etc/kwiki
  325. %{l_shtool} install -c -m 644 %{l_value -s -a} \
  326. %{SOURCE kwiki-apache.conf} \
  327. $RPM_BUILD_ROOT%{l_prefix}/etc/kwiki/
  328. # install Kwiki state directory
  329. %{l_shtool} mkdir -f -p -m 755 \
  330. $RPM_BUILD_ROOT%{l_prefix}/var/kwiki
  331. # determine installation files
  332. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
  333. %{l_files_std} `cat perl-openpkg-files` \
  334. '%config %{l_prefix}/etc/kwiki/*' \
  335. '%attr(-,%{l_nusr},%{l_ngrp}) %{l_prefix}/var/kwiki'
  336. %files -f files
  337. %clean
  338. rm -rf $RPM_BUILD_ROOT
  339. %post
  340. if [ ".$1" = .1 ]; then
  341. # add hook to Apache configuration
  342. apacheconf="$RPM_INSTALL_PREFIX/etc/apache/apache.conf"
  343. if [ -f $apacheconf ]; then
  344. ( echo "Include $RPM_INSTALL_PREFIX/etc/kwiki/kwiki-apache.conf"
  345. ) | $RPM_INSTALL_PREFIX/lib/openpkg/rpmtool config \
  346. -a -i "$RPM_INSTALL_PREFIX:kwiki" $apacheconf
  347. fi
  348. # create initial Kwiki
  349. ( cd $RPM_INSTALL_PREFIX/var/kwiki || exit $?
  350. $RPM_INSTALL_PREFIX/bin/kwiki -new
  351. $RPM_INSTALL_PREFIX/bin/kwiki -add \
  352. Kwiki::AnchorLink \
  353. Kwiki::Archive::Rcs \
  354. Kwiki::Autoformat \
  355. Kwiki::Cache \
  356. Kwiki::Revisions \
  357. Kwiki::Diff \
  358. Kwiki::RecentChanges \
  359. Kwiki::RecentChangesRSS \
  360. Kwiki::Search \
  361. Kwiki::GDGraphGenerator \
  362. Kwiki::GoogleLink \
  363. Kwiki::Icons::Crystal \
  364. Kwiki::Icons::Gnome \
  365. Kwiki::Image \
  366. Kwiki::NewPage \
  367. Kwiki::Notify::Mail \
  368. Kwiki::PageInclude \
  369. Kwiki::ParagraphBlocks \
  370. Kwiki::PreformattedBlocks \
  371. Kwiki::ShellBlocks \
  372. Kwiki::ShortcutLinks \
  373. Kwiki::Toolbar::List \
  374. Kwiki::UserName \
  375. Kwiki::UserPreferences
  376. # Kwiki::MindMap
  377. # Kwiki::VimMode
  378. $RPM_INSTALL_PREFIX/bin/htpasswd -b -c passwd admin admin
  379. ) || exit $?
  380. # display information about steps the admin should perform next
  381. ( echo "Kwiki was successfully installed. You should now start Apache with"
  382. echo " \$ $RPM_INSTALL_PREFIX/etc/rc apache start"
  383. ) | %{l_rpmtool} msg -b -t notice
  384. fi
  385. %postun
  386. if [ ".$1" = .0 ]; then
  387. # remove hook from Apache configuration
  388. apacheconf="$RPM_INSTALL_PREFIX/etc/apache/apache.conf"
  389. if [ -f $apacheconf ]; then
  390. $RPM_INSTALL_PREFIX/lib/openpkg/rpmtool config \
  391. -r -i "$RPM_INSTALL_PREFIX:kwiki" $apacheconf
  392. fi
  393. # remove Kwiki files
  394. rm -rf $RPM_INSTALL_PREFIX/var/kwiki/.[a-z]* 2>/dev/null || true
  395. rm -rf $RPM_INSTALL_PREFIX/var/kwiki/* 2>/dev/null || true
  396. fi