fml-vl.spec 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244
  1. %define ver 4.0
  2. %define prefix %{_perfix}
  3. %define snapdate 20040215
  4. %define snapshot stable-%{snapdate}
  5. Name: fml
  6. Version: %{ver}_stable_%{snapdate}
  7. Release: 2%{?_dist_release}
  8. License: GPL
  9. URL: http://www.fml.org/
  10. Source: ftp://ftp.fml.org/pub/fml/stable/%{name}-%{ver}-%{snapshot}.tar.gz
  11. Source1: fml-readme.vine
  12. Patch1: fml-aliases.patch
  13. Patch2: fml-noMailAddress.patch
  14. Group: System Environment/Daemons
  15. Summary: mailing list server and utility package
  16. Summary(ja): メーリングリストサーバとユーティリティ
  17. Requires: perl >= 5.0
  18. BuildRoot: %{_tmppath}/%{name}-%{version}-root
  19. BuildPrereq: expect
  20. BuildPrereq: sed
  21. AutoReqProv: 0
  22. Vendor: Project Vine
  23. Distribution: Vine Linux
  24. %description
  25. FML is a package of mailing list server and utility programs. It
  26. consists of perl scripts. It has been developed, tested and advanced
  27. in Japan from 1993 to 2001.
  28. %description -l ja
  29. fml はメーリングリスト(以下 ML)を作るためのパッケージです。perl を使っ
  30. て書かれています。fml は、配送とコマンドメールを処理するプログラムを中
  31. 核に、多くのプログラムから構成されます。
  32. fml のセットアップやカスタマイズは makefml というプログラムにより、メ
  33. ニューで対話的に行うこともできます。fml 4.0 からは CGI から makefml
  34. の代表的な機能(登録、削除、メニューによる ML のカスタマイズ)を使う仕組
  35. みもあります。
  36. fml 4.0 の(目に見える)主な新機能は CGI インターフェイス、データベース
  37. アクセス(リレーショナルデータベース、LDAP)などです。
  38. 見えない変化としては初期化コードなどです。
  39. fml のデザインの根幹をなす思想は
  40. 『趣味やコンピュータ環境は人それぞれであり、それを尊重すること』です。
  41. そのため、様々なカスタマイズをする自由度があります。
  42. %prep
  43. %setup -q -n %{name}-%{ver}-%{snapshot}
  44. %patch1 -p0 -b .aliases
  45. %patch2 -p0 -b .noMailAddress
  46. %build
  47. %install
  48. rm -rf $RPM_BUILD_ROOT
  49. mkdir -p $RPM_BUILD_ROOT/var/
  50. mkdir -p $RPM_BUILD_ROOT/home/fml
  51. mkdir -p $RPM_BUILD_ROOT/home/fml/doc/man
  52. mkdir -p $RPM_BUILD_ROOT/home/fml/sbin
  53. cp %{SOURCE1} $RPM_BUILD_ROOT/home/fml/README-vine
  54. if [ -f fmlmake ]; then rm -f fmlmake ; fi
  55. cat <<-EOF >> ./fmlmake
  56. set timeout 60
  57. spawn perl ./makefml install
  58. expect "personal"
  59. send "personal\n"
  60. expect "DOMAIN NAME"
  61. send "domainname\n"
  62. expect "FQDN"
  63. send "hostname\n"
  64. expect "EXEC FILES DIRECTORY"
  65. send "$RPM_BUILD_ROOT/home/fml\n"
  66. expect "TOP LEVEL ML DIRECTORY"
  67. send "$RPM_BUILD_ROOT/var/spool/ml\n"
  68. expect "Language"
  69. # send "English\n"
  70. send "Japanese\n"
  71. expect "TimeZone"
  72. send "\n"
  73. expect "Install"
  74. send "y\n"
  75. interact
  76. EOF
  77. /usr/bin/expect ./fmlmake
  78. ( cd $RPM_BUILD_ROOT/home/fml/doc/man
  79. sed -e 's/\/var\/tmp\/%{name}-%{version}-root//g' fml.8 > fml.8.$$
  80. mv fml.8.$$ fml.8
  81. sed -e 's/\/var\/tmp\/%{name}-%{version}-root//g' makefml.1 > makefml.1.$$
  82. mv makefml.1.$$ makefml.1
  83. cd $RPM_BUILD_ROOT/home/fml/sbin/
  84. sed -e 's/\/var\/tmp\/%{name}-%{version}-root//g' makefml > makefml.$$
  85. mv makefml.$$ makefml
  86. chmod 755 makefml
  87. cd $RPM_BUILD_ROOT/home/fml/.fml
  88. sed -e 's/\/var\/tmp\/%{name}-%{version}-root//g' system > system.$$
  89. mv system.$$ system
  90. cd ..
  91. rm Configurations
  92. ln -sf .fml Configurations
  93. sed -e 's/\/var\/tmp\/%{name}-%{version}-root//g' makefml > makefml.$$
  94. mv makefml.$$ makefml
  95. chmod 755 makefml
  96. )
  97. pushd %{buildroot}
  98. for i in `grep -irl %{buildroot} *`
  99. do
  100. perl -pi -e 's@%{buildroot}@@g' $i
  101. done
  102. %clean
  103. rm -rf $RPM_BUILD_ROOT
  104. %pre
  105. /usr/sbin/groupadd -r fml
  106. /usr/sbin/useradd -r -g fml fml
  107. exit 0
  108. %post
  109. FQDN=`hostname`
  110. DOMAIN=`hostname -d`
  111. cd /home/fml/.fml
  112. sed -e "s/hostname/$FQDN/g; s/domainname/$DOMAIN/g" system > system.$$
  113. mv system.$$ system
  114. cd /home/fml
  115. for f in .fml/cgi.conf www/conf/cgi.cf ;
  116. do
  117. sed -e 's#sendmail#postfix#g; s#/var/tmp/%{name}-%{version}-root##g' $f > $f.$$
  118. mv $f.$$ $f
  119. done
  120. find www -name \*.cgi -exec sh -c \
  121. "sed -e 's#/var/tmp/%{name}-%{version}-root##g' {} > {}.$$ ;
  122. mv {}.$$ {} ;
  123. chown fml.fml {} ;
  124. chmod +x {} " \;
  125. echo "!!!!!!! CAUTION !!!!!!!"
  126. echo "Be sure to read /home/fml/README-vine."
  127. echo "And the /home/fml/.fml/system is set as follows:"
  128. echo " FQDN=$FQDN"
  129. echo " DOMAIN=$DOMAIN"
  130. echo "Please confirm the parameters and edit if you need."
  131. #%postun
  132. #/usr/sbin/userdel fml
  133. %files
  134. %defattr(-,fml,fml)
  135. /var/spool/ml
  136. /home/fml
  137. %changelog
  138. * Fri May 01 2009 KOBAYASHI Taizo <tkoba@vinelinux.org> 4.0-2
  139. - added aliases and noMailAddress patches
  140. * Thu Sep 25 2008 Shu KONNO <owa@bg.wakwak.com> 4.0-1vl5
  141. - applied new versioning policy, spec in utf-8
  142. * Fri Jul 1 2005 HOTTA Michihide <hotta@net-newbie.com> 4.0-0vl2
  143. - upstream release
  144. - fix config settings under /home/fml
  145. * Sun Apr 20 2003 KOBAYASHI R. Taizo <tkoba@vinelinux.org> 4.0-0vl1
  146. - modified for VineLinux
  147. - update 4.0 release stable-20030419 version
  148. * Fri May 11 2001 YAMAGUCHI Kenji <yamk@kondara.org>
  149. - (fml-4.0_stable_20010509-2k)
  150. - update 4.0 release stable-2001509 version
  151. * Mon Apr 16 2001 YAMAGUCHI Kenji <yamk@kondara.org>
  152. - (fml-4.0_stable_20010410-2k)
  153. - update 4.0 release stable-20010410 version
  154. - append "-r" option to groupadd, useradd
  155. * Fri Apr 6 2001 YAMAGUCHI Kenji <yamk@kondara.org>
  156. - (fml-4.0_stable_20010405-3k)
  157. - update 4.0 release stable-20010405 version
  158. * Sun Apr 1 2001 YAMAGUCHI Kenji <yamk@kondara.org>
  159. - (fml-4.0_stable_20010325-3k)
  160. - update 4.0 release stable-20010325 version
  161. - /var/tmp to %{_tmppath}
  162. - change Source URL.
  163. * Sun Jan 04 2001 YAMAGUCHI Kenji <yamk@kondara.org>
  164. - (fml-4.0_stable_20010202-3k)
  165. - update 4.0 release stable-20010202 version
  166. * Tue Nov 05 2000 Kenji Yamaguchi <yamk@kondara.org>
  167. [fml-3.0.1_stable_20001027-1k]
  168. - update 3.0.1 release stable-20001027 version
  169. * Tue Aug 15 2000 Kenji Yamaguchi <yamk@kondara.org>
  170. [fml-3.0.1_stable_20000807-1k]
  171. - update 3.0.1 release stable-20000807 version
  172. * Tue Aug 1 2000 Kenji Yamaguchi <yamk@kondara.org>
  173. [fml-3.0.1_stable_20000729-1k]
  174. - update 3.0.1 release stable-20000729 version
  175. * Sun Jul 10 2000 Kenji Yamaguchi <yamk@kondara.org>
  176. [fml-3.0.1_stable_20000628-1k]
  177. - update 3.0.1 release stable-20000628 version
  178. - Fixed Source URL.
  179. * Mon Jun 12 2000 Kenji Yamaguchi <yamk@kondara.org>
  180. - 3.0.1 release stable-20000510 version
  181. - remove source1 "fmlmake". That script is here-document.
  182. - _ja is japanese setup
  183. * Sun Jun 11 2000 Kenji Yamaguchi <yamk@kondara.org>
  184. - 3.0.1 release version
  185. * Sun Mar 12 2000 AYUHANA Tomonori <l@kondara.org>
  186. - SPEC fixed ( Group )
  187. * Mon Nov 8 1999 Toru Hoshina <t@kondara.org>
  188. - be a NoSrc :-P
  189. * Wed Oct 20 1999 Motonobu Ichimura <famao@kondara.org>
  190. - added AutoReqProv
  191. * Sat Oct 16 1999 Motonobu Ichimura <famao@kondara.org>
  192. - move BuildRoot from /var to /var/tmp and added some changes
  193. * Thu Oct 14 1999 Motonobu Ichimura <famao@kondara.org>
  194. - first release