rt.spec 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434
  1. ##
  2. ## rt.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. # FIXME: rse: Error: MM: mm:core: failed to open semaphore file (Permission denied): OS: No such file or directory
  26. # package versions
  27. %define V_rt 3.0.11
  28. %define V_log_dispatch 2.04
  29. %define V_html_mason 1.26
  30. %define V_mldbm 2.01
  31. %define V_html_format 2.04
  32. %define V_regexp_common 2.113
  33. %define V_cache_cache 1.02
  34. # package information
  35. Name: rt
  36. Summary: Request Tracker
  37. URL: http://bestpractical.com/rt/
  38. Vendor: Best Practical
  39. Packager: The OpenPKG Project
  40. Distribution: OpenPKG
  41. Class: EVAL
  42. Group: Database
  43. License: GPL
  44. Version: %{V_rt}
  45. Release: 20040602
  46. # package options
  47. %option with_color_primary 336699
  48. %option with_color_secondary dddddd
  49. %option with_db_mysql yes
  50. %option with_db_pgsql no
  51. %option with_db_oracle no
  52. # fixing conflicting options
  53. %if "%{with_db_oracle}" == "yes"
  54. %undefine with_db_pgsql
  55. %define with_db_pgsql no
  56. %endif
  57. %if "%{with_db_oracle}" == "yes" || "%{with_db_pgsql}" == "yes"
  58. %undefine with_db_mysql
  59. %define with_db_mysql no
  60. %endif
  61. # list of sources
  62. Source0: http://download.bestpractical.com/pub/rt/release/rt-%{V_rt}.tar.gz
  63. Source1: http://www.cpan.org/modules/by-module/Log/Log-Dispatch-%{V_log_dispatch}.tar.gz
  64. Source2: http://www.cpan.org/modules/by-module/HTML/HTML-Mason-%{V_html_mason}.tar.gz
  65. Source3: http://www.cpan.org/modules/by-authors/id/C/CH/CHAMAS/MLDBM-%{V_mldbm}.tar.gz
  66. Source4: http://www.cpan.org/modules/by-authors/id/S/SB/SBURKE/HTML-Format-%{V_html_format}.tar.gz
  67. Source5: http://www.cpan.org/modules/by-authors/id/A/AB/ABIGAIL/Regexp-Common-%{V_regexp_common}.tar.gz
  68. Source6: http://www.cpan.org/modules/by-authors/id/D/DC/DCLINTON/Cache-Cache-%{V_cache_cache}.tar.gz
  69. Source7: rc.rt
  70. Source8: rtsetup
  71. Source9: rtcleanup
  72. Source10: rtupgrade
  73. Source11: rtapachectl
  74. Source12: rtapache.conf
  75. Source13: config.layout
  76. Source14: rt-mailgate.sh
  77. Patch0: rt.patch
  78. # build information
  79. Prefix: %{l_prefix}
  80. BuildRoot: %{l_buildroot}
  81. BuildPreReq: OpenPKG, openpkg >= 20040130, perl, perl-openpkg >= 5.8.3-20040126
  82. BuildPreReq: perl-sys, perl-util, perl-ds, perl-text, perl-apache
  83. BuildPreReq: perl-dbi, perl-dbix, perl-mail, perl-www
  84. BuildPreReq: apache, apache::with_mod_perl = yes
  85. PreReq: OpenPKG, openpkg >= 20040130, perl
  86. PreReq: perl-sys, perl-util, perl-ds, perl-text, perl-apache
  87. PreReq: perl-dbi, perl-dbix, perl-mail, perl-www, perl-locale
  88. PreReq: apache, apache::with_mod_perl = yes
  89. %if "%{with_db_mysql}" == "yes"
  90. PreReq: mysql, perl-dbi::with_dbd_mysql = yes
  91. %endif
  92. %if "%{with_db_pgsql}" == "yes"
  93. PreReq: postgresql, perl-dbi::with_dbd_pgsql = yes
  94. %endif
  95. %if "%{with_db_oracle}" == "yes"
  96. PreReq: oracle, perl-dbi::with_dbd_oracle = yes
  97. %endif
  98. PreReq: MTA
  99. AutoReq: no
  100. AutoReqProv: no
  101. %description
  102. RT is an industrial-grade ticketing system. It lets a group of
  103. people intelligently and efficiently manage requests submitted by a
  104. community of users. RT is used by systems administrators, customer
  105. support staffs, NOCs, developers and even marketing departments at
  106. over a thousand sites around the world.
  107. %track
  108. prog rt = {
  109. version = %{V_rt}
  110. url = http://bestpractical.com/rt/download.html
  111. regex = rt-(__VER__)\.tar\.gz
  112. }
  113. prog rt:cache-cache = {
  114. version = %{V_cache_cache}
  115. url = http://www.cpan.org/modules/by-authors/id/D/DC/DCLINTON/
  116. regex = Cache-Cache-(__VER__).tar.gz
  117. }
  118. prog rt:html-format = {
  119. version = %{V_html_format}
  120. url = http://www.cpan.org/modules/by-authors/id/S/SB/SBURKE/
  121. regex = HTML-Format-(__VER__).tar.gz
  122. }
  123. prog rt:html-mason = {
  124. version = %{V_html_mason}00
  125. url = http://www.cpan.org/modules/by-module/HTML/
  126. regex = HTML-Mason-(__VER__)\.tar\.gz
  127. transform = "s/^(\\d+\\.\\d\\d)$/${1}00/; $_"
  128. }
  129. prog rt:log-dispatch = {
  130. disabled
  131. comment = "rse: 2.05 and higher have too nasty dependencies like YAML, Module::Build, etc"
  132. version = %{V_log_dispatch}
  133. url = http://www.cpan.org/modules/by-module/Log/
  134. regex = Log-Dispatch-(__VER__)\.tar\.gz
  135. }
  136. prog rt:mldbm = {
  137. version = %{V_mldbm}
  138. url = http://www.cpan.org/modules/by-authors/id/C/CH/CHAMAS/
  139. regex = MLDBM-(__VER__).tar.gz
  140. }
  141. prog rt:regexp-common = {
  142. version = %{V_regexp_common}
  143. url = http://www.cpan.org/modules/by-authors/id/A/AB/ABIGAIL/
  144. regex = Regexp-Common-(__VER__).tar.gz
  145. }
  146. %prep
  147. # unpack distribution tarballs
  148. %setup -q -c
  149. %setup -q -T -D -a 1
  150. %setup -q -T -D -a 2
  151. %setup -q -T -D -a 3
  152. %setup -q -T -D -a 4
  153. %setup -q -T -D -a 5
  154. %setup -q -T -D -a 6
  155. # patch RT distribution
  156. cd rt-%{V_rt}
  157. %patch -p0
  158. %{l_shtool} install -c -m 0644 %{l_value -s -a} \
  159. %{SOURCE config.layout} .
  160. %{l_shtool} subst \
  161. -e 's;chown;true;g' \
  162. -e 's;chgrp;true;g' \
  163. -e 's;chmod;true;g' \
  164. -e 's;mkdir -p;%{l_shtool} mkdir -p;g' \
  165. Makefile.in
  166. %{l_shtool} subst \
  167. -e 's;Locale::Maketext 1\.04;Locale::Maketext 1.03;' \
  168. lib/RT/I18N.pm
  169. %{l_shtool} subst \
  170. -e 's;/usr/sbin/sendmail;%{l_prefix}/sbin/sendmail;g' \
  171. etc/RT_Config.pm.in
  172. %build
  173. # configure RT part
  174. cd rt-%{V_rt}
  175. PERL=%{l_prefix}/bin/perl
  176. ./configure \
  177. --enable-layout=OPKG \
  178. --with-db-type=mysql \
  179. --with-db-host=localhost \
  180. --with-db-home=%{l_prefix} \
  181. %if "%{with_db_mysql}" == "yes"
  182. --with-db-dba=root \
  183. --with-db-database=rt \
  184. --with-db-user=rt \
  185. --with-db-pass=XXX \
  186. %endif
  187. %if "%{with_db_pgsql}" == "yes"
  188. --with-db-dba=postgresql \
  189. --with-db-database=rt \
  190. --with-db-user=rt \
  191. --with-db-pass=XXX \
  192. %endif
  193. %if "%{with_db_oracle}" == "yes"
  194. --with-db-dba=system \
  195. --with-db-database=rt \
  196. --with-db-user=rt \
  197. --with-db-pass=XXX \
  198. %endif
  199. --with-web-user=%{l_nusr} \
  200. --with-web-group=%{l_ngrp} \
  201. --with-customdir=%{l_prefix}/etc/rt/local \
  202. --with-customhtmldir=%{l_prefix}/etc/rt/local/html \
  203. --with-customlibdir=%{l_prefix}/etc/rt/local/lib \
  204. --with-customlexdir=%{l_prefix}/etc/rt/local/po
  205. %install
  206. rm -rf $RPM_BUILD_ROOT
  207. # perform common Perl prolog operations
  208. %{l_shtool} mkdir -f -p -m 755 ${RPM_BUILD_ROOT}%{l_prefix}/libexec/rt
  209. %{l_prefix}/bin/perl-openpkg prepare
  210. # install remaining prerequisite Perl modules which
  211. # are not part of the OpenPKG perl-xxx packages.
  212. %{l_prefix}/bin/perl-openpkg -d Regexp-Common-%{V_regexp_common} -l %{l_prefix}/libexec/rt configure build install
  213. %{l_prefix}/bin/perl-openpkg -d Log-Dispatch-%{V_log_dispatch} -l %{l_prefix}/libexec/rt configure build install
  214. %{l_prefix}/bin/perl-openpkg -d Cache-Cache-%{V_cache_cache} -l %{l_prefix}/libexec/rt configure build install
  215. %{l_prefix}/bin/perl-openpkg -d HTML-Mason-%{V_html_mason} -l %{l_prefix}/libexec/rt configure build install
  216. %{l_prefix}/bin/perl-openpkg -d MLDBM-%{V_mldbm} -l %{l_prefix}/libexec/rt configure build install
  217. %{l_prefix}/bin/perl-openpkg -d HTML-Format-%{V_html_format} -l %{l_prefix}/libexec/rt configure build install
  218. %{l_prefix}/bin/perl-openpkg -F perl-openpkg-files fixate cleanup
  219. # create installation file hierarchy
  220. %{l_shtool} mkdir -f -p -m 0755 \
  221. $RPM_BUILD_ROOT%{l_prefix}/sbin \
  222. $RPM_BUILD_ROOT%{l_prefix}/etc/rt \
  223. $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d \
  224. $RPM_BUILD_ROOT%{l_prefix}/cgi/rt \
  225. $RPM_BUILD_ROOT%{l_prefix}/share/rt \
  226. $RPM_BUILD_ROOT%{l_prefix}/libexec/rt/tools \
  227. $RPM_BUILD_ROOT%{l_prefix}/libexec/rt/etc/upgrade \
  228. $RPM_BUILD_ROOT%{l_prefix}/var/rt/mason-data \
  229. $RPM_BUILD_ROOT%{l_prefix}/var/rt/mason-session \
  230. $RPM_BUILD_ROOT%{l_prefix}/var/rt/log \
  231. $RPM_BUILD_ROOT%{l_prefix}/var/rt/run
  232. # perform RT installation procedure
  233. ( cd rt-%{V_rt}
  234. %{l_make} %{l_mflags} \
  235. config-install dirs libs-install etc-install bin-install \
  236. sbin-install html-install doc-install \
  237. DESTDIR=$RPM_BUILD_ROOT
  238. %{l_shtool} install -c -m 0644 \
  239. etc/upgrade/* \
  240. $RPM_BUILD_ROOT%{l_prefix}/libexec/rt/etc/upgrade/
  241. %{l_shtool} install -c -m 0644 \
  242. -e '/Set($WebBaseURL/s;"[^"]*";"";' \
  243. etc/RT_Config.pm \
  244. $RPM_BUILD_ROOT%{l_prefix}/etc/rt/RT_SiteConfig.pm
  245. ) || exit $?
  246. # post-adjust installation hierarchy
  247. %{l_shtool} mkln -f -s \
  248. $RPM_BUILD_ROOT%{l_prefix}/etc/rt/RT_SiteConfig.pm \
  249. $RPM_BUILD_ROOT%{l_prefix}/libexec/rt/etc/RT_SiteConfig.pm
  250. mv \
  251. $RPM_BUILD_ROOT%{l_prefix}/libexec/rt/WebRT/html/NoAuth/webrt.css \
  252. $RPM_BUILD_ROOT%{l_prefix}/etc/rt/webrt.css
  253. %{l_shtool} mkln -f -s \
  254. $RPM_BUILD_ROOT%{l_prefix}/etc/rt/webrt.css \
  255. $RPM_BUILD_ROOT%{l_prefix}/libexec/rt/WebRT/html/NoAuth/webrt.css
  256. mv \
  257. $RPM_BUILD_ROOT%{l_prefix}/libexec/rt/local \
  258. $RPM_BUILD_ROOT%{l_prefix}/etc/rt/local
  259. %{l_shtool} mkln -f -s \
  260. $RPM_BUILD_ROOT%{l_prefix}/etc/rt/local \
  261. $RPM_BUILD_ROOT%{l_prefix}/libexec/rt/local
  262. mv \
  263. $RPM_BUILD_ROOT%{l_prefix}/bin/webmux.pl \
  264. $RPM_BUILD_ROOT%{l_prefix}/bin/mason_handler.fcgi \
  265. $RPM_BUILD_ROOT%{l_prefix}/cgi/rt/
  266. mv \
  267. $RPM_BUILD_ROOT%{l_prefix}/bin/rt-crontool \
  268. $RPM_BUILD_ROOT%{l_prefix}/bin/rt-mailgate \
  269. $RPM_BUILD_ROOT%{l_prefix}/libexec/rt/tools/
  270. %{l_shtool} install -c -m 755 %{l_value -s -a} \
  271. %{SOURCE rt-mailgate.sh} \
  272. $RPM_BUILD_ROOT%{l_prefix}/bin/rt-mailgate
  273. # strip installation hierarchy
  274. rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/*.svc
  275. rm -f $RPM_BUILD_ROOT%{l_prefix}/libexec/rt/tools/rt-test-dependencies
  276. rm -rf $RPM_BUILD_ROOT%{l_prefix}/libexec/rt/t
  277. rm -f $RPM_BUILD_ROOT%{l_prefix}/libexec/rt/RT.pm.in
  278. rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/xgettext.pl
  279. rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/pod2test
  280. rm -rf $RPM_BUILD_ROOT%{l_prefix}/man/man3
  281. rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/rt
  282. # install own setup/cleanup/upgrade script
  283. %if "%{with_db_mysql}" == "yes"
  284. rt_db_dba=root
  285. %endif
  286. %if "%{with_db_pgsql}" == "yes"
  287. rt_db_dba=postgresql
  288. %endif
  289. %if "%{with_db_oracle}" == "yes"
  290. rt_db_dba=system
  291. %endif
  292. %{l_shtool} install -c -m 755 %{l_value -s -a} \
  293. -e "s;@rt_db_dba@;$rt_db_dba;g" \
  294. %{SOURCE rtsetup} %{SOURCE rtcleanup} %{SOURCE rtupgrade} \
  295. $RPM_BUILD_ROOT%{l_prefix}/sbin/
  296. # install OpenPKG run-command script
  297. %{l_shtool} install -c -m 755 %{l_value -s -a} \
  298. %{SOURCE rc.rt} \
  299. $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
  300. # install Apache "apachectl" wrapper
  301. %{l_shtool} install -c -m 755 %{l_value -s -a} \
  302. %{SOURCE rtapachectl} \
  303. $RPM_BUILD_ROOT%{l_prefix}/libexec/rt/tools/
  304. # install Apache configuration
  305. l_hostname=`%{l_shtool} echo -e %h`
  306. l_domainname=`%{l_shtool} echo -e %d | cut -c2-`
  307. %{l_shtool} install -c -m 755 %{l_value -s -a} \
  308. -e "s;@l_hostname@;$l_hostname;g" \
  309. -e "s;@l_domainname@;$l_domainname;g" \
  310. %{SOURCE rtapache.conf} \
  311. $RPM_BUILD_ROOT%{l_prefix}/etc/rt/
  312. # final post-adjustments to installation hierarchy
  313. %{l_shtool} subst \
  314. -e 's;#336699;#%{with_color_primary};g' \
  315. -e 's;#dddddd;#%{with_color_secondary};g' \
  316. `find $RPM_BUILD_ROOT%{l_prefix}/libexec/rt/WebRT \
  317. -type f -print | grep -v gif | grep -v jpg | grep -v .orig`
  318. find $RPM_BUILD_ROOT%{l_prefix}/libexec/rt \
  319. -type f -name "*.html" -print | xargs chmod 644
  320. find $RPM_BUILD_ROOT%{l_prefix}/libexec/rt \
  321. -type f -name "*.pm" -print | xargs chmod 644
  322. find $RPM_BUILD_ROOT%{l_prefix}/libexec/rt \
  323. -type f -print | xargs chmod a+r
  324. find $RPM_BUILD_ROOT%{l_prefix}/libexec/rt \
  325. -type d -print | xargs chmod 755
  326. find ${RPM_BUILD_ROOT}${l_prefix} -name .packlist -print | xargs rm -f
  327. # determine installation files
  328. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
  329. %{l_files_std} `cat perl-openpkg-files` \
  330. '%{l_prefix}/libexec/rt' \
  331. '%attr(755,%{l_musr},%{l_mgrp}) %{l_prefix}/libexec/rt/tools/rt-setup-database' \
  332. '%attr(755,%{l_musr},%{l_mgrp}) %{l_prefix}/libexec/rt/tools/rt-crontool' \
  333. '%attr(755,%{l_musr},%{l_mgrp}) %{l_prefix}/libexec/rt/tools/rt-mailgate' \
  334. '%config %attr(640,%{l_musr},%{l_rgrp}) %{l_prefix}/etc/rt/RT_SiteConfig.pm' \
  335. '%config %attr(640,%{l_musr},%{l_rgrp}) %{l_prefix}/etc/rt/rtapache.conf' \
  336. '%config %attr(644,%{l_musr},%{l_rgrp}) %{l_prefix}/etc/rt/webrt.css' \
  337. '%attr(750,%{l_rusr},%{l_rgrp}) %{l_prefix}/var/rt/mason-data' \
  338. '%attr(750,%{l_rusr},%{l_rgrp}) %{l_prefix}/var/rt/mason-data/*' \
  339. '%attr(750,%{l_rusr},%{l_rgrp}) %{l_prefix}/var/rt/mason-session' \
  340. '%attr(750,%{l_rusr},%{l_rgrp}) %{l_prefix}/var/rt/log' \
  341. '%attr(750,%{l_rusr},%{l_rgrp}) %{l_prefix}/var/rt/run'
  342. %files -f files
  343. %clean
  344. rm -rf $RPM_BUILD_ROOT
  345. %post
  346. if [ $1 -eq 1 ]; then
  347. # activate in MTA configuration
  348. aliases_file=`$RPM_INSTALL_PREFIX/etc/rc --query MTA_aliases_file`
  349. aliases_update=`$RPM_INSTALL_PREFIX/etc/rc --query MTA_aliases_update`
  350. if [ ".$aliases_file" != . ]; then
  351. ( echo "rt: \"|$RPM_INSTALL_PREFIX/bin/rt-mailgate --action correspond --queue general --url http://127.0.0.1:8380/\""
  352. echo "rt-comment: \"|$RPM_INSTALL_PREFIX/bin/rt-mailgate --action comment --queue general --url http://127.0.0.1:8380/\""
  353. ) | %{l_rpmtool} config -a -i "$RPM_INSTALL_PREFIX:rt" $aliases_file
  354. fi
  355. if [ ".$aliases_update" != . ]; then
  356. eval $aliases_update
  357. fi
  358. # display final hint after initial installation
  359. ( echo "To complete installation of RT, please check the file"
  360. echo " $RPM_INSTALL_PREFIX/etc/rt/RT_SiteConfig.pm"
  361. echo "In particular, you have to assign a password to the RT"
  362. echo "database user. Then you have to start the MySQL RDBMS and"
  363. echo "create the initial RT database with:"
  364. echo " \$ $RPM_INSTALL_PREFIX/etc/rc mysql start"
  365. echo " \$ $RPM_INSTALL_PREFIX/sbin/rtsetup"
  366. echo "After this post-installation, start RT by running"
  367. echo " \$ $RPM_INSTALL_PREFIX/etc/rc rt start"
  368. echo "and connect with a browser to:"
  369. echo " http://127.0.0.1:8380/"
  370. echo "Login as 'root' (with initial password 'password')"
  371. echo "to change the password to a custom one."
  372. ) | %{l_rpmtool} msg -b -t notice
  373. elif [ $1 -gt 1 ]; then
  374. # display final hint after upgrading
  375. ( echo "If you have an old RT database you can erase it with:"
  376. echo " \$ $RPM_INSTALL_PREFIX/sbin/rtcleanup"
  377. echo "Upgrading from an earlier RT 3.x database you can with:"
  378. echo " \$ $RPM_INSTALL_PREFIX/sbin/rtupgrade <old-rt-version>"
  379. ) | %{l_rpmtool} msg -b -t notice
  380. fi
  381. %preun
  382. if [ $1 -eq 0 ]; then
  383. # stop perhaps still running server
  384. $RPM_INSTALL_PREFIX/etc/rc rt stop
  385. # deactivate in MTA configuration
  386. aliases_file=`$RPM_INSTALL_PREFIX/etc/rc --query MTA_aliases_file`
  387. aliases_update=`$RPM_INSTALL_PREFIX/etc/rc --query MTA_aliases_update`
  388. if [ ".$aliases_file" != . ]; then
  389. %{l_rpmtool} config -r -i "$RPM_INSTALL_PREFIX:rt" $aliases_file
  390. fi
  391. if [ ".$aliases_update" != . ]; then
  392. eval $aliases_update
  393. fi
  394. # remove generated files
  395. rm -f $RPM_INSTALL_PREFIX/var/rt/mason-session/*
  396. rm -rf $RPM_INSTALL_PREFIX/var/rt/mason-data/*/*
  397. rm -f $RPM_INSTALL_PREFIX/var/rt/log/*
  398. rm -f $RPM_INSTALL_PREFIX/var/rt/run/apache.pid
  399. rm -f $RPM_INSTALL_PREFIX/var/rt/run/ssl_scache
  400. fi