ntp.spec 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. ##
  2. ## ntpd.spec -- OpenPKG RPM Specification
  3. ## Copyright (c) 2000-2001 Cable & Wireless Deutschland GmbH
  4. ## Copyright (c) 2000-2001 Ralf S. Engelschall <rse@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. # package information
  25. Name: ntp
  26. Summary: Network Time Protocol (NTP) Daemon
  27. URL: http://www.ntp.org/
  28. Vendor: David L. Mills
  29. Packager: The OpenPKG Project
  30. Distribution: OpenPKG [EXP]
  31. Group: Net
  32. License: BSD-style
  33. Version: 4.1.0
  34. Release: 6
  35. # list of sources
  36. Source0: http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-%{version}.tar.gz
  37. Source1: ntp-doc.tar.gz
  38. Source2: ntp.conf
  39. Source3: rc.ntp
  40. # build information
  41. Prefix: %{l_prefix}
  42. BuildRoot: %{l_buildroot}
  43. BuildPreReq: OpenPKG, openpkg >= 0.9-33
  44. PreReq: OpenPKG, openpkg >= 0.9-33
  45. AutoReq: no
  46. AutoReqProv: no
  47. %description
  48. The Network Time Protocol (NTP) is used to synchronize the time
  49. of a computer client or server to another server or reference
  50. time source, such as a radio or satellite receiver or modem. It
  51. provides accuracies typically within a millisecond on LANs and
  52. up to a few tens of milliseconds on WANs relative to Coordinated
  53. Universal Time (UTC) via a Global Positioning Service (GPS)
  54. receiver, for example. Typical NTP configurations utilize multiple
  55. redundant servers and diverse network paths in order to achieve high
  56. accuracy and reliability. Some configurations include cryptographic
  57. authentication to prevent accidental or malicious protocol attacks
  58. and some provide automatic server discovery using IP multicast.
  59. %prep
  60. %setup0 -q -c
  61. %setup1 -q -T -D -a 1
  62. %build
  63. ( cd ntp-%{version}
  64. CC="%{l_cc}" \
  65. CFLAGS="%{l_cflags -O}" \
  66. ./configure \
  67. --prefix=%{l_prefix}
  68. %{l_rpmtool} subst \
  69. 's;\(CONFIG_FILE[^"]*"\)/etc/ntp.conf;\1%{l_prefix}/etc/ntp/ntp.conf;' \
  70. -- include/ntp_config.h ntpdate/ntptime_config.c
  71. %{l_make} %{l_mflags -O}
  72. )
  73. %install
  74. rm -rf $RPM_BUILD_ROOT
  75. ( cd ntp-%{version}
  76. %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT"
  77. )
  78. ( cd ntp-doc
  79. %{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/man/man5
  80. %{l_shtool} install -c -m 644 *.5 $RPM_BUILD_ROOT%{l_prefix}/man/man5/
  81. %{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/man/man8
  82. %{l_shtool} install -c -m 644 *.8 $RPM_BUILD_ROOT%{l_prefix}/man/man8/
  83. )
  84. %{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/etc/ntp
  85. %{l_shtool} install -c -m 644 -e "s;@l_prefix@;%{l_prefix};g" \
  86. %{SOURCE ntp.conf} $RPM_BUILD_ROOT%{l_prefix}/etc/ntp/
  87. %{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d
  88. %{l_shtool} install -c -m 755 -e "s;@l_prefix@;%{l_prefix};g" \
  89. %{SOURCE rc.ntp} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
  90. %{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/var/ntp/ntpd.stat
  91. strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
  92. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} \
  93. '%config %{l_prefix}/etc/ntp/ntp.conf'
  94. %files -f files
  95. %clean
  96. rm -rf $RPM_BUILD_ROOT