dhisd-vl.spec 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216
  1. %define d_ver 5.0
  2. %define m_ver 5.0
  3. %define t_ver 5.0
  4. Summary: DHIS server, meant to update DNS records dynamically.
  5. Summary(ja): DHIS サーバ, DNS のデータを遠隔から動的に変更するツール
  6. Name: dhisd
  7. Version: 5.1
  8. Release: 0vl4
  9. License: Distributable (BSD like)
  10. Group: System Environment/Daemons
  11. URL: http://www.dhis.org/
  12. Source0: ftp://ftp.dhis.org/pub/dhis/%{name}-%{version}.tar.gz
  13. Source1: ftp://ftp.dhis.org/pub/dhis/dhis-dns-engine-%{d_ver}.tar.gz
  14. Source2: ftp://ftp.dhis.org/pub/dhis/dhis-mx-sendmail-engine-%{m_ver}.tar.gz
  15. Source3: ftp://ftp.dhis.org/pub/dhis/dhistools-dns-%{t_ver}.tar.gz
  16. Source4: rc.dhisd
  17. Requires: bind >= 8.2.3 gmp
  18. BuildRequires: bind-devel gmp-devel
  19. Buildroot: %{_tmppath}/%{name}-%{version}-root
  20. %description
  21. DHIS is a system meant to provide dynamic updates of
  22. DNS records for variable IP address states. The current system
  23. distribution is composed of three modules, dhisd, the DHIS
  24. server, relay, the mail relay server which may or may not be
  25. used, and dhid, the DHIS client.
  26. %description -l ja
  27. DHIS は、DNS のデータを遠隔から動的に変更するツールで、ダイヤルアップ等で
  28. 常時接続されていないマシンでも、接続時だけ DNS に登録することで、
  29. ドメイン名を用いたサーバを立ち上げることを可能にするシステムです。
  30. 本パッケージは DNS サーバと同一のマシン上にインストールする DHIS サーバです。
  31. (DHIS クライアントは dhid パッケージです。)
  32. %prep
  33. tar xvzf %{SOURCE1}
  34. tar xvzf %{SOURCE2}
  35. tar xvzf %{SOURCE3}
  36. %setup
  37. %build
  38. make RPM_OPT_FLAGS="$RPM_OPT_FLAGS"
  39. cd ../dhis-dns-engine-%{d_ver}
  40. make RPM_OPT_FLAGS="$RPM_OPT_FLAGS"
  41. cp INSTALL ../%{name}-%{version}/INSTALL.dns-engine
  42. cp README ../%{name}-%{version}/README.dns-engine
  43. cd ../dhis-mx-sendmail-engine-%{m_ver}
  44. make RPM_OPT_FLAGS="$RPM_OPT_FLAGS"
  45. cp INSTALL ../%{name}-%{version}/INSTALL.mx-sendmail-engine
  46. cp README ../%{name}-%{version}/README.mx-sendmail-engine
  47. cd ../dhistools-dns-%{t_ver}
  48. make RPM_OPT_FLAGS="$RPM_OPT_FLAGS"
  49. cp README ../%{name}-%{version}/README.dhistools
  50. cd ../%{name}-%{version}
  51. %install
  52. mkdir -p $RPM_BUILD_ROOT
  53. mkdir -p $RPM_BUILD_ROOT/usr
  54. mkdir -p $RPM_BUILD_ROOT/usr/sbin
  55. install -m 755 dhisd $RPM_BUILD_ROOT/usr/sbin
  56. install -m 755 genkeys $RPM_BUILD_ROOT/usr/sbin
  57. mkdir -p $RPM_BUILD_ROOT/etc/dhis
  58. mkdir -p $RPM_BUILD_ROOT/etc/dhis/bin
  59. mkdir -p $RPM_BUILD_ROOT/etc/dhis/db
  60. mkdir -p $RPM_BUILD_ROOT/etc/dhis/pid
  61. mkdir -p $RPM_BUILD_ROOT/etc/dhis/log
  62. mkdir -p $RPM_BUILD_ROOT/etc/dhis/script
  63. mkdir -p $RPM_BUILD_ROOT/etc/rc.d/init.d
  64. install -m 755 %{SOURCE4} $RPM_BUILD_ROOT/etc/rc.d/init.d/dhisd
  65. cd ../dhis-dns-engine-%{d_ver}
  66. install -m 755 dhis-dns-engine $RPM_BUILD_ROOT/usr/sbin
  67. cd ../dhis-mx-sendmail-engine-%{m_ver}
  68. install -m 755 dhis-mx-sendmail-engine $RPM_BUILD_ROOT/usr/sbin
  69. cd ../dhistools-dns-%{t_ver}
  70. install -m 755 genid $RPM_BUILD_ROOT/usr/sbin
  71. install -m 755 genpass $RPM_BUILD_ROOT/usr/sbin
  72. install -m 755 register-p.sh $RPM_BUILD_ROOT/usr/sbin
  73. install -m 755 register-q.sh $RPM_BUILD_ROOT/usr/sbin
  74. cd ../%{name}-%{version}
  75. %post
  76. # set up any missing server dir's
  77. # DIRS=" /etc/dhis /etc/dhis/bin /etc/dhis/pid /etc/dhis/db \
  78. # /etc/dhis/log /etc/dhis/script/ "
  79. # for i in ` echo $DIRS `; do
  80. # if [ ! -d $i ]; then
  81. # mkdir $i
  82. # fi
  83. # done
  84. # chmod 700 /etc/dhis /etc/dhis/*
  85. # Set up a template database -- leave a prior one alone
  86. TARGET=/etc/dhis/db/dhis.db.sample
  87. cat - << END >> $TARGET
  88. #
  89. # Sample configuration of the DHIS server
  90. #
  91. 1001 { ; A simple password authenticating host
  92. hostname dyn1.example.com
  93. hostpass pass1
  94. service dns
  95. }
  96. 1002 { ; Another password host
  97. hostname dyn2.example.com
  98. hostpass pass2
  99. service dns
  100. }
  101. 1003 { ; Here's a QRC secure host
  102. hostname dyn3.example.com
  103. authn 34234856347856438756384756384563485638447
  104. authn 34987469785496774967876795867785967946759
  105. authn 45375893578937538975389475398457438759348
  106. authn 43957439857395734895738475395739753948573
  107. service dns
  108. service mx-sendmail
  109. }
  110. END
  111. TARGET=/etc/dhis/db/services.db.sample
  112. cat - << END >> $TARGET
  113. #
  114. # Sample configuration of the DHIS server
  115. #
  116. dns 5 /usr/sbin/dhis-dns-engine
  117. mx 5 /usr/sbin/dhis-mx-sendmail-engine
  118. END
  119. #
  120. chmod 600 /etc/dhis/db/dhis.db*
  121. chmod 600 /etc/dhis/db/services.db*
  122. # Per INSTALL, we add this
  123. ln -sf /usr/sbin/dhisd /etc/dhis/bin
  124. ln -sf /usr/sbin/genkeys /etc/dhis/bin
  125. ln -sf /usr/sbin/dhis-dns-engine /etc/dhis/bin
  126. ln -sf /usr/sbin/dhis-mx-sendmail-engine /etc/dhis/bin
  127. ln -sf /usr/sbin/genid /etc/dhis/bin
  128. ln -sf /usr/sbin/genpass /etc/dhis/bin
  129. ln -sf /usr/sbin/register-p.sh /etc/dhis/bin
  130. ln -sf /usr/sbin/register-q.sh /etc/dhis/bin
  131. #
  132. /sbin/chkconfig --add dhisd
  133. %preun
  134. if [ $1 = 0 ]; then
  135. /etc/rc.d/init.d/dhisd stop > /dev/null 2>&1
  136. /sbin/chkconfig --del dhisd
  137. fi
  138. %clean
  139. rm -rf $RPM_BUILD_ROOT
  140. %files
  141. %defattr(-,root,root)
  142. %doc README COPYRIGHT CONTRIBUTORS INSTALL MODULES
  143. %doc README.dns-engine INSTALL.dns-engine
  144. %doc README.mx-sendmail-engine INSTALL.mx-sendmail-engine
  145. %doc README.dhistools
  146. /usr/sbin/dhisd
  147. /usr/sbin/genkeys
  148. /usr/sbin/dhis-dns-engine
  149. /usr/sbin/dhis-mx-sendmail-engine
  150. /usr/sbin/genid
  151. /usr/sbin/genpass
  152. /usr/sbin/register-p.sh
  153. /usr/sbin/register-q.sh
  154. %attr(0700, root, root) %dir /etc/dhis
  155. %attr(0700, root, root) %dir /etc/dhis/bin
  156. %attr(0700, root, root) %dir /etc/dhis/db
  157. %attr(0700, root, root) %dir /etc/dhis/pid
  158. %attr(0700, root, root) %dir /etc/dhis/log
  159. %attr(0700, root, root) %dir /etc/dhis/script
  160. %config /etc/rc.d/init.d/dhisd
  161. %changelog
  162. * Fri Mar 08 2002 Toru Sagami <sagami@vinelinux.org> 5.1-0vl4
  163. - rebuild on current VineSeed
  164. - initscript marked as config
  165. * Sun Sep 30 2001 KAJIKI Yoshihiro <kajiki@ylug.org> [5.1-0vl3]
  166. - correct file attribute of documents
  167. * Fri Sep 28 2001 KAJIKI Yoshihiro <kajiki@ylug.org> [5.1-0vl1]
  168. - update to 5.1
  169. - correct link mistake in spec file (Sorry!)
  170. * Mon Aug 27 2001 KAJIKI Yoshihiro <kajiki@ylug.org> [5.0-0vl3]
  171. - add engines into files (my mistake)
  172. * Mon Aug 27 2001 KAJIKI Yoshihiro <kajiki@ylug.org> [5.0-0vl2]
  173. - rebuild on VineSeed
  174. * Sun Aug 26 2001 KAJIKI Yoshihiro <kajiki@ylug.org> [5.0-0vl1]
  175. - update to 5.0
  176. - marge dhistools
  177. * Fri Aug 24 2001 KAJIKI Yoshihiro <kajiki@ylug.org> [4.0.2-0vl1]
  178. - rebuild for Vine 2.1.5 based on the Owl River Company's RPM [4.0.2-3]
  179. - modify spec file to rebuild as a common user
  180. * Sun Dec 17 2000 R P Herrold ( herrold@owlriver.com )
  181. - repair a typo in the initial .db setup - thanks
  182. - to luciano_terra@zipmail.com.br
  183. * Sat Dec 16 2000 R P Herrold ( herrold@owlriver.com )
  184. - conform to a more modern macro set dhisd-4.0.2-2
  185. * Sat Dec 16 2000 R P Herrold ( herrold@owlriver.com )
  186. - Initial build